Skip to content
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

submitting miniproject2 #50

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
264 changes: 264 additions & 0 deletions mbutera.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,264 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<pymongo.results.InsertOneResult at 0x7f7d851e7c08>"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import pprint\n",
"import re\n",
"import pymongo, json\n",
"\n",
"pp = pprint.PrettyPrinter(indent=1,width=65)\n",
"\n",
"client = pymongo.MongoClient (host=\"da1.eecs.utk.edu\")\n",
"db = client ['fdac19mp2']\n",
"coll = db ['mbutera']\n",
"# for each dataset\n",
"coll.insert_one ( {'topic':'climate change', \n",
" 'first dataset': 'consequences of climate change for biotic disturbances in NA forests',\n",
" 'license': 'NA', \n",
" 'description': 'data about insects and diseases in North America that are notable agents of disturbance', \n",
" 'url': 'https://datadryad.org/stash/dataset/doi:10.5061/dryad.cq1r1' } )\n"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"scrolled": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"20\n",
"{'_id': ObjectId('5d88d3e08bc17db98b8c9f17'),\n",
" 'description': 'global land and ocean-land temperatures',\n",
" 'first dataset': 'global climate change data',\n",
" 'license': 'NA',\n",
" 'topic': 'climate change',\n",
" 'url': 'https://data.world/data-society/global-climate-change-data'}\n",
"{'_id': ObjectId('5d88d4088bc17db9a8293728'),\n",
" 'description': 'global land and ocean-land temperatures',\n",
" 'first dataset': 'global climate change data',\n",
" 'license': 'NA',\n",
" 'topic': 'climate change',\n",
" 'url': 'https://data.world/data-society/global-climate-change-data'}\n",
"{'_id': ObjectId('5d88d5458bc17dba29a7feb3'),\n",
" 'description': 'data on climate systems and greenhouse gas '\n",
" 'emissions',\n",
" 'first dataset': 'climate change data',\n",
" 'license': 'NA',\n",
" 'topic': 'climate change',\n",
" 'url': 'https://datacatalog.worldbank.org/dataset/climate-change-data'}\n",
"{'_id': ObjectId('5d88d6198bc17dba84d00ecb'),\n",
" 'description': 'press releases and statements from members of '\n",
" 'congress',\n",
" 'first dataset': 'congressional statements on climate change',\n",
" 'license': 'NA',\n",
" 'topic': 'climate change',\n",
" 'url': 'https://projects.propublica.org/represent/statements/climate-change'}\n",
"{'_id': ObjectId('5d88d6e38bc17dbad83de17e'),\n",
" 'description': 'surface tempurature data from 1750 to 2013',\n",
" 'first dataset': 'earth surface temperature data',\n",
" 'license': 'NA',\n",
" 'topic': 'climate change',\n",
" 'url': 'https://www.kaggle.com/berkeleyearth/climate-change-earth-surface-temperature-data'}\n",
"{'_id': ObjectId('5d88d7338bc17dbad83de181'),\n",
" 'description': 'ensemble temperature and precipitation data '\n",
" 'derived from global circulation models',\n",
" 'first dataset': 'ensemble projections',\n",
" 'license': 'NA',\n",
" 'topic': 'climate change',\n",
" 'url': 'https://www.kaggle.com/berkeleyearth/climate-change-earth-surface-temperature-data'}\n",
"{'_id': ObjectId('5d88d7378bc17dbad83de183'),\n",
" 'description': 'ensemble temperature and precipitation data '\n",
" 'derived from global circulation models',\n",
" 'first dataset': 'ensemble projections',\n",
" 'license': 'NA',\n",
" 'topic': 'climate change',\n",
" 'url': 'https://www.kaggle.com/berkeleyearth/climate-change-earth-surface-temperature-data'}\n",
"{'_id': ObjectId('5d88d7428bc17dbb0d493d1b'),\n",
" 'description': 'ensemble temperature and precipitation data '\n",
" 'derived from global circulation models',\n",
" 'first dataset': 'ensemble projections',\n",
" 'license': 'NA',\n",
" 'topic': 'climate change',\n",
" 'url': 'https://www.kaggle.com/berkeleyearth/climate-change-earth-surface-temperature-data'}\n",
"{'_id': ObjectId('5d88d8318bc17dbb0d493d20'),\n",
" 'description': 'twitter data showing whether or not people '\n",
" 'believe in climate change',\n",
" 'first dataset': 'sentiment of climate change',\n",
" 'license': 'NA',\n",
" 'topic': 'climate change',\n",
" 'url': 'https://data.world/crowdflower/sentiment-of-climate-change'}\n",
"{'_id': ObjectId('5d88d8b88bc17dbb0d493d23'),\n",
" 'description': 'data showing effects of climate change on '\n",
" 'world crop production',\n",
" 'first dataset': 'climate change and food production',\n",
" 'license': 'NA',\n",
" 'topic': 'climate change',\n",
" 'url': 'https://data.world/xprizeai-env/effects-of-climate-change-on-global-food-production-v-1'}\n",
"{'_id': ObjectId('5d88d8fa8bc17dbb0d493d25'),\n",
" 'description': 'details of current or terminated climate '\n",
" 'change agreements',\n",
" 'first dataset': 'climate change agreements',\n",
" 'license': 'NA',\n",
" 'topic': 'climate change',\n",
" 'url': 'https://data.gov.uk/dataset/cd0b93c4-f785-482e-85a1-6a652f4b1864/climate-change-agreements'}\n",
"{'_id': ObjectId('5d88d9778bc17dbb0d493d28'),\n",
" 'description': 'climate variability data for the pacific '\n",
" 'islands',\n",
" 'first dataset': 'pacific islands climate change',\n",
" 'license': 'NA',\n",
" 'topic': 'climate change',\n",
" 'url': 'https://catalog.data.gov/dataset/pacific-islands-climate-change-virtual-library'}\n",
"{'_id': ObjectId('5d88d9d68bc17dbb0d493d2b'),\n",
" 'description': 'potential climate change impacts on mule deer '\n",
" 'connectivity in US Northern Rockies',\n",
" 'first dataset': 'climate change in US Northern Rockies',\n",
" 'license': 'NA',\n",
" 'topic': 'climate change',\n",
" 'url': 'https://catalog.data.gov/dataset/potential-climate-change-impacts-on-mule-deer-connectivity-in-the-u-s-northern-rockies'}\n",
"{'_id': ObjectId('5d88da8b8bc17dbb0d493d2e'),\n",
" 'description': 'energy efficiency and other sector performance '\n",
" 'data',\n",
" 'first dataset': 'climate change agreements',\n",
" 'license': 'NA',\n",
" 'topic': 'climate change',\n",
" 'url': 'https://data.gov.uk/dataset/f98a442f-32c8-4c0a-8c1e-e0576b283b89/climate-change-agreements-sector-performance-data'}\n",
"{'_id': ObjectId('5d88db068bc17dbb0d493d31'),\n",
" 'description': 'sensitivity projections for canada river '\n",
" 'regions in response to climate change',\n",
" 'first dataset': 'sensitivity of river regions to climate '\n",
" 'change',\n",
" 'license': 'NA',\n",
" 'topic': 'climate change',\n",
" 'url': 'https://open.canada.ca/data/en/dataset/dec88c4f-8893-11e0-b860-6cf049291510'}\n",
"{'_id': ObjectId('5d88dcba8bc17dbb0d493d34'),\n",
" 'description': 'vegetation history of glaciated north america',\n",
" 'first dataset': 'paleo-environmental records of climate '\n",
" 'change across canada',\n",
" 'license': 'NA',\n",
" 'topic': 'climate change',\n",
" 'url': 'https://open.canada.ca/data/en/dataset/a384bada-a787-5b49-9799-f5d589e97bd3'}\n",
"{'_id': ObjectId('5d88dda98bc17dbb0d493d37'),\n",
" 'description': 'data on disturbance on spatio-temporal '\n",
" 'trajectories of biodiversity in a temperate '\n",
" 'forest landscape',\n",
" 'first dataset': 'impacts of climate change',\n",
" 'license': 'NA',\n",
" 'topic': 'climate change',\n",
" 'url': 'https://datadryad.org/stash/dataset/doi:10.5061/dryad.2d6h4'}\n",
"{'_id': ObjectId('5d88dfc58bc17dbe2090bf98'),\n",
" 'description': 'data about the sustainability of 8 major crops '\n",
" 'in bhutan',\n",
" 'first dataset': 'climate change impacts in bhutan',\n",
" 'license': 'NA',\n",
" 'topic': 'climate change',\n",
" 'url': 'https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/HGECWU'}\n",
"{'_id': ObjectId('5d88e0868bc17dbe2090bf9e'),\n",
" 'description': 'global synthesis of projected and documented '\n",
" 'effects of climate change on inland fish '\n",
" 'globally',\n",
" 'first dataset': 'effects of climate change on inland fish',\n",
" 'license': 'NA',\n",
" 'topic': 'climate change',\n",
" 'url': 'https://catalog.data.gov/dataset/global-synthesis-of-projected-and-documented-effects-of-climate-change-on-inland-fish'}\n",
"{'_id': ObjectId('5d88e0d48bc17dbe95d2a3d9'),\n",
" 'description': 'civil penalties issued under a climate change '\n",
" 'regime',\n",
" 'first dataset': 'climate change civil penalties',\n",
" 'license': 'NA',\n",
" 'topic': 'climate change',\n",
" 'url': 'https://data.gov.uk/dataset/13c0893a-049a-4608-9f9b-7f268a71f15a/climate-change-civil-penalties'}\n",
"{'_id': ObjectId('5d88e1458bc17dbecb891a25'),\n",
" 'description': 'thermal conditions of caves in the Western '\n",
" 'Alps in relation to the populations of cave '\n",
" 'spiders',\n",
" 'first dataset': 'climate change and the extinction of cave '\n",
" 'spiders',\n",
" 'license': 'NA',\n",
" 'topic': 'climate change',\n",
" 'url': 'https://datadryad.org/stash/dataset/doi:10.5061/dryad.41f8t'}\n",
"{'_id': ObjectId('5d88e1a48bc17dbefc4b583d'),\n",
" 'description': 'fossil records and migration data over 450 '\n",
" 'million years to trace climate change',\n",
" 'first dataset': 'marine invertebrate migrations',\n",
" 'license': 'NA',\n",
" 'topic': 'climate change',\n",
" 'url': 'https://datadryad.org/stash/dataset/doi:10.5061/dryad.r20d2s4'}\n",
"{'_id': ObjectId('5d88e2268bc17dbf3cd8420c'),\n",
" 'description': 'data about insects and diseases in North '\n",
" 'America that are notable agents of disturbance',\n",
" 'first dataset': 'consequences of climate change for biotic '\n",
" 'disturbances in NA forests',\n",
" 'license': 'NA',\n",
" 'topic': 'climate change',\n",
" 'url': 'https://datadryad.org/stash/dataset/doi:10.5061/dryad.cq1r1'}\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"/usr/local/lib/python3.6/dist-packages/ipykernel_launcher.py:7: DeprecationWarning: count is deprecated. Use estimated_document_count or count_documents instead. Please note that $where must be replaced by $expr, $near must be replaced by $geoWithin with $center, and $nearSphere must be replaced by $geoWithin with $centerSphere\n",
" import sys\n"
]
}
],
"source": [
"import pprint\n",
"import pymongo, json\n",
"client = pymongo.MongoClient (host=\"da1.eecs.utk.edu\")\n",
"db = client ['fdac19mp2']\n",
"coll = db ['mbutera']\n",
"pp = pprint.PrettyPrinter(indent=1,width=65)\n",
"for r in coll. find():\n",
" print(pp .pformat (r)) "
]
},
{
"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.6.7"
}
},
"nbformat": 4,
"nbformat_minor": 1
}