Skip to main content

Production-ready socioeconomic and econometric models for policy analysis, forecasting, and regional development

Project description

KR-Labs

KR-Labs Model Zoo

Open Models. Trusted Intelligence. Shared Progress.

License Version Python Documentation Status Code style: black

📚 Documentation🚀 Quick Start💡 Examples🤝 Contributing


🌟 Highlights

  • 🎯 100+ Production-Ready Models - ARIMA, GARCH, VAR, Kalman Filters, Random Forest, XGBoost, and more
  • 📊 Built for Public Data - Native integration with Census, BLS, FRED, CDC, HUD via KRL Data Connectors
  • 🔬 Research-Grade Quality - Peer-reviewed algorithms with comprehensive validation and testing
  • 🚀 Production Ready - Battle-tested in real-world policy analysis and forecasting applications
  • 📖 Fully Documented - Complete API reference, tutorials, and mathematical formulations
  • 🤝 Open Source - Apache 2.0 License, community-driven development

Overview

KRL Model Zoo™ is an open-source library of socioeconomic and econometric models designed for researchers, policymakers, analysts, and community organizations seeking to turn data into actionable intelligence.

It provides modular, production-grade tools for forecasting, regional analysis, anomaly detection, and policy evaluation — all engineered with transparency, reproducibility, and accessibility in mind.

Developed by KR-Labs, the Model Zoo bridges statistical rigor with public-interest purpose, transforming raw data into real-world insight.

Integrated Ecosystem

The Model Zoo is designed to work seamlessly with KRL Data Connectors, our companion library for accessing public datasets. Together, they provide an end-to-end workflow:

Data → Analysis → Insight

  • KRL Data Connectors pulls data from Census, BLS, FRED, CDC, HUD, and 20+ other federal sources
  • KRL Model Zoo applies statistical models and analytical frameworks
  • Results drive evidence-based decisions and policy evaluation

Mission

We believe data science should serve humanity.
The KRL Model Zoo exists to make responsible, interpretable, and replicable analytics accessible to everyone shaping economic, social, or community outcomes.

Our models support research, governance, and education by standardizing open methods for understanding change.


Core Capabilities

  • Unified Framework: Econometric, causal, ML, and Bayesian models under one architecture.
  • Transparency by Design: Built-in provenance tracking, version control, and reproducibility.
  • Seamless Data Integration: Native compatibility with KRL Data Connectors for federal datasets.
  • Community-Driven: Collaborative ecosystem for model sharing, validation, and continuous improvement.
  • Policy-Ready Tools: Designed for public datasets like Census, BLS, FRED, CDC, and HUD.
  • Educational Utility: Ideal for universities, research institutes, and civic technology programs.

Model Families

Domain Example Models Use Case
Time Series Analysis ARIMA, SARIMA, GARCH, Kalman Filters Forecasting unemployment, prices, or economic volatility
Econometrics VAR, Cointegration, Structural Breaks Studying policy impacts and long-term relationships
Regional Analysis Location Quotient, Shift-Share Understanding regional economic specialization
Anomaly Detection STL Decomposition, Isolation Forest Identifying shocks and unusual patterns in public data
Extensions Causal Inference, Bayesian Hierarchies, Network Models Enterprise Applications

Practical Impact

The Model Zoo powers work that matters:

  • Labor & Employment: Forecasting job trends, analyzing workforce shifts, and tracking equity gaps.
  • Housing & Urban Development: Modeling affordability, detecting displacement, and identifying price volatility.
  • Income & Inequality: Measuring economic disparity, mobility, and opportunity over time.
  • Public Health: Linking health indicators with economic and environmental conditions.
  • Regional Development: Assessing industrial strengths, resilience, and competitiveness.

Each model is field-tested, policy-relevant, and community-accessible.


Quick Start

Installation

# Install Model Zoo
git clone https://github.com/KR-Labs/krl-model-zoo.git
cd krl-model-zoo
make install-dev

# Optional: Install Data Connectors for seamless data access
pip install krl-data-connectors

Complete Workflow Example

# Step 1: Fetch data using KRL Data Connectors
from krl_data_connectors import BLSConnector, CensusConnector

# Get unemployment data from BLS
bls = BLSConnector()
unemployment_data = bls.get_series('LNS14000000', start_year=2015, end_year=2024)

# Get regional employment from Census
census = CensusConnector()
regional_data = census.get_cbp_data(year=2023, geography='county', state='06')

# Step 2: Analyze with Model Zoo
from krl_models.econometric import SARIMAModel
from krl_models import LocationQuotientModel

# Forecast unemployment trends
model = SARIMAModel(
    data=unemployment_data,
    params={'order': (1, 1, 1), 'seasonal_order': (0, 0, 0, 0)},
    meta={'name': 'unemployment_forecast', 'version': '1.0.0'}
)
result = model.fit()
forecast = model.predict(steps=12)

# Analyze regional specialization
lq = LocationQuotientModel(
    data=regional_data,
    params={
        'region_col': 'county',
        'industry_col': 'naics',
        'employment_col': 'emp'
    },
    meta={'name': 'regional_lq', 'version': '1.0.0'}
)
lq_result = lq.fit()

# Step 3: Export results for reporting or visualization
forecast.to_csv('unemployment_forecast.csv')
lq_result.to_excel('regional_analysis.xlsx')

Standalone Usage (Without Data Connectors)

from krl_models.econometric import SARIMAModel
from krl_models import STLAnomalyModel
import pandas as pd

# Use your own data
data = pd.read_csv('your_data.csv')

# Forecast with SARIMA
model = SARIMAModel(
    data=data,
    params={'order': (1, 1, 1), 'seasonal_order': (1, 1, 1, 12)},
    meta={'name': 'my_forecast', 'version': '1.0.0'}
)
result = model.fit()
forecast = model.predict(steps=12)

# Detect anomalies
anomaly_model = STLAnomalyModel(
    data=data,
    params={
        'time_col': 'date',
        'value_col': 'metric',
        'seasonal_period': 12,
        'threshold': 3.0
    },
    meta={'name': 'anomaly_detection', 'version': '1.0.0'}
)
anomalies = anomaly_model.fit()

Explore Example Notebooks

Visit /examples/notebooks/ for guided walkthroughs:

  • End-to-End Workflows: Fetching data with Connectors + analyzing with Model Zoo
  • Forecasting labor market trends with BLS data
  • Regional specialization analysis using Census CBP data
  • Housing market volatility with HUD Fair Market Rent data
  • Anomaly detection in CDC health indicators
  • Multi-source integration: combining FRED, BLS, and Census data

Community & Collaboration

KR-Labs thrives on open collaboration and shared intelligence.

You can:

  • Contribute new models, tutorials, or datasets
  • Report issues or propose features
  • Share research Mapplications and case studies
  • Join our growing community of open-data practitioners

See our Contributing Guide for details.
Join the discussion at GitHub Discussions.


Governance & Roadmap

The Model Zoo evolves through the KR-Labs Gate Framework, ensuring transparent, high-quality development:

Gate Description Status
Gate 1 – Foundation Time series & econometric core Open-Source
Gate 2 – Domain Models Regional & anomaly detection Open-Source
Gate 3 – Ensembles Meta-models and hybrid systems Enterprise App
Gate 4 – Advanced Extensions Causal inference, Bayesian, network models Enterprise App

Each Gate reflects a maturity milestone balancing innovation, stability, and community feedback.


KR-Labs Ecosystem

The Model Zoo is part of a broader open-source intelligence platform:

Repository Purpose Status
krl-model-zoo Statistical models & analytical frameworks Production
krl-data-connectors Unified API for 20+ federal data sources Production

Why This Matters

Traditional Approach:

  1. Manually download CSVs from multiple government websites
  2. Write custom parsers for each data format
  3. Clean and normalize data structures
  4. Finally begin analysis

KR-Labs Approach:

  1. pip install krl-data-connectors krl-model-zoo
  2. Write analysis code immediately
  3. Results in minutes, not days

Key Benefits:

  • Single API for Census, BLS, FRED, CDC, HUD, and more
  • Pre-validated data compatible with Model Zoo methods
  • Reproducible workflows from data fetch to final analysis
  • Version control for both data retrieval and model parameters
  • Community support for common use cases and patterns

Documentation

📚 Full Documentation on ReadTheDocs (Coming Soon)

Quick Links

Example Code

Related Documentation


Licensing

KR-Labs™ and KRL Model Zoo™ are trademarks of Quipu Research Labs, LLC, a subsidiary of Sundiata Giddasira, Inc.


Citation

If you use the KRL Model Zoo in research or analysis, please cite:

@software{krl-model-zoo,
  author = {Deloatch, Brandon C.},
  title = {KRL Model Zoo: Open-Source Socioeconomic Modeling Framework},
  Year = {2025},
  publisher = {KR-Labs},
  version = {1.0.0},
  url = {https://github.com/KR-Labs/krl-model-zoo}
}

Contact & Support


KR-Labs

KR-Labs™ | Building Open Intelligence for the Public Good

Version 1.0.0 • Apache 2.0 License


Legal & Trademark Notice

© 2025 KR-Labs. All rights reserved.

KR-Labs™ and KRL Model Zoo™ are trademarks of Quipu Research Labs, LLC, a subsidiary of Sudiata Giddasira, Inc.

Software License: Apache 2.0 – Free for commercial and academic use
Documentation License: CC-BY-SA-4.0


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

krl_model_zoo-1.0.0.tar.gz (441.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

krl_model_zoo-1.0.0-py3-none-any.whl (78.3 kB view details)

Uploaded Python 3

File details

Details for the file krl_model_zoo-1.0.0.tar.gz.

File metadata

  • Download URL: krl_model_zoo-1.0.0.tar.gz
  • Upload date:
  • Size: 441.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for krl_model_zoo-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ef8f1ae78e01d499ea97152d739dca6cb56d279721f2e8eaa804cb6a27b8cfeb
MD5 2c8bc2f4c5a816c2df837f9ff08a9640
BLAKE2b-256 42c137e6543b1b3d081877fb83d99e0b0207fe293601c37db1895aeb972f8e05

See more details on using hashes here.

File details

Details for the file krl_model_zoo-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: krl_model_zoo-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 78.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for krl_model_zoo-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b28ce6f3518547a126cb5f2d21c956eca034ffacd02c8a6481e4922ef28d134e
MD5 e8c26ad89d3a9b72b793272a53c81223
BLAKE2b-256 780705e2aa381c554088260dbfded628198ef32cdb15b643de3d81b047784338

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page