Data4Democracy / usa-dashboard

A dashboard of key metrics for the USA
69 stars 27 forks source link

Philadelphia Crime Data #7

Open seanjtaylor opened 7 years ago

MSilb7 commented 7 years ago

Philly Open Data - Crime:

https://www.opendataphilly.org/dataset/crime-incidents

MSilb7 commented 7 years ago

Update - API help for Philly Data here: https://dev.socrata.com/foundry/data.phila.gov/sspu-uyfa

I have a python script that pulls crime type and the count, but it's only pulling the first 1000 records. I'll see if I can find how to remove the limit (this is my first time working with an API).

wwymak commented 7 years ago

you can pass in e.g. $limit=50000 (in theory the newest version of the api should let you pull in unlimted records but Ihaven't got that bit working yet). If you do have more than 50000 records you paginate with the $offset query param.

see https://dev.socrata.com/docs/paging.html

MSilb7 commented 7 years ago

Philadelphia Python Notebook:

https://github.com/MSilb7/DataForDemocracy/blob/master/PhiladelphiaExtract.ipynb

seanjtaylor commented 7 years ago

Looks good! phi_homicides

MSilb7 commented 7 years ago

Interesting: Week 10: 3/7 - 3/13 Week 29: 7/18 - 7/24 Week 47: 11/21-11/27