fpdcc / ccfp-asset-dashboard

CCFP Asset Dashboard
0 stars 1 forks source link

calculate political boundaries when an asset is saved + incorporate feature in project overview ui #143

Closed smcalilly closed 2 years ago

smcalilly commented 2 years ago

Overview

For:

Notes

How do we calculate this for production?

All of the projects on the production database already have districts associated with them. New relationships won't be created until they save some assets. Do we delete these existing relationships, or what?

I'm using a new text editor and it appears that I have a plugin installed that removed indentations on lines with no code. Sorry for the extra diff!

Testing Instructions

fgregg commented 2 years ago

The house and senate district boundaries in their DB are dated 2017 and already out of date. Perhaps, regarding the geojson comment, you were thinking that we would download the latest political boundaries as geojson? If we want to do that, the import script will be easily adaptable.

yeah, it doesn't really make sense to have their DB to be the source of truth, and it's pretty easy to store these things statically

smcalilly commented 2 years ago

yeah, it doesn't really make sense to have their DB to be the source of truth, and it's pretty easy to store these things statically

ok cool. two questions @fgregg:

  1. so do you want to use public data for all the zones and districts, or only state political boundaries? we need these boundaries:
    • house district
    • senate district
    • commissioner district
    • zones

i think zones might make sense to get from their database? i've found a public map for commissioner but haven't gone deep enough to find a geojson/shapefile source — that table doesn't have a year in their database.

  1. do you want me to do a makefile import process for getting the public data, or just grab them by hand and save in the repo?
fgregg commented 2 years ago

i think it's fine to do it by hand, as long as you document in the README where you got them. for the zones, let's get the data from their database, but then save it as a geojson file so it's consistent with the others.

smcalilly commented 2 years ago

I got the geo data from public sources. I went ahead and wrote a makefile for the import script, it didn't take much time.

smcalilly commented 2 years ago

@fgregg thanks! it would've been much messier without your signals recommendation :~)