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

Variable calculation bugs #35

Closed SPTKL closed 3 years ago

SPTKL commented 3 years ago

Base variable in metadata = "nan"

if base_variable = nan, then do not calculate p, z -> default to NULL?

  • [x] grnorntpd NTA
  • [x] grnorntpd cd
  • [x] smpntc NTA
  • [x] smpntc cd
  • [x] grpintc NTA
  • [x] grpintc cd
  • [x] nmsmpntc NTA
  • [x] nmsmpntc cd

default p, z => null, no base_variable needed

https://github.com/NYCPlanning/db-acs/blob/834b15dd77ba330ac526f886df701c1d313b71ca/03.1_special_calculations.py#L184-L188

Other #37

hu1 is a base variable, and city/tract are non-aggregated geography, so by current logic they are going through calculate_e_m_p_z

for some reason, column e is recognized as an object instead of float image

and based on error message, it seems we have mixed string types in column e

SPTKL commented 3 years ago

Tract level calculation e = m, there must be a typo somewhere image this also has down stream impact on NTA/CD calculation

update: no longer an issue