NYCPlanning / db-factfinder

data ETL for population fact finder (decennial + acs)
https://nycplanning.github.io/db-factfinder/factfinder/
MIT License
2 stars 3 forks source link

Inflation factor #162

Closed SPTKL closed 3 years ago

SPTKL commented 3 years ago

Labs has complete logic and the variables that needs to get inflated here https://github.com/NYCPlanning/labs-factfinder-api/blob/develop/special-calculations/economic.js https://github.com/NYCPlanning/labs-factfinder-api/blob/develop/special-calculations/housing.js https://github.com/NYCPlanning/labs-factfinder-api/blob/develop/special-calculations/data/constants.js https://github.com/NYCPlanning/labs-factfinder-api/blob/d5729f8d2ba51b507edcd5e2856958ba6173f31d/utils/data-processor.js

Inflation factor: 1.1751

E: If mdvle (not inflated) = 1,000,000 then use 1,175,000 otherwise round((mdvle * 1.1751),0)
M: If mdvle (not inflated) = 1,000,000 then null, if mdvle is 0 or null then null, otherwise round((mdvlm * 1.1751),0)
C: remains the same
P: null
Z: null
--for variables with bottom-coding add logic (like top-coding) to formula

Inflated Variables
•   Housing: 
o   MdVl
o   MdGR
•   Economic
o   MdHHInc
o   MnHHInc
o   MdFamInc
o   MdNFInc
o   PerCapInc
o   MdEWrk
o   MdEMFTWrk
o   MdEFFTWrk

Top-coding for medians:
Variable    Top-coded   Inflated top-coded      Bottom-coded    Inflated bottom-coded
MdVl    1,000,000   1,175,000       -   -
MdGR    2,000   2,350       -   -
MdHHInc 200,000 235,000     9,999   12,000
MdFamInc    200,000 235,000     9,999   12,000
MdNFInc 200,000 235,000     9,999   12,000
MdEWrk  100,000 118,000     2,499   2,900
MdEMFTWrk   100,000 118,000     2,499   2,900
MdEFFTWrk   100,000 118,000     2,499   2,900
SPTKL commented 3 years ago

closing, after meeting: labs will implement inflation everywhere