{"id":25990130,"url":"https://github.com/naustica/semantic_scholar_bq","last_synced_at":"2026-06-06T19:31:53.093Z","repository":{"id":280451331,"uuid":"942039942","full_name":"naustica/semantic_scholar_bq","owner":"naustica","description":"Repository containing scripts for importing Semantic Scholar snapshots into BigQuery","archived":false,"fork":false,"pushed_at":"2025-09-10T10:37:46.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-10T14:10:49.034Z","etag":null,"topics":["bigquery","python","scholarly-metadata","semantic-scholar"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/naustica.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-03T13:28:15.000Z","updated_at":"2025-09-10T10:37:50.000Z","dependencies_parsed_at":"2025-03-03T14:39:52.695Z","dependency_job_id":null,"html_url":"https://github.com/naustica/semantic_scholar_bq","commit_stats":null,"previous_names":["naustica/semantic_scholar_bq"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/naustica/semantic_scholar_bq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naustica%2Fsemantic_scholar_bq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naustica%2Fsemantic_scholar_bq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naustica%2Fsemantic_scholar_bq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naustica%2Fsemantic_scholar_bq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/naustica","download_url":"https://codeload.github.com/naustica/semantic_scholar_bq/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/naustica%2Fsemantic_scholar_bq/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33997732,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-06T02:00:07.033Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bigquery","python","scholarly-metadata","semantic-scholar"],"created_at":"2025-03-05T13:32:59.080Z","updated_at":"2026-06-06T19:31:53.088Z","avatar_url":"https://github.com/naustica.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Workflow for Processing and Loading Semantic Scholar snapshots into Google BigQuery\n\nThis repository contains instructions on how to extract and transform Semantic Scholar data for data analysis with Google BigQuery.\n\n## Requirements\n\n- [Python3](https://www.python.org)\n  - [gsutil](https://pypi.org/project/gsutil/)\n  - [requests](https://pypi.org/project/requests/)\n\n## Download snapshot\n\nTo download datasets from Semantic Scholar, replace the following placeholder with your API key.\n```bash\n$ export s2_key=YOUR_API_KEY\n```\n\nTo download all datasets within a Semantic Scholar data snapshot, use:\n```bash\n$ python3 semantic_scholar.py --logging=info\n```\n\nTo download individual datasets within a Semantic Scholar data snapshot, use:\n\n```python\nfrom semantic_scholar import SemanticScholar\nimport os\n\ns2 = SemanticScholar(api_key=os.environ['s2_key'],\n                     download_path='/scratch/users/haupka/semantic-scholar-snapshot',\n                     snapshot_date='2025-02-25')\ns2.download_entity(entity='papers')\ns2.download_entity(entity='publication-venues')\n```\n\n## Uploading Files to Google Bucket\n\n```bash\n$ gsutil -m cp -r /scratch/users/haupka/semantic-scholar-snapshot gs://bigschol\n```\n\n## Creating a BigQuery Table\n\n```bash\n$ bq load --ignore_unknown_values --source_format=NEWLINE_DELIMITED_JSON subugoe-collaborative.semantic_scholar.papers gs://bigschol/semantic-scholar-snapshot/papers/*.jsonl.gz s2_papers_schema.json\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaustica%2Fsemantic_scholar_bq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnaustica%2Fsemantic_scholar_bq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnaustica%2Fsemantic_scholar_bq/lists"}