data ETL for population fact finder (decennial + acs)
from factfinder.calculate import Calculate
calculate = Calculate( api_key='XXXXXXXXXXXXXXX', year=2019, source="acs", geography='2010_to_2020' )
> or for decennial calculations:
```python
calculate = Calculate(
api_key='XXXXXXXXXXXXXXX',
year=2010,
source="decennial",
geography='2010_to_2020'
)
Calling
calculate
- Downloads necessary census variables,
- Aggregates using appropriate technique (both vertically and horizontally)
- Calculates c, e, m, p, z fields
- Rounds calculated values based on standards in the metadata
- Cleans edge-cases of 0 and null values
df = calculate('pop', 'tract') df = calculate('pop', 'borough') df = calculate('pop', 'city') df = calculate('pop', 'NTA') df = calculate('mdage', 'CDTA')