sfbrigade / sf-crime-data

Search SFPD incidents from SF OpenData with focus on campus safety.
http://sfcrimedata.org
MIT License
26 stars 39 forks source link

Add Campus Safety Category to CSV Download (fixes #108) #119

Closed squanto closed 7 years ago

squanto commented 7 years ago

https://github.com/sfbrigade/sf-crime-data/issues/108

Try it out at: http://hugomelo.com/sf-crime-data/

paulhennings commented 7 years ago

Hugo, Please send a link to your personal hosting where we can test this change (second set of eyes).

paulhennings commented 7 years ago

There seems to be a sequence or state problem here. You have to click the Download CSV button two times to get the current information. Recreate as follows:

  1. Launch http://hugomelo.com/sf-crime-data/ (default search for 267 Buena Vista Ave E displays).
  2. Click Download CSV. Nothing happens.
  3. Click Download CSV a second time. You get the correct data download. (Note number of rows returned. For 08/04/2017 - 09/03/2017, 42 rows are returned for the default search both on screen and in CSV download).
  4. Do a new search by drawing a polygon on the map.
  5. Click Download CSV. The download contains the search data from the prior search (default search for 267 Buena Vista Ave E).
  6. Click Download CSV a second time. The current (polygon) search data downloads. Same thing happens with a radial search, so I don't think it's unique to the polygon/rectangle logic path v. the radial logic.

    Closing without pulling, to clear the path for evaluation of other pull requests. Please submit a pull request again after testing good. Be sure to merge in any other changes to the production gh-pages as we go forward. Thanks!