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

Workflow to transform 2010 to 2020 geographies #100

Closed AmandaDoyle closed 3 years ago

AmandaDoyle commented 3 years ago

2019 ACS data will be released in 2020 geographies. Create workflow to transform 2019 ACS data from 2010 to 2020 geographies

mgraber commented 3 years ago

Conversion formulas

(Estimate in 2020 CT) = (Estimate in 2010 CT) * (Ratio 2010 CT to 2020 CT)

As implemented:

If (Ratio 2010 CT to 2020 CT) = 1, then (MOE in 2020 CT) = (MOE in 2010 CT) Else if (Estimate in 2020 CT) = 0, then (MOE in 2020 CT) = NULL Else if ((Ratio 2010 CT to 2020 CT)^(0.56901))*7.96309 ≥ 100, then (MOE in 2020 CT) = (MOE in 2010 CT) Else (MOE in 2020 CT) = (((Ratio 2010 CT to 2020 CT)^(0.56901))7.96309)/100) (Estimate in 2010 CT)

As written in the draft tab:

If (Ratio 2010 CT to 2020 CT) = 1, then (MOE in 2020 CT) = (MOE in 2010 CT) Else if (Estimate in 2020 CT) = 0, then (MOE in 2020 CT) = NULL Else if ((Ratio 2010 CT to 2020 CT)^(0.56901))7.96309 ≥ 100, then (MOE in 2020 CT) = (MOE in 2010 CT) Else (MOE in 2020 CT) = (((Ratio 2010 CT to 2020 CT)^(0.56901))7.96309)/100) * (MOE in 2010 CT)

This is the correct formula

As written in the MOE formula tab:

If (Ratio 2010 CT to 2020 CT) = 1, then (MOE in 2020 CT) = (MOE in 2010 CT) Else if (Estimate in 2010 CT) = 0, then (MOE in 2020 CT) = NULL Else if ((Ratio 2010 CT to 2020 CT)^(0.56901))*7.96309 ≥ 100, then (MOE in 2020 CT) = (MOE in 2010 CT) Else (MOE in 2020 CT) = (((Ratio 2010 CT to 2020 CT)^(0.56901))7.96309)/100) (MOE in 2010 CT)

SPTKL commented 3 years ago

Notes for myself:

SPTKL commented 3 years ago

implemented