Skip to content

Tig42/Socrata-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Socrata API

For this project you will use requests package and the SODA API to access data through https://data.nashville.gov/. We'll start out with something familiar, the Top 500 Monthly Searches, then pull in different datasets further on. You will make different API requests for each individual question.

Each dataset has its own api endpoint. You can find the endpoint for a dataset by clicking on the API button in the top right of the dataset screen, then copying the API Endpoint. The default output is JSON, which you can leave unchanged:

api_endpoint

Each API is different, so it is very important to read the documentation for each API to know how to use it properly. The documentation for the SODA API is here. It is HIGHLY RECOMMENDED that you read the documentation before making any requests, then do deeper dives into specific use cases when questions require. NOTE that the examples in the documentation don't use the requests package. You will need to look at the examples and figure out which things go in the url and which things go in the params.

Questions

  1. Make an API request that returns the months where "fire" was searched in 2016. Which month had the most searches?

  2. Make an API request that returns all the times a query was run more than 100 times in a month. How many times did this occur?

  3. Make another API request that returns all the times "codes" was searched more than 100 times in a month. How many times did this occur?

  4. Make an API request that returns the entire Top 500 Monthly Searches dataset. Make a chart that shows the number of times "maps" was searched in a month across the entire time frame.

Stretch Questions

  1. Make an API request to pull back all the data from hubNashville (311) Service Requests (check to see how many rows you can return in a single request). Compare it to the Top 500 Monthly Searches data set. What do you observe? (This is open-ended, there isn't a specific answer for this one)

  2. Find 2 new data sets on data.nashville.gov, make API requests to pull the data, and do an analysis that combines the data sets.

Bonus

  1. Socrata is used by many cities, states, and federal organizations. Find additional datasets through Socrata's Open Data Network and do an analysis comparing them to Nashville or each other.

Show and Tell

At the end of the project you will present some general insights, visualizations, or other finding from any part of the project. This will be informal (showing your Jupyter notebook is fine, no need to make a powerpoint) and should be no more than 5 min. If you had challenges making your visualizations, then it is fine to discuss your experience working with the API and what you were intending to show.

About

socrata_api-Tig42 created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published