Last active
November 1, 2017 21:54
-
-
Save aculich/12f0955faae7c26290a903fac4036744 to your computer and use it in GitHub Desktop.
example of using jq to extract journals from the AMiner Open Academic Graph: https://aminer.org/open-academic-graph
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
| #!/bin/bash | |
| ## example of using jq to extract journals from | |
| ## the AMiner Open Academic Graph: | |
| ## https://aminer.org/open-academic-graph | |
| wget https://academicgraphv1wu.blob.core.windows.net/aminer/aminer_papers_0.zip | |
| unzip -p aminer_papers_0.zip aminer_papers_0.txt > aminer_papers_0.txt | |
| jq . aminer_papers_0.txt -C | less -r | |
| jq .venue aminer_papers_0.txt -C | wc -l | |
| time jq .venue aminer_papers_0.txt > aminer_papers_0_venue.txt | |
| time cat aminer_papers_0_venue.txt | sort -u | tee aminer_papers_0_venue_sort_uniq.txt | |
| wc -l aminer_papers_0_venue_sort_uniq.txt | |
| time jq '. | select(.venue=="Child Development")' aminer_papers_0.txt > aminer_papers_0_venue_child_development.txt | |
| jq . aminer_papers_0_venue_child_development.txt -C | less -r |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment