Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
UGA Open Research Data Monitor backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maxence Larrieu
UGA Open Research Data Monitor backend
Commits
43a58ff0
Commit
43a58ff0
authored
6 months ago
by
Maxence Larrieu
Browse files
Options
Downloads
Patches
Plain Diff
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
6 months ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
1-enrich-with-datacite/concatenate-enrich-dois.py
+8
-0
8 additions, 0 deletions
1-enrich-with-datacite/concatenate-enrich-dois.py
with
8 additions
and
0 deletions
1-enrich-with-datacite/concatenate-enrich-dois.py
+
8
−
0
View file @
43a58ff0
...
@@ -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\n
nb of doi exported
\t
{
len
(
df_out
)
}
"
)
print
(
f
"
\n\n
nb 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
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment