Skip to content

Repository files navigation

RootStack

Foundational data schemas, seed data, and queries for the OpenStacks ecosystem.

Part of OpenStacksLicense: MIT

The database layer for OpenStacks — structured development data for India and South Asia.


What This Is

RootStack provides a SQLite database with schemas, seed data, and ready-to-use queries covering three domains:

  1. Development Indicators — Health, education, gender, and climate data at state and district level (NFHS-5, SRS, UDISE+, CPCB)
  2. Government Schemes — Central and state schemes with budget allocation, spending, and coverage data
  3. Tools Catalog — Registry of all scripts, notebooks, and templates across the OpenStacks ecosystem

Quick Start

git clone https://github.com/Varnasr/RootStack.git
cd RootStack
bash scripts/setup.sh

This creates rootstack.db with all tables seeded. Then run queries:

# Health indicators across states
sqlite3 -header -column rootstack.db < queries/01_health_dashboard.sql
# Government scheme budgets and spending
sqlite3 -header -column rootstack.db < queries/02_policy_analysis.sql
# Cross-cutting analysis (climate-health, tribal districts, tools search)
sqlite3 -header -column rootstack.db < queries/03_cross_cutting.sql

Prerequisites

  • SQLite 3 (pre-installed on most systems; brew install sqlite3 on Mac, apt install sqlite3 on Linux)

What's Inside

RootStack/
├── schemas/ # Table definitions (run in order)
│ ├── 001_geography.sql # States and districts of India
│ ├── 002_sectors.sql # Development sector taxonomy
│ ├── 003_indicators.sql # Indicator definitions and values
│ ├── 004_policies.sql # Government schemes and budgets
│ └── 005_tools_catalog.sql # OpenStacks tools registry
│
├── seed_data/ # Initial data (run in order)
│ ├── 001_sectors.sql # 19 sectors and sub-sectors
│ ├── 002_states.sql # 30 states and UTs
│ ├── 003_districts_sample.sql# 26 sample districts across tiers
│ ├── 004_indicators.sql # 20 indicators with 51 data points
│ ├── 005_schemes.sql # 16 major schemes with budgets
│ └── 006_tools_catalog.sql # 32 tools across 4 stacks
│
├── queries/ # Ready-to-use analysis queries
│ ├── 01_health_dashboard.sql # State scorecards, district rankings, gender gaps
│ ├── 02_policy_analysis.sql # Budget overview, utilization, sector spending
│ └── 03_cross_cutting.sql # Multi-sector profiles, climate-health nexus
│
├── scripts/
│ └── setup.sh # One-command database creation
│
└── docs/
└── data_dictionary.md # Table descriptions, field conventions, sources

Database Schema

states ──< districts
sectors ──< indicators ──< indicator_values >── districts
sectors ──< schemes ──< scheme_budgets
──< scheme_coverage >── states/districts
stacks ──< tools >── sectors

Current Data

TableRecordsSource
States30Census 2011
Districts26 (sample)Census 2011
Sectors19OpenStacks taxonomy
Indicators20 definitionsNFHS-5, SRS, PLFS, CPCB
Indicator Values51 data pointsVarious (see data dictionary)
Schemes16 major schemesUnion Budget, Ministry reports
Budgets13 entriesUnion Budget 2023-24
Stacks4 registeredOpenStacks ecosystem
Tools32 catalogedInsightStack, FieldStack, EquityStack

Example Output

State health scorecard:

State IMR Stunting Anaemia
Uttar Pradesh 40.0 39.7%
Bihar 38.0 42.9% 63.5%
Madhya Pradesh 36.0 35.7%
Kerala 6.0 23.4% 36.3%

Scheme budget utilization:

Scheme Allocated (Cr) Spent (Cr) Utilization
Jal Jeevan Mission 70,000 62,000 88.6%
MGNREGA 60,000 82,000 136.7%
National Health Mission 36,785 33,200 90.3%
NCAP (Clean Air) 460 350 76.1%

How It Connects

RootStack is the data foundation of the OpenStacks ecosystem:

StackRoleLink
RootStack (this repo)Database schemas & seed dataYou are here
BridgeStackAPI backend (FastAPI)Will consume RootStack data
ViewStackFrontend UIWill display via BridgeStack
InsightStackMEL tools (Stata/Python/R)Tools cataloged here
FieldStackR notebooks for fieldworkTools cataloged here
EquityStackPython data workflowsTools cataloged here

Contributing

Contributions welcome — especially:

  • More district data — Expand from 26 to all 766 districts
  • More indicators — Add UDISE+ education data, PLFS employment data
  • More schemes — State-level schemes, historical budget data
  • PostgreSQL port — Adapt schemas for PostgreSQL deployment
  • Migration scripts — Schema versioning for production use

See CONTRIBUTING.md for guidelines.

License

MIT — free to use, modify, and share. See LICENSE.


Created by Varna Sri Raman — Development Economist & Social Researcher

About

SQLite schemas, seed data & queries for Indian development indicators, government schemes, and OpenStacks tools — Part of OpenStacks

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages