Skip to main content
etl/retail_clean.py · chapter Building a row, file 5 · 51 lines · open in the repository

What it does

Clean the US Census monthly retail sales series listed in config/retail_series.csv (downloaded from FRED) into one file. Input: raw/census/<CODE>.csv (downloaded from fred.stlouisfed.org, never committed) Output: clean/retail_sales.parquet, the retail_sales contract Columns: category, month, sales (millions of USD), mom_change, release_date To add a series, add a row to config/retail_series.csv and download its CSV. Run from anywhere: python3 etl/retail_clean.py

Connections

Uses: src/common/contracts.py, src/common/settings.py, src/common/study.py

Source

etl/retail_clean.py