Metadata-Version: 2.4
Name: deepcivics
Version: 0.1.2
Summary: Opensource, LLM powered library to turn public data into civic insight for the Public, Policy makers and Investment professionals.
Home-page: https://github.com/pkbythebay29/deepcivics
Author: Pkbythebay29
Author-email: kannan@haztechrisk.org
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pandas
Requires-Dist: matplotlib
Requires-Dist: transformers
Requires-Dist: pyyaml
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# 🏛️ Deep Civics

> Open Data + Policy Tools for the People 

Deep Civics helps you turn public data into civic insight for the Public, Policy makers and Investment professionals.

It's an open-source Python library and Jupyter interface to let anyone:

- 🗂️ Load and analyze public datasets
- 💬 Ask questions in your language using an LLM
- 📊 Visualize trends, disparities, and impacts
- 🧭 Share findings or use it your applications

## 🌍 Example Use Cases

- 📉 Understand budget allocation by region
- 🌡️ Compare climate or emissions data over time
- 🏥 Track healthcare data by district
- 🏭 Explore industrial safety or infrastructure trends
- 🏦 Monitor financial and digital inclusion metrics

## Quickstart

Let’s use Deep Civics to explore how South Africa has improved **digital financial access** over time, using World Bank data.

```bash
pip install deepcivics

```
```bash
from deepcivics import generate_config_from_url

# Use a real CSV from the World Bank
generate_config_from_url(
    csv_url="https://databankfiles.worldbank.org/public/ddpext_download/ICT/Series/FS.DSR.DIGS.ZS.csv",
    country="South Africa"
)

from deepcivics import CivicLLM
from deepcivics.config import load_config
from deepcivics import ingestion

cfg = load_config()
df = ingestion.fetch_csv(cfg["source"])

llm = CivicLLM(cfg["model"])
context = df.to_csv(index=False)[:cfg["truncate_context"]]
question = "Which countries in Africa have improved digital finance access the most?"
answer = llm.ask(question, context)
print("✅ LLM Answer:", answer)
```



##📓 Try in Your Browser

[![Launch on Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/pkbythebay29/deepcivics/HEAD?filepath=notebooks%2Fdigital_finance_africa_real.ipynb)


##🧠 Architecture

    deepcivics/ – Core Python package

    notebooks/ – Civic data demos

    datasets/ – YAML registry of reusable datasets

    docs/ – GitHub Pages documentation
	
##🤝 Contributing

Y'all are welcome to contribute and provide feedback via PR!

##📜 License

MIT. Use freely, cite responsibly, act respectfully.
