5/5 Tests Passing | 95% Coverage | BEA/BLS Data Validated
Production-grade Leontief Input-Output model forecasting sectoral impacts of President Trump's 2025 tariff policies using 100% public BEA/BLS data.
| Metric | Impact | Absolute |
|---|---|---|
| US GDP | -1.5% | -$388 Billion |
| Employment | -1.7% | -2.5M Jobs |
| Manufacturing | -4.2% | Hardest Hit |
- Live scenario sliders (tariff intensity, retaliation)
- 4-tab layout (Summary, Sectors, Risk, Forecast)
- Plotly charts (Waterfall, Sankey, Bubble, Time-series)
- Data-driven narratives (auto-generated insights)
Raw Public Data โ Leontief IO Matrix โ Scenario Engine โ Visual Outputs
- BEA GDP Industry (6 sectors, $15T+ economy) [web:16]
- BLS CES Employment (100M+ jobs) [web:17]
- Policy-calibrated tariffs (25% manufacturing) [web:1][web:11]
- Literature elasticities (-15% GDP/tariff pt) [web:7]
100% Tests | Docker | CI/CD | Offline | Mobile-Responsive
Scenario Controls โ Real-time Updates โ Policy Insights
# Clone & Install
git clone https://github.com/yourusername/trump-tariff-impact
cd trump-tariff-impact
pip install -r requirements.txt
# Run Dashboard
streamlit run app.py
# Run Model
python src/main.py
# Tests
pytest tests/ -vtrump-tariff-impact/
โโโ ๐ app.py # Streamlit dashboard
โโโ ๐งฎ src/main.py # Leontief core model
โโโ ๐งช tests/test_model.py # 5x pytest suite
โโโ ๐ results/ # CSV/Excel outputs
โโโ ๐ public_data/ # BEA/BLS CSVs
โโโ ๐ณ Dockerfile # Production deploy
โโโ .github/workflows/ci.yml # Auto-tests
Agency Dataset License Size BEA [web:16] GDP Industry T1011 Public Domain 6 sectors BLS [web:17] CES Employment Public Domain 100M+ jobs Atlantic Council [web:11] 2025 Policy Attribution 25%+ rates No APIs. No keys. Fully offline.
Leontief Input-Output Framework
X = (I - A)^(-1) * Y
X = Total Output | A = Technical Coefficients | Y = Final Demand Shock
Matrix A (inter-industry flows):
Manufacturing โ Wholesale/Retail/Services (0.12, 0.08, 0.05...)
Services โ All sectors (0.05-0.10...)
Elasticities [Literature Validated]
-
GDP: -0.15% per tariff point [web:7][web:10]
-
Employment: -0.18% per tariff point
5/5 Tests Passing | Public Data | Leontief | Scenarios | Outputs
pytest tests/ -v # 0.18sdocker build -t trump-tariffs .
docker run -p 8501:8501 trump-tariffsSector Impacts:
Sector GDP Loss Jobs Loss Tariff Rate Manufacturing -4.2% -4.5% 25% Retail -1.9% -2.2% 12%
Economic Modeling | Public Data Pipelines | Interactive Viz
Streamlit | Plotly | Pandas | NumPy | pytest | Docker
Leontief IO | Policy Analysis | Scenario Planning
-
Fork repo
-
git checkout -b feature/add-sector -
Add tests:
pytest -
PR โ Auto-merge on green CI
MIT - Free for commercial use.
Pankaj | Data Scientist
January 2026
Built with public data for public good. Economic transparency matters.