Skip to content
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
225 changes: 225 additions & 0 deletions jlavall1.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,225 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<pymongo.results.InsertOneResult at 0x7fcb4008b888>"
]
},
"execution_count": 3,
"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 ['jlavall1']\n",
"\n",
"# for each dataset\n",
"coll.insert_one ( { 'Topic':'NBA Team Defense Stats', 'Title': '2018-2019', 'license': 'NA', 'description': 'Team Defense stats for 2018-2019 Season', 'urls': [ 'https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2018-19&SeasonType=Regular%20Season' ] } )\n",
"coll.insert_one ( { 'Topic':'NBA Team Defense Stats', 'Title': '2017-2018', 'license': 'NA', 'description': 'Team Defense stats for 2017-2018 Season', 'urls': [ 'https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2017-18&SeasonType=Regular%20Season' ] } )\n",
"coll.insert_one ( { 'Topic':'NBA Team Defense Stats', 'Title': '2016-2017', 'license': 'NA', 'description': 'Team Defense stats for 2016-2017 Season', 'urls': [ 'https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2016-17&SeasonType=Regular%20Season' ] } )\n",
"coll.insert_one ( { 'Topic':'NBA Team Defense Stats', 'Title': '2015-2016', 'license': 'NA', 'description': 'Team Defense stats for 2015-2016 Season', 'urls': [ 'https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2015-16&SeasonType=Regular%20Season' ] } )\n",
"coll.insert_one ( { 'Topic':'NBA Team Defense Stats', 'Title': '2014-2015', 'license': 'NA', 'description': 'Team Defense stats for 2014-2015 Season', 'urls': [ 'https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2014-15&SeasonType=Regular%20Season' ] } )\n",
"coll.insert_one ( { 'Topic':'NBA Team Defense Stats', 'Title': '2013-2014', 'license': 'NA', 'description': 'Team Defense stats for 2013-2014 Season', 'urls': [ 'https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2013-14&SeasonType=Regular%20Season' ] } )\n",
"coll.insert_one ( { 'Topic':'NBA Team Defense Stats', 'Title': '2012-2013', 'license': 'NA', 'description': 'Team Defense stats for 2012-2013 Season', 'urls': [ 'https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2012-13&SeasonType=Regular%20Season' ] } )\n",
"coll.insert_one ( { 'Topic':'NBA Team Defense Stats', 'Title': '2011-2012', 'license': 'NA', 'description': 'Team Defense stats for 2011-2012 Season', 'urls': [ 'https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2011-12&SeasonType=Regular%20Season' ] } )\n",
"coll.insert_one ( { 'Topic':'NBA Team Defense Stats', 'Title': '2010-2011', 'license': 'NA', 'description': 'Team Defense stats for 2010-2011 Season', 'urls': [ 'https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2010-11&SeasonType=Regular%20Season' ] } )\n",
"coll.insert_one ( { 'Topic':'NBA Team Defense Stats', 'Title': '2009-2010', 'license': 'NA', 'description': 'Team Defense stats for 2009-2010 Season', 'urls': [ 'https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2009-10&SeasonType=Regular%20Season' ] } )\n",
"coll.insert_one ( { 'Topic':'NBA Team Defense Stats', 'Title': '2008-2009', 'license': 'NA', 'description': 'Team Defense stats for 2008-2009 Season', 'urls': [ 'https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2008-09&SeasonType=Regular%20Season' ] } )\n",
"coll.insert_one ( { 'Topic':'NBA Team Defense Stats', 'Title': '2007-2008', 'license': 'NA', 'description': 'Team Defense stats for 2007-2008 Season', 'urls': [ 'https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2007-08&SeasonType=Regular%20Season' ] } )\n",
"coll.insert_one ( { 'Topic':'NBA Team Defense Stats', 'Title': '2006-2007', 'license': 'NA', 'description': 'Team Defense stats for 2006-2007 Season', 'urls': [ 'https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2006-07&SeasonType=Regular%20Season' ] } )\n",
"coll.insert_one ( { 'Topic':'NBA Team Defense Stats', 'Title': '2005-2006', 'license': 'NA', 'description': 'Team Defense stats for 2005-2006 Season', 'urls': [ 'https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2005-06&SeasonType=Regular%20Season' ] } )\n",
"coll.insert_one ( { 'Topic':'NBA Team Defense Stats', 'Title': '2004-2005', 'license': 'NA', 'description': 'Team Defense stats for 2004-2005 Season', 'urls': [ 'https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2004-05&SeasonType=Regular%20Season' ] } )\n",
"coll.insert_one ( { 'Topic':'NBA Team Defense Stats', 'Title': '2003-2004', 'license': 'NA', 'description': 'Team Defense stats for 2003-2004 Season', 'urls': [ 'https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2003-04&SeasonType=Regular%20Season' ] } )\n",
"coll.insert_one ( { 'Topic':'NBA Team Defense Stats', 'Title': '2002-2003', 'license': 'NA', 'description': 'Team Defense stats for 2002-2003 Season', 'urls': [ 'https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2002-03&SeasonType=Regular%20Season' ] } )\n",
"coll.insert_one ( { 'Topic':'NBA Team Defense Stats', 'Title': '2001-2002', 'license': 'NA', 'description': 'Team Defense stats for 2001-2002 Season', 'urls': [ 'https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2001-02&SeasonType=Regular%20Season' ] } )\n",
"coll.insert_one ( { 'Topic':'NBA Team Defense Stats', 'Title': '2000-2001', 'license': 'NA', 'description': 'Team Defense stats for 2000-2001 Season', 'urls': [ 'https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2000-01&SeasonType=Regular%20Season' ] } )\n",
"coll.insert_one ( { 'Topic':'NBA Team Defense Stats', 'Title': '1999-2000', 'license': 'NA', 'description': 'Team Defense stats for 1999-2000 Season', 'urls': [ 'https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=1999-00&SeasonType=Regular%20Season' ] } )"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'Title': '2018-2019',\n",
" 'Topic': 'NBA Team Defense Stats',\n",
" '_id': ObjectId('5d88175e2a39947906f91d63'),\n",
" 'description': 'Team Defense stats for 2018-2019 Season',\n",
" 'license': 'NA',\n",
" 'urls': ['https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2018-19&SeasonType=Regular%20Season']}\n",
"{'Title': '2017-2018',\n",
" 'Topic': 'NBA Team Defense Stats',\n",
" '_id': ObjectId('5d88175e2a39947906f91d64'),\n",
" 'description': 'Team Defense stats for 2017-2018 Season',\n",
" 'license': 'NA',\n",
" 'urls': ['https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2017-18&SeasonType=Regular%20Season']}\n",
"{'Title': '2016-2017',\n",
" 'Topic': 'NBA Team Defense Stats',\n",
" '_id': ObjectId('5d88175e2a39947906f91d65'),\n",
" 'description': 'Team Defense stats for 2016-2017 Season',\n",
" 'license': 'NA',\n",
" 'urls': ['https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2016-17&SeasonType=Regular%20Season']}\n",
"{'Title': '2015-2016',\n",
" 'Topic': 'NBA Team Defense Stats',\n",
" '_id': ObjectId('5d88175e2a39947906f91d66'),\n",
" 'description': 'Team Defense stats for 2015-2016 Season',\n",
" 'license': 'NA',\n",
" 'urls': ['https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2015-16&SeasonType=Regular%20Season']}\n",
"{'Title': '2014-2015',\n",
" 'Topic': 'NBA Team Defense Stats',\n",
" '_id': ObjectId('5d88175e2a39947906f91d67'),\n",
" 'description': 'Team Defense stats for 2014-2015 Season',\n",
" 'license': 'NA',\n",
" 'urls': ['https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2014-15&SeasonType=Regular%20Season']}\n",
"{'Title': '2013-2014',\n",
" 'Topic': 'NBA Team Defense Stats',\n",
" '_id': ObjectId('5d88175e2a39947906f91d68'),\n",
" 'description': 'Team Defense stats for 2013-2014 Season',\n",
" 'license': 'NA',\n",
" 'urls': ['https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2013-14&SeasonType=Regular%20Season']}\n",
"{'Title': '2012-2013',\n",
" 'Topic': 'NBA Team Defense Stats',\n",
" '_id': ObjectId('5d88175e2a39947906f91d69'),\n",
" 'description': 'Team Defense stats for 2012-2013 Season',\n",
" 'license': 'NA',\n",
" 'urls': ['https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2012-13&SeasonType=Regular%20Season']}\n",
"{'Title': '2011-2012',\n",
" 'Topic': 'NBA Team Defense Stats',\n",
" '_id': ObjectId('5d88175e2a39947906f91d6a'),\n",
" 'description': 'Team Defense stats for 2011-2012 Season',\n",
" 'license': 'NA',\n",
" 'urls': ['https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2011-12&SeasonType=Regular%20Season']}\n",
"{'Title': '2010-2011',\n",
" 'Topic': 'NBA Team Defense Stats',\n",
" '_id': ObjectId('5d88175e2a39947906f91d6b'),\n",
" 'description': 'Team Defense stats for 2010-2011 Season',\n",
" 'license': 'NA',\n",
" 'urls': ['https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2010-11&SeasonType=Regular%20Season']}\n",
"{'Title': '2009-2010',\n",
" 'Topic': 'NBA Team Defense Stats',\n",
" '_id': ObjectId('5d88175e2a39947906f91d6c'),\n",
" 'description': 'Team Defense stats for 2009-2010 Season',\n",
" 'license': 'NA',\n",
" 'urls': ['https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2009-10&SeasonType=Regular%20Season']}\n",
"{'Title': '2008-2009',\n",
" 'Topic': 'NBA Team Defense Stats',\n",
" '_id': ObjectId('5d88175e2a39947906f91d6d'),\n",
" 'description': 'Team Defense stats for 2008-2009 Season',\n",
" 'license': 'NA',\n",
" 'urls': ['https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2008-09&SeasonType=Regular%20Season']}\n",
"{'Title': '2007-2008',\n",
" 'Topic': 'NBA Team Defense Stats',\n",
" '_id': ObjectId('5d88175e2a39947906f91d6e'),\n",
" 'description': 'Team Defense stats for 2007-2008 Season',\n",
" 'license': 'NA',\n",
" 'urls': ['https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2007-08&SeasonType=Regular%20Season']}\n",
"{'Title': '2006-2007',\n",
" 'Topic': 'NBA Team Defense Stats',\n",
" '_id': ObjectId('5d88175e2a39947906f91d6f'),\n",
" 'description': 'Team Defense stats for 2006-2007 Season',\n",
" 'license': 'NA',\n",
" 'urls': ['https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2006-07&SeasonType=Regular%20Season']}\n",
"{'Title': '2005-2006',\n",
" 'Topic': 'NBA Team Defense Stats',\n",
" '_id': ObjectId('5d88175e2a39947906f91d70'),\n",
" 'description': 'Team Defense stats for 2005-2006 Season',\n",
" 'license': 'NA',\n",
" 'urls': ['https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2005-06&SeasonType=Regular%20Season']}\n",
"{'Title': '2004-2005',\n",
" 'Topic': 'NBA Team Defense Stats',\n",
" '_id': ObjectId('5d88175e2a39947906f91d71'),\n",
" 'description': 'Team Defense stats for 2004-2005 Season',\n",
" 'license': 'NA',\n",
" 'urls': ['https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2004-05&SeasonType=Regular%20Season']}\n",
"{'Title': '2003-2004',\n",
" 'Topic': 'NBA Team Defense Stats',\n",
" '_id': ObjectId('5d88175e2a39947906f91d72'),\n",
" 'description': 'Team Defense stats for 2003-2004 Season',\n",
" 'license': 'NA',\n",
" 'urls': ['https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2003-04&SeasonType=Regular%20Season']}\n",
"{'Title': '2002-2003',\n",
" 'Topic': 'NBA Team Defense Stats',\n",
" '_id': ObjectId('5d88175e2a39947906f91d73'),\n",
" 'description': 'Team Defense stats for 2002-2003 Season',\n",
" 'license': 'NA',\n",
" 'urls': ['https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2002-03&SeasonType=Regular%20Season']}\n",
"{'Title': '2001-2002',\n",
" 'Topic': 'NBA Team Defense Stats',\n",
" '_id': ObjectId('5d88175e2a39947906f91d74'),\n",
" 'description': 'Team Defense stats for 2001-2002 Season',\n",
" 'license': 'NA',\n",
" 'urls': ['https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2001-02&SeasonType=Regular%20Season']}\n",
"{'Title': '2000-2001',\n",
" 'Topic': 'NBA Team Defense Stats',\n",
" '_id': ObjectId('5d88175e2a39947906f91d75'),\n",
" 'description': 'Team Defense stats for 2000-2001 Season',\n",
" 'license': 'NA',\n",
" 'urls': ['https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=2000-01&SeasonType=Regular%20Season']}\n",
"{'Title': '1999-2000',\n",
" 'Topic': 'NBA Team Defense Stats',\n",
" '_id': ObjectId('5d88175e2a39947906f91d76'),\n",
" 'description': 'Team Defense stats for 1999-2000 Season',\n",
" 'license': 'NA',\n",
" 'urls': ['https://stats.nba.com/teams/defense/?sort=W&dir=-1&Season=1999-00&SeasonType=Regular%20Season']}\n"
]
}
],
"source": [
"import pprint\n",
"import pymongo, json\n",
"client = pymongo.MongoClient (host=\"da1.eecs.utk.edu\")\n",
"db = client ['fdac19mp2']\n",
"coll = db ['jlavall1']\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": 2
}