Skip to content
Snippets Groups Projects
Commit acab36c6 authored by Elias Chetouane's avatar Elias Chetouane
Browse files

Ajout d'informations sur les clients datacite.

parent 4d87c4eb
No related branches found
No related tags found
No related merge requests found
......@@ -61,6 +61,21 @@ if temp_rows :
## output another csv with datacite client and number of datasets
df_client_raw = df_out["client"].value_counts()
## get informations about each client
client_names = []
client_years = []
client_urls = []
for client in df_client_raw["client"]:
req = requests.get('https://api.datacite.org/clients?query=id:%22cern.zenodo%22')
client_names.append(req.json()["data"][0]["attributes"]["name"])
client_years.append(req.json()["data"][0]["attributes"]["year"])
client_urls.append(req.json()["data"][0]["attributes"]["url"])
## add informations to the output csv
df_client_raw["name"] = client_names
df_client_raw["year"] = client_years
df_client_raw["url"] = client_urls
df_client_raw.to_csv("all_datacite_clients_for_uga.csv")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment