2. Introducing an Awesome Data Set
•Scraped basketball-reference.com
•Mad props to NPM module Cheerio
•Box scores for all 31,686 NBA games since 1985
•Download: http://bit.ly/1jlgs9u via S3
•Untar and run mongorestore
*
14. Query Basics - .sort() and .limit()
•What are the 5 highest point totals for a losing
team?
*
15. Query Basics - .sort() and .limit()
•What are the 5 highest point totals for a losing
team?
*
16. Aggregation
•Similar to SQL group by
•Filters and transforms data in pipeline stages
•Stages are chainable
•Accessible via the .aggregate() function in shell
*
17. Aggregation - Lakers Season PPG
•How many points did the Lakers average in games
they won in the 2008-2009 season?
*
18. Aggregation - Lakers Season PPG
•How many points did the Lakers average in games
they won in the 2008-2009 season?
*
19. Aggregation - $sort and $limit
•Compute the teams with the 5 best records in the
1999-2000 season
*