An end-to-end data pipeline for U.S. Bureau of Economic Analysis (BEA) data:
- Ingest economic releases from the BEA API
- Transform datasets with dbt
- Store in a SQL database (Postgres or DuckDB)
- Visualize in Apache Superset with prebuilt dashboards
This project is a hands-on demo of modern data stack tooling: ingestion + transformation + BI.
- 🔄 Automated data ingestion from BEA API (GDP, trade, PCE, etc.)
- 🧹 dbt models for cleaning, staging, and aggregating BEA releases
- 📦 Database integration with Postgres (default) or DuckDB
- 📊 Prebuilt Superset dashboards for macroeconomic analysis
- 🐳 Easy setup with
docker-compose(Superset + Postgres + dbt)
superset-dbt-bea/
│── data\_ingestion/
│ └── bea\_downloader.py # Fetch BEA data from API
│── dbt\_project/
│ ├── models/
│ │ ├── staging/ # Clean raw BEA data
│ │ ├── marts/ # Aggregated metrics
│ │ └── metrics/ # Growth rates, ratios, rolling averages
│── superset/
│ └── dashboards/ # JSON exports of example dashboards
│── docker-compose.yml # For Superset + Postgres + dbt
│── README.md
- GDP growth over time
- Contributions by industry
- QoQ vs YoY toggle
- Imports vs exports
- CPI / PCE inflation trends
- Trade balance as % of GDP
👉 (Screenshots coming soon — export Superset dashboards as JSON + PNG and place them here!)
git clone https://github.com/YOUR_USERNAME/superset-dbt-bea.git
cd superset-dbt-beadocker-compose up -dThis spins up:
- Postgres (data warehouse)
- Superset (BI tool)
- dbt (transformation engine)
python data_ingestion/bea_downloader.pycd dbt_project
dbt run# Log in to Superset at http://localhost:8088
# Import JSON files from superset/dashboards/- Apache Superset – Visualization
- dbt – Data transformation
- Postgres / DuckDB – Storage
- BEA API – Data source
- Docker Compose – Local orchestration
- Add support for more BEA datasets (regional GDP, income)
- Publish dbt models as a package (
dbt-bea) - Automate Superset dashboard import
- Add CI/CD pipeline for refreshing data (GitHub Actions)
- Deploy demo online with lightweight database (DuckDB/SQLite + Superset in container)
Pull requests are welcome! Ideas for improvements:
- New dbt models (e.g., employment, housing data)
- Additional Superset visualizations
- Better dashboard theming
MIT License — feel free to use and adapt.