MayOneUS/homepage_redesign — pull request #96 by jueyang (2014-07-10 18:30:50+00:00)
Title: Automate map update

This PR includes:

1. Automated map update
2. Better indexing for donation amount and count

For No.1, map generation is moved to the browser, instead of using Tilemill. This makes it easy to update when `pledges.csv` is updated. The base map now uses Stamen's Toner tiles, which is free and does not require a mapbox account.

I wrote a basic pandas script to aggregate individual donations by zipcode based on `pledges.csv`. The file is located at `data/countPledges.py`. It generates `pledges_for_map.csv`.

Here's the workflow to update the map/chart:

1. produce new `pledges.csv` and replace the old one in `data` folder
2. run `python countPledges.py` in terminal (or whatever tool you use)

That's it :)

If for any reason you need to change the name of the file, make sure you change the csv names accordingly in the `histogram.html` code: [this line](https://github.com/developmentseed/homepage_redesign/compare/viz?expand=1#diff-0def5d7f6b02c0824679375e642c7e94R110) and [this line](https://github.com/developmentseed/homepage_redesign/compare/viz?expand=1#diff-0def5d7f6b02c0824679375e642c7e94R194).