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

Exclude special vars from setting base var p to 100 #204

Closed mgraber closed 3 years ago

SPTKL commented 3 years ago

is this confirmed with population?

mgraber commented 3 years ago

@SPTKL no, not yet.

SPTKL commented 3 years ago

@mgraber based on labs' tool tips for these variables, it makes sense to exclude special vars from setting base var p to 100 Also it seems like maybe we should set the P and Z to null?

percapinc: percapita income mntrvtm: Aggregate travel time to work, divided by workers 16 years and over who did not work at home mnhhinc: Aggregate household income in the past 12 months, divided by total households avghhsooc: Population in owner-occupied housing units, divided by number of owner-occupied housing units avghhsroc: Population in renter-occupied housing units, divided by number of renter-occupied housing units avghhsz: Household population divided by number of households avgfmsz: Population in family households, minus nonrelatives in family households, divided by number of family households rntvacrt: Number of vacant units “for rent,” divided by sum of renter-occupied units, vacant units that are “for rent,” and vacant units that have been rented but not yet occupied. Quotient is multiplied by 100. hovacrt: Number of vacant units “for sale only,” divided by sum of owner-occupied units, vacant units that are “for sale only,” and vacant units that have been sold but not yet occupied. Quotient is multiplied by 100. wrkrnothm: this is a intermediary special variable, never displayed

select
    distinct p, z
from pff_acs."sample-Y2019-G2010_to_2020"
where lower(pff_variable) in (
'percapinc',
'mntrvtm','mnhhinc', 'avghhsooc', 'avghhsroc',
'avghhsz', 'avgfmsz', 'rntvacrt', 'hovacrt',
'wrkrnothm',
'rntvacrt', 'hovacrt')

all null