-
Notifications
You must be signed in to change notification settings - Fork 0
OFM Block Estimates & Parcelization
Christy Lam edited this page Oct 24, 2023
·
3 revisions
To get OFM block estimates into Elmer requires a 2-R-script process. To distribute block estimates (a.k.a. parcelize) requires the 2 R scripts mentioned above and running a python script for each block estimate year of interest.
- Convert raw OFM block estimates from online to .rds for storage on network (Prep for storage in Elmer)
https://github.com/psrc/data-science/blob/master/ofm/convert_format_saep.R
- Download latest OFM vintage into a sub-directory in
J:/OtherData/OFM/SAEP
. Follow naming convention; may include sub-directories for quality checks. - The script will munge and convert raw csv versions into an .rds file to be read in R.
- Export to Elmer
https://github.com/psrc/Elmer/blob/master/ETLScripts/OFM/elmer_prep.R
- This script will re-format the .rds version of the OFM vintage into a compatible format for Elmer and place it in the staging area. Notify Chris Peak when the process is done. He will formalize it and provide a publication id to be used when querying Elmer for OFM block estimates.
- Parcelize block estimates
https://github.com/psrc/travel-modeling/blob/master/parcelizer/parcelization.py
- Select a vintage and a range of block estimate years to parcelize (distribute block estimates to individual parcels). The script will run a loop, returning a shapefile of a single block estimate year for each year in the range.
- NOTE: A vintage can have up to 10 years worth of estimates. Any estimate year within a post-Censal decade (bookended by the Decennial Census) can be updated by OFM. Run parcelizer script for each year in the vintage.