Fire Risk Analysis
This is a set of scripts for a machine learning pipeline to predict structure fire risk and inform fire inspection prioritization decisions. A full technical report can be found here.
Runs all three python scripts listed below in succession.
Scrapes WPRDC for:
- City of Pittsburgh property data ("pittdata.csv")
- City of Pittsburgh parcel data ("parcels.csv")
- Permits, Licenses, and Inspections data ("pli.csv")
Runs the risk prediction model, using:
- the three datasets from WPRDC
- Fire Incident data from PBF (public, aggregated version available at WPRDC. However, please note that due to privacy concerns, the most detailed fire incident data that the model is trained on are not publicly accessible, but the aggregated version of the incident data is available, at the block-level, instead of the address-level. At the moment, this script is not able to run on the aggregated, block-level data.
Takes the output of the risk model, and merges each property's risk score with the rest of the property data in pittdata and parcels, sending the output to the Burgh's Eye View directory for map and dashboard visualization (on a private instance developed for Bureau of Fire inspectors; public version of BEV available here)
ui.R and server.R
Takes the output of the risk scores, merged with property data, and visualizes them in an R Shiny dashboard, for inspectors and fire chiefs to view property risk levels, by property type, neighborhood, and fire district.
All of the packages you'll need to install for the scripts to run.
- Michael Madaio
- Geoffrey Arnold
- Bhavkaran Singh
- Qianyi Hu
- Nathan Kuo
- Jason Batts