-
Notifications
You must be signed in to change notification settings - Fork 8
Updating readme, changing backend to allow for notebook queries #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kazemaksOG
wants to merge
3
commits into
atlarge-research:master
Choose a base branch
from
kazemaksOG:update_readme
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,8 @@ Disclaimer: The datasets are on the order of several 100 GBs and take a signific | |
|
|
||
| In order to update the database you must download all 4 data sources and parse them. | ||
|
|
||
| **Upadte**: Semantic scholar API is now behind a license. Ensure your usage fits the license specification. | ||
|
|
||
| 1. Create a new folder in the root of the repository where all the input files will be stored with the following command: | ||
| ```sh | ||
| $ export DOWNLOAD_DATE=$(date +'%d_%m_%Y') | ||
|
|
@@ -15,26 +17,31 @@ In order to update the database you must download all 4 data sources and parse t | |
| $ wget -P datasets/dblp_$DOWNLOAD_DATE https://dblp.uni-trier.de/xml/{dblp.xml.gz,dblp.dtd} | ||
| ``` | ||
|
|
||
| 3. Download the [Open Academic Graph](https://www.aminer.org/open-academic-graph) dataset which contains the Aminer and MAG papers using the following commands: | ||
| 3. **UPDATE**: aminer and mag datasets now seem to be combined into one graph. Name is kept for scripts to still function. Download the [Open Academic Graph](https://www.aminer.org/open-academic-graph) dataset which contains the Aminer and MAG papers using the following commands: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. URL points to a 404. |
||
|
|
||
| ```sh | ||
| $ wget -P datasets/aminer_$DOWNLOAD_DATE https://www.aminer.cn/download_data\?link\=oag-2-1/aminer/paper/aminer_papers_{0..5}.zip | ||
| $ wget -P datasets/mag_$DOWNLOAD_DATE https://www.aminer.cn/download_data\?link\=oag-2-1/mag/paper/mag_papers_{0..16}.zip | ||
| $ wget -P datasets/aminer_$DOWNLOAD_DATE https://opendata.aminer.cn/dataset/oag_publication_{1..14}.zip | ||
| ``` | ||
|
|
||
| This will download the following files: | ||
|  | ||
|
|
||
| 4. Download the Semantic Scholar dataset by following the [instructions](https://api.semanticscholar.org/corpus/download/) to get the latest corpus and store the files in the `s2-corpus_$DOWNLOAD_DATE` directory. | ||
| 4. Download the Semantic Scholar dataset by following the [instructions](https://api.semanticscholar.org/api-docs/datasets) to get the latest corpus and store the files in the `s2-corpus_$DOWNLOAD_DATE` directory. Note that this dataset has not been tested since the API has been licensed. | ||
|
|
||
| 5. While the files are downloading (can take days), continue with next steps that do not depend on this. | ||
|
|
||
| 6. After downloading all the files, unzip them. | ||
| 6. Install PostgreSQL, and create with sufficient amount of privilages to create a new database. After completing that, modify `database_manager.py` with the appropriate credentials. | ||
|
|
||
| 7. After making sure all files are unzipped and stored in the same folder, change line 14 in the `renew_data_locally.py` which is located in the parser folder, to the correct path of the folder you downloaded all the files to. | ||
| 7. After downloading all the files, unzip them. | ||
|
|
||
| 8. After making sure all files are unzipped and stored in the same folder, change line 14 in the `renew_data_locally.py` which is located in the parser folder, to the correct path of the folder you downloaded all the files to. | ||
|
|
||
|  | ||
|
|
||
| 8. Finally, run the `renew_data_locally.py` file. | ||
| 9. Finally, install `requirements.txt` into your python environment and run the `renew_data_locally.py` file. | ||
|
|
||
| 10. After re-parsing the whole database, make sure to add the version dates of all the downloaded sources into the database. | ||
|
|
||
| 9. After re-parsing the whole database, make sure to add the version dates of all the downloaded sources into the database. | ||
|  | ||
|
|
||
|  | ||
| 11. Dump the database into a backup file `pg_dump aip > data.backup` | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| ## General usage | ||
| 1. Modify `db_setup.py` to have the necessary credidentials to access the database. | ||
| 2. Setup a python environment for running jupiter notebooks (recommended: VS Code or VSCodium). | ||
|
|
||
| **Note:** Some of the notebooks are outdated, hence may need some manual adjustments to work. |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.