Skip to content
Snippets Groups Projects
Commit 43a58ff0 authored by Maxence Larrieu's avatar Maxence Larrieu
Browse files

export a lighter table w the last 500 DOIs

parent b876db69
No related branches found
No related tags found
No related merge requests found
Pipeline #192096 passed
...@@ -87,10 +87,18 @@ if temp_rows : ...@@ -87,10 +87,18 @@ if temp_rows :
df_out.to_csv("../dois-uga.csv", index = False) df_out.to_csv("../dois-uga.csv", index = False)
print(f"\n\nnb of doi exported \t{len(df_out)}") print(f"\n\nnb of doi exported \t{len(df_out)}")
# write the number of dois found in a file to display on the website # write the number of dois found in a file to display on the website
with open("nb-dois.txt", 'w') as outf : with open("nb-dois.txt", 'w') as outf :
outf.write(str(len(df_out))) outf.write(str(len(df_out)))
## output last 500 DOIs to make it easier to open in web tools
df_last_dois = df_out.sort_values(by = "created", ascending = False, inplace = False)[:500]
df_last_dois["created"] = df_last_dois["created"].str[:10]
df_last_dois[["doi", "client", "resourceTypeGeneral", "created", "publisher", "rights", "sizes"]].to_csv("../dois-uga--last-500.csv", index = False)
## for the website : output another csv with datacite client and number of datasets ## for the website : output another csv with datacite client and number of datasets
df_client_raw = df_out["client"].value_counts().to_frame() df_client_raw = df_out["client"].value_counts().to_frame()
......
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