hackoregon / emergency-response

Simulations, Models, and Visualizations of Portland Fire and Rescue data
11 stars 10 forks source link

Develop tool to allocate Census Block/Tract values to FMA boundaries #30

Closed russellgould closed 7 years ago

russellgould commented 7 years ago

Develop tool to allocate values to from Census spatial data to FMA boundaries using an area-weighted proportioning approach.

This will initially be developed using spatial queries in PostGres and PostGIS.

Output may be a lookup table that ties Census Tract ID's to Fire Management Areas and would include a value that represents the area Census Tracts that overlap a coincident Fire Management Area boundary.

rcallihan commented 7 years ago

Simple workflow for creating a table with the area weightings:

Target = FMA Source = Census Blocks (Only those that intersect with FMA's)

1) Calculate Area on the Target Data

2) Spatial Union the Target and Source Data

3) Calculate Area on the Union Layer

4) Aggregate (via sum) area value using by on Target ID AND Source ID.

5) Calc "Summed Source Area / Target Area"

rcallihan commented 7 years ago

Here's the methodology from a past HO project using PG queries. This should work for us as well.

https://github.com/hackoregon/urbandev-etl/blob/master/convert/POSTGIS_AREAL_INTERPOLATION_README.md

sky-t commented 7 years ago

Task list for next week:

sky-t commented 7 years ago

This task is now complete. The lookup tables are: fcb_proportion and fmac_proportion