codeforkansascity / Neighborhood-Dashboard

We're working to help neighborhoods help themselves by giving them easy access to useful data to allow them to identify and track problem areas in their neighborhood.
https://neighborhood-dashboard.codeforkc.org/
MIT License
18 stars 9 forks source link

Update crime data beyond 2016 #142

Closed buzwells closed 5 years ago

buzwells commented 5 years ago

The following changes appear to be necessary to bring more recent data into the crime tab:

Here are a couple of issues to consider in conjunction with this update:

buzwells commented 5 years ago

Note that the latitude and longitude are listed in a parenthetical as part of the location field in the newer crime data.

buzwells commented 5 years ago

Got this working for 2018 with a very slight tweak to the field name (location_1 -> location).

buzwells commented 5 years ago

I've got the crime filters working for 2018. It looks like the field name change (location_1 ->location) occurred then (at least at the API level). Will need a little more work to switch between field names depending on year. Right now, the code is very generic and assumes a uniform structure across years.

buzwells commented 5 years ago

At last night's hack night meeting, we clarified that we want to go no more than three years back on the crime data. I now have the query working across the past three years, accounting for the field name change. Will clean up the code, commit and push soon.

buzwells commented 5 years ago

Pushed a branch with fixes to a) use 2018 as the previous year and b) allow searching only from 2016-2019. At this point, the branch is lightly tested. Will do a little more thorough testing tomorrow. If it checks out, I'll issue a pull request.