diff --git a/1-enrich-with-datacite/concatenate-enrich-dois.py b/1-enrich-with-datacite/concatenate-enrich-dois.py index 0f74b736617e44d9d4e298a1a070201495b6f7f6..1f33bc57eaf1d3734913427c3fcde2e87a40d273 100644 --- a/1-enrich-with-datacite/concatenate-enrich-dois.py +++ b/1-enrich-with-datacite/concatenate-enrich-dois.py @@ -87,10 +87,18 @@ if temp_rows : df_out.to_csv("../dois-uga.csv", index = False) 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 with open("nb-dois.txt", 'w') as outf : 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 df_client_raw = df_out["client"].value_counts().to_frame()