Modeling structure fire risk to inform fire inspections
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
FireRisk_Dashboard
Residential_Risk_Model
.gitignore
LICENSE
README.md
Run_Model.sh
getdata.py
merger.py
requirements.txt
riskmodel.py

README.md

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.

Run_Model.sh

Runs all three python scripts listed below in succession.

getdata.py

Scrapes WPRDC for:

  • City of Pittsburgh property data ("pittdata.csv")
  • City of Pittsburgh parcel data ("parcels.csv")
  • Permits, Licenses, and Inspections data ("pli.csv")

riskmodel.py

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.

merger.py

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.

requirements.txt

All of the packages you'll need to install for the scripts to run.

Authors:

  • Michael Madaio
  • Geoffrey Arnold
  • Bhavkaran Singh
  • Qianyi Hu
  • Nathan Kuo
  • Jason Batts