Last active
November 8, 2018 12:48
-
-
Save slint/1941591bea26dc5fa2192a41e85543a5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Fetch events from DataCite | |
curl -G https://api.datacite.org/events \ | |
-d source-id=crossref \ | |
-d relation-type-id=references \ | |
-d prefix=10.5281 > datacite-0.json | |
# Get next page from ".links.next" link | |
curl "$(jq -r .links.next datacite-0.json)" > datacite-1.json | |
# Fetch events from Crossref | |
curl -G https://api.eventdata.crossref.org/v1/events \ | |
-d source=crossref \ | |
-d relation-type=references \ | |
-d obj-id.prefix=10.5281 > crossref-0.json | |
# Fetch next page using cursor | |
curl -G https://api.eventdata.crossref.org/v1/events \ | |
-d cursor=$(jq -r '.message["next-cursor"]' crossref-0.json) \ | |
-d source=crossref \ | |
-d relation-type=references \ | |
-d obj-id.prefix=10.5281 > crossref-1.json | |
# Compare totals | |
jq .meta.total datacite-0.json | |
jq '.message["total-results"]' crossref-0.json | |
# Normalize results to a [id, subj_id, obj_id, occurred_at] tuple | |
jq -r '.[] | .data[] | [.id, (.relationships.subj.data.id | ascii_downcase), (.relationships.obj.data.id | ascii_downcase), .attributes["occurred-at"][:10] ] | @csv' -s datacite-*.json >> datacite-unique.csv | |
sort -u -o datacite-unique.csv datacite-unique.csv | |
jq -r '.[] | .message.events[] | [.id, (.subj_id | ascii_downcase), (.obj_id | ascii_downcase), .occurred_at[:10]] | @csv' -s crossref-*.json > crossref-unique.csv | |
sort -u -o crossref-unique.csv crossref-unique.csv | |
# Show links that are only available in Crossref | |
comm -2 -3 crossref-unique.csv datacite-unique.csv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
id | subj_id | obj_id | occurred_at | |
---|---|---|---|---|
06bd3cf8-80ba-4ef3-ad66-b28ee2cc512b | https://doi.org/10.1007/978-3-319-52669-0_6 | https://doi.org/10.5281/zenodo.19156 | 2017-01-01 | |
07827f83-c501-4981-84d1-6dc31319a7c2 | https://doi.org/10.1080/14686996.2018.1509275 | https://doi.org/10.5281/zenodo.34938 | 2018-09-25 | |
07983418-5cdd-4e29-ac4d-bc6a7178a2b8 | https://doi.org/10.1007/978-3-319-59483-5_2 | https://doi.org/10.5281/zenodo.224242 | 2017-01-01 | |
07ff1f0b-7214-4749-a6ed-11ef31e767dc | https://doi.org/10.1007/978-981-10-8031-9_1 | https://doi.org/10.5281/zenodo.242550 | 2018-05-26 | |
0830d475-f858-44a5-9042-1b8dccb47327 | https://doi.org/10.1007/978-3-319-93566-9_11 | https://doi.org/10.5281/zenodo.165123 | 2018-01-01 | |
0f869c60-6740-4698-aa80-e6ca73f844c1 | https://doi.org/10.1007/s10822-018-0165-3 | https://doi.org/10.5281/zenodo.1205753 | 2018-10-01 | |
16cf10a6-eb4e-4ccf-a166-0a8d9e9a3532 | https://doi.org/10.1007/978-3-319-63516-3_8 | https://doi.org/10.5281/zenodo.245971 | 2018-01-01 | |
1f044207-5d8a-4685-bced-6a18e45725bd | https://doi.org/10.1007/978-3-319-65840-7_9 | https://doi.org/10.5281/zenodo.16133 | 2018-01-01 | |
1fa1ad99-349d-41a4-a3bf-666c5d346fc3 | https://doi.org/10.1007/978-3-319-60053-6_12-1 | https://doi.org/10.5281/zenodo.61278 | 2018-01-01 | |
22995b5a-cc6b-423e-b8b3-ecfe78222e73 | https://doi.org/10.5194/acp-16-8729-2016 | https://doi.org/10.5281/zenodo.34975 | 2016-07-18 | |
27b30523-828a-467d-a68d-958c45fed3f1 | https://doi.org/10.1007/978-3-319-63516-3_8 | https://doi.org/10.5281/zenodo.245652 | 2018-01-01 | |
33a47746-f26e-4ecf-8ae6-8bf2ad54b53a | https://doi.org/10.1007/978-3-319-55480-8_2 | https://doi.org/10.5281/zenodo.59720 | 2016-01-01 | |
33ce1c92-18b2-4dd4-8686-929a3b2cfa34 | https://doi.org/10.1007/978-3-319-59483-5_1 | https://doi.org/10.5281/zenodo.223099 | 2017-01-01 | |
34cbf628-2f44-42a8-9248-13e61a2c29c5 | https://doi.org/10.1007/978-3-642-40766-6_23 | https://doi.org/10.5281/zenodo.22826 | 2016-10-25 | |
372e3ea6-1238-4fbe-8eb0-840772483ebe | https://doi.org/10.1007/978-3-319-63516-3_8 | https://doi.org/10.5281/zenodo.237456 | 2018-01-01 | |
373a221a-7286-4d74-b1fe-11adadd4ba39 | https://doi.org/10.1007/978-3-319-33598-8_15-1 | https://doi.org/10.5281/zenodo.61278 | 2018-01-01 | |
4fd9fc6f-f8fd-4ba1-b6cb-af9ee07e49c6 | https://doi.org/10.1007/978-3-319-59483-5_3 | https://doi.org/10.5281/zenodo.224251 | 2017-01-01 | |
5899c48d-787c-4261-9cec-2f0c7e2b78b1 | https://doi.org/10.1007/978-3-319-76445-0_9 | https://doi.org/10.5281/zenodo.27878 | 2018-01-01 | |
5d3ea97b-3889-4f11-a521-1a455591da40 | https://doi.org/10.1007/978-3-319-89303-7_2 | https://doi.org/10.5281/zenodo.594510 | 2018-01-01 | |
5e152488-4fed-4b21-a422-f7176a719e38 | https://doi.org/10.1007/s40806-018-0171-7 | https://doi.org/10.5281/zenodo.1162670 | 2018-09-11 | |
6fcdfdd0-fb93-47c7-b3b6-c1d0b69f9e88 | https://doi.org/10.3897/tdwgproceedings.1.20379 | https://doi.org/10.5281/zenodo.192186 | 2017-08-16 | |
7130674f-3e56-4d31-a132-56aa1b0e6615 | https://doi.org/10.1061/9780784481479.013 | https://doi.org/10.5281/zenodo.34043 | 2018-06-07 | |
71e50c04-b7e1-4741-b56e-91a6e0b3fd7e | https://doi.org/10.1007/978-3-319-63516-3_8 | https://doi.org/10.5281/zenodo.237107 | 2018-01-01 | |
7835aee2-e6ab-4ec4-8617-0da100c049e4 | https://doi.org/10.1007/978-3-319-52669-0_6 | https://doi.org/10.5281/zenodo.19113 | 2017-01-01 | |
88200358-0213-4363-8db2-4baa34332f29 | https://doi.org/10.1007/978-3-319-63516-3_8 | https://doi.org/10.5281/zenodo.246087 | 2018-01-01 | |
8c956430-c8ba-45d8-a2e7-c5aa6f6c896d | https://doi.org/10.1007/978-3-319-63516-3_8 | https://doi.org/10.5281/zenodo.246079 | 2018-01-01 | |
9026cab1-f869-433e-b59f-6345239476ed | https://doi.org/10.5194/acp-17-3673-2017 | https://doi.org/10.5281/zenodo.377007 | 2017-03-15 | |
919dd126-141a-4859-b2b9-b014fdbbff37 | https://doi.org/10.1007/978-3-319-63962-8_259-1 | https://doi.org/10.5281/zenodo.268949 | 2018-01-01 | |
93a1a8f4-1e1d-45e1-932d-80d985e1dc59 | https://doi.org/10.1007/978-3-658-19123-8_34 | https://doi.org/10.5281/zenodo.896538 | 2018-01-01 | |
93b45a14-8ff1-42b9-8129-300b68b9d4d2 | https://doi.org/10.1007/978-3-658-16937-4_38-1 | https://doi.org/10.5281/zenodo.1004683 | 2018-01-01 | |
947746a4-bc9d-4412-b10d-29ac0bffc65f | https://doi.org/10.1007/s41781-017-0004-6 | https://doi.org/10.5281/zenodo.400708 | 2017-09-29 | |
9c05f26d-2fcd-47eb-b068-5ea191a774df | https://doi.org/10.1007/s00161-018-0715-x | https://doi.org/10.5281/zenodo.889304 | 2018-09-24 | |
ac6656c9-77b6-4510-9bb3-dad15ede3360 | https://doi.org/10.4018/978-1-5225-6201-6.ch007 | https://doi.org/10.5281/zenodo.22387 | 0000-01-01 | |
ad98804a-e9ae-4ca8-85b6-cc0ac20edf46 | https://doi.org/10.1007/978-3-319-98379-0_30 | https://doi.org/10.5281/zenodo.34624 | 2018-01-01 | |
b2f541b4-de0d-403e-9f20-c2e08c5dacdc | https://doi.org/10.1007/978-3-319-65840-7_9 | https://doi.org/10.5281/zenodo.16136 | 2018-01-01 | |
b880fb49-a153-40d2-87c7-6f5cb3cfdb32 | https://doi.org/10.1007/s10822-018-0165-3 | https://doi.org/10.5281/zenodo.1226361 | 2018-10-01 | |
bef404dd-c938-4769-9f4f-709461402893 | https://doi.org/10.1007/978-3-319-52669-0_5 | https://doi.org/10.5281/zenodo.19113 | 2017-01-01 | |
ce2894dc-27aa-43e3-a928-9f98b1043a1a | https://doi.org/10.1007/s00161-018-0715-x | https://doi.org/10.5281/zenodo.889210 | 2018-09-24 | |
d2497292-d445-4b9a-83d0-44a4147c3b92 | https://doi.org/10.1007/s00161-018-0715-x | https://doi.org/10.5281/zenodo.889383 | 2018-09-24 | |
e3ed817c-a50e-4ae4-81ab-d6eb5e3f6934 | https://doi.org/10.1007/978-3-319-47886-9_27 | https://doi.org/10.5281/zenodo.46450 | 2016-11-17 | |
e73f5c27-91af-476d-8fad-4bcf67d7b56f | https://doi.org/10.1177/2515245918770963 | https://doi.org/10.5281/zenodo.838685 | 2018-06-01 | |
e93b3563-9a01-4ba6-94fa-b1e3b17f5857 | https://doi.org/10.3390/fire1010011 | https://doi.org/10.5281/zenodo.34142 | 2018-04-10 | |
f0059e08-e64c-4cd2-ae8c-f98cb2b6deac | https://doi.org/10.2514/6.2018-2448 | https://doi.org/10.5281/zenodo.495773, | 2018-05-25 | |
f0fd8982-a2ef-426f-b495-c9435cd244c0 | https://doi.org/10.1117/12.2309958 | https://doi.org/10.5281/zenodo.50641 | 2018-04-13 | |
fe4c27aa-fc7e-4346-938b-fd7efc5850b6 | https://doi.org/10.5194/acp-16-4401-2016 | https://doi.org/10.5281/zenodo.34975 | 2016-04-11 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment