Created
August 19, 2019 18:27
-
-
Save MikeTrizna/09bfc3fe7f3874f50a6ca723acef5fe6 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
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"import requests" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"url = 'https://ropensci.github.io/roregistry/registry.json'\n", | |
"r = requests.get(url)\n", | |
"opensci_json = r.json()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"[{'name': 'auk',\n", | |
" 'description': 'eBird Data Extraction and Processing in R',\n", | |
" 'details': 'Extract and process bird sightings records from\\n eBird (<http://ebird.org>), an online tool for recording bird\\n observations. Public access to the full eBird database is via the\\n eBird Basic Dataset (EBD; see <http://ebird.org/ebird/data/download>\\n for access), a downloadable text file. This package is an interface to\\n AWK for extracting data from the EBD based on taxonomic, spatial, or\\n temporal filters, to produce a manageable file size that can be\\n imported into R.',\n", | |
" 'maintainer': 'Matthew Strimas-Mackey',\n", | |
" 'keywords': 'dataset, ebird',\n", | |
" 'github': 'https://github.com/CornellLabofOrnithology/auk',\n", | |
" 'status': 'active',\n", | |
" 'onboarding': 'https://github.com/ropensci/onboarding/issues/136',\n", | |
" 'on_cran': True,\n", | |
" 'on_bioc': False,\n", | |
" 'url': 'https://github.com/CornellLabofOrnithology/auk',\n", | |
" 'ropensci_category': 'data-access'},\n", | |
" {'name': 'genbankr',\n", | |
" 'description': 'Parsing GenBank files into semantically useful objects',\n", | |
" 'details': 'Reads Genbank files.',\n", | |
" 'maintainer': 'Gabriel Becker',\n", | |
" 'keywords': '',\n", | |
" 'github': 'https://github.com/gmbecker/genbankr',\n", | |
" 'status': 'active',\n", | |
" 'onboarding': 'https://github.com/ropensci/onboarding/issues/47',\n", | |
" 'on_cran': False,\n", | |
" 'on_bioc': True,\n", | |
" 'url': 'https://github.com/gmbecker/genbankr',\n", | |
" 'ropensci_category': 'data-access'}]" | |
] | |
}, | |
"execution_count": 3, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"opensci_json['packages'][:2]" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"import pandas as pd" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/html": [ | |
"<div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>name</th>\n", | |
" <th>description</th>\n", | |
" <th>details</th>\n", | |
" <th>maintainer</th>\n", | |
" <th>keywords</th>\n", | |
" <th>github</th>\n", | |
" <th>status</th>\n", | |
" <th>onboarding</th>\n", | |
" <th>on_cran</th>\n", | |
" <th>on_bioc</th>\n", | |
" <th>url</th>\n", | |
" <th>ropensci_category</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>auk</td>\n", | |
" <td>eBird Data Extraction and Processing in R</td>\n", | |
" <td>Extract and process bird sightings records fro...</td>\n", | |
" <td>Matthew Strimas-Mackey</td>\n", | |
" <td>dataset, ebird</td>\n", | |
" <td>https://github.com/CornellLabofOrnithology/auk</td>\n", | |
" <td>active</td>\n", | |
" <td>https://github.com/ropensci/onboarding/issues/136</td>\n", | |
" <td>True</td>\n", | |
" <td>False</td>\n", | |
" <td>https://github.com/CornellLabofOrnithology/auk</td>\n", | |
" <td>data-access</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>genbankr</td>\n", | |
" <td>Parsing GenBank files into semantically useful...</td>\n", | |
" <td>Reads Genbank files.</td>\n", | |
" <td>Gabriel Becker</td>\n", | |
" <td></td>\n", | |
" <td>https://github.com/gmbecker/genbankr</td>\n", | |
" <td>active</td>\n", | |
" <td>https://github.com/ropensci/onboarding/issues/47</td>\n", | |
" <td>False</td>\n", | |
" <td>True</td>\n", | |
" <td>https://github.com/gmbecker/genbankr</td>\n", | |
" <td>data-access</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>2</th>\n", | |
" <td>treeio</td>\n", | |
" <td>Base Classes and Functions for Phylogenetic Tr...</td>\n", | |
" <td>'treeio' is an R package to make it easier to ...</td>\n", | |
" <td>Guangchuang Yu</td>\n", | |
" <td></td>\n", | |
" <td>https://yulab-smu.github.io/treedata-book/</td>\n", | |
" <td>active</td>\n", | |
" <td>https://github.com/ropensci/onboarding/issues/179</td>\n", | |
" <td>False</td>\n", | |
" <td>True</td>\n", | |
" <td>https://yulab-smu.github.io/treedata-book/</td>\n", | |
" <td>data-tools</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>3</th>\n", | |
" <td>apipkgen</td>\n", | |
" <td>Package Generator for HTTP API Wrapper Packages</td>\n", | |
" <td>Package Generator for HTTP API Wrapper Packages.</td>\n", | |
" <td>Scott Chamberlain</td>\n", | |
" <td>yaml</td>\n", | |
" <td>https://github.com/ropenscilabs/apipkgen</td>\n", | |
" <td>wip</td>\n", | |
" <td></td>\n", | |
" <td>False</td>\n", | |
" <td>False</td>\n", | |
" <td>https://github.com/ropenscilabs/apipkgen</td>\n", | |
" <td>http-tools</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>4</th>\n", | |
" <td>arresteddev</td>\n", | |
" <td>Arrested Development</td>\n", | |
" <td>Here to help you when your development is, sha...</td>\n", | |
" <td>Lucy D'Agostino McGowan</td>\n", | |
" <td>unconf, unconf17</td>\n", | |
" <td>https://github.com/ropenscilabs/arresteddev</td>\n", | |
" <td>concept</td>\n", | |
" <td></td>\n", | |
" <td>False</td>\n", | |
" <td>False</td>\n", | |
" <td>https://github.com/ropenscilabs/arresteddev</td>\n", | |
" <td>data-access</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"</div>" | |
], | |
"text/plain": [ | |
" name description \\\n", | |
"0 auk eBird Data Extraction and Processing in R \n", | |
"1 genbankr Parsing GenBank files into semantically useful... \n", | |
"2 treeio Base Classes and Functions for Phylogenetic Tr... \n", | |
"3 apipkgen Package Generator for HTTP API Wrapper Packages \n", | |
"4 arresteddev Arrested Development \n", | |
"\n", | |
" details maintainer \\\n", | |
"0 Extract and process bird sightings records fro... Matthew Strimas-Mackey \n", | |
"1 Reads Genbank files. Gabriel Becker \n", | |
"2 'treeio' is an R package to make it easier to ... Guangchuang Yu \n", | |
"3 Package Generator for HTTP API Wrapper Packages. Scott Chamberlain \n", | |
"4 Here to help you when your development is, sha... Lucy D'Agostino McGowan \n", | |
"\n", | |
" keywords github status \\\n", | |
"0 dataset, ebird https://github.com/CornellLabofOrnithology/auk active \n", | |
"1 https://github.com/gmbecker/genbankr active \n", | |
"2 https://yulab-smu.github.io/treedata-book/ active \n", | |
"3 yaml https://github.com/ropenscilabs/apipkgen wip \n", | |
"4 unconf, unconf17 https://github.com/ropenscilabs/arresteddev concept \n", | |
"\n", | |
" onboarding on_cran on_bioc \\\n", | |
"0 https://github.com/ropensci/onboarding/issues/136 True False \n", | |
"1 https://github.com/ropensci/onboarding/issues/47 False True \n", | |
"2 https://github.com/ropensci/onboarding/issues/179 False True \n", | |
"3 False False \n", | |
"4 False False \n", | |
"\n", | |
" url ropensci_category \n", | |
"0 https://github.com/CornellLabofOrnithology/auk data-access \n", | |
"1 https://github.com/gmbecker/genbankr data-access \n", | |
"2 https://yulab-smu.github.io/treedata-book/ data-tools \n", | |
"3 https://github.com/ropenscilabs/apipkgen http-tools \n", | |
"4 https://github.com/ropenscilabs/arresteddev data-access " | |
] | |
}, | |
"execution_count": 5, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"ropensci_df = pd.DataFrame(opensci_json['packages'])\n", | |
"ropensci_df.head()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"406" | |
] | |
}, | |
"execution_count": 6, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"len(ropensci_df)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 7, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"data-access 131\n", | |
"scalereprod 38\n", | |
"literature 33\n", | |
"geospatial 27\n", | |
"data-tools 24\n", | |
"http-tools 17\n", | |
"taxonomy 11\n", | |
"databases 11\n", | |
"security 9\n", | |
"data-publication 6\n", | |
"data-extraction 6\n", | |
"image-processing 6\n", | |
"data-visualization 5\n", | |
"data-analysis 4\n", | |
"altmetrics 2\n", | |
"Name: ropensci_category, dtype: int64" | |
] | |
}, | |
"execution_count": 7, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"ropensci_df['ropensci_category'].value_counts()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.7.3" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment