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

Python package refactor #103

Closed mgraber closed 3 years ago

mgraber commented 3 years ago

Brainstorming

Download class

Purpose: make calls to census API Methods: get_geoquery

Convert class

Purpose: take data pulled from the download class and convert 2010 geographies to 2020 geographies if necessary

Aggregate class

Purpose: calculate e & m for given geography and variable, using normal, median, or special methods

Proportion class

Purpose: calculate p & z

Clean class

Purpose: perform rounding and overwriting

SPTKL commented 3 years ago
import importlib
AggregatedGeography = importlib.import_module(f'geography.{self.geography}.AggregatedGeography')
geography = AggregatedGeography()

for geography, we should have a different module for each year, so that we don't have to worry about lookup_geo.csv incompatibilities image