This is the front-end of an open-source project maintained by DataKind DC in partnership with the Red Cross Home Fire Preparedness Campaign. See the modeling repo for more information on the data used here. This web tool presents risk scores at the Census tract level in an interactive map and table for download to help Red Cross employees and volunteers target areas for smoke alarm installs.
Read more about the models in the documentation.
See issues to view tasks that need help. Please feel free to comment with any questions.
Interested in helping? Issues or pull requests are welcome! See below for email addresses to message us directly. Join the DataKind DC meetup group to find out about work sessions and new projects.
- DESIGN!: designing the map itself (mainly Mapbox Studio) as well as general UI/UX design for the tool
- General mapping and data visualization skills
- Front-end development: HTML, CS, JS for general functionality and appearance and mapbox gl js for interacting with the map
- General data munging: joining data to shapefiles, clipping and filtering, saving as .zip files, making csv crosswalks, eventually getting and saving Census tract demographic information
- Shapefiles are saved in the shapefiles/ directory, which is gitignored due to size
- Download national tract-level shapefile, clipped to water boundaries and save .zip in shapefiles/ directory
- Then, run scripts/downloadShapefiles.sh to set up the directory, download Red Cross regions, counties, and unzip shapefiles as needed
$ bash scripts/downloadShapefiles.sh
- More Red Cross shapefiles and boundary definitions source
- Run scripts/retrieveCensus.R to download Census county & tract-level data from the American Community Survey API
- Run scripts/mergedatashp.R to read latest risk scores directly from the modeling repo, format, join to ACS data and shapefiles, and export new shapefiles & .zips
- Replace files in Mapbox using the Mapbox upload library CLI - this requires you to have a secret auth token with upload access
$ npm install --global mapbox-upload
$ bash scripts/updateMapbox.sh
- Alternatively, you can update the files from the Mapbox website by manually replacing them
For conversations/questions that are awkward to carry out using GitHub issues, send an email to DataKind Red Cross core volunteers Hannah Recht ([email protected]) and Andrew Brooks ([email protected]) and one of us will follow up with you.