Opensource, LLM powered library to turn public data into civic insight for the Public, Policy makers and Investment professionals.
Project description
🏛️ 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.
pip install deepcivics
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
##🧠 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.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file deepcivics-0.1.0.tar.gz.
File metadata
- Download URL: deepcivics-0.1.0.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a40be607aa888d211609e18baf2ad07b1f24f7218e88a525a3ce8125dbbc486
|
|
| MD5 |
0f4359fc29774023ec0c90e02a092350
|
|
| BLAKE2b-256 |
c23f8c633413790169b754e58c91b698e65c32ad60fde8464d178d08e10bfc35
|
File details
Details for the file deepcivics-0.1.0-py3-none-any.whl.
File metadata
- Download URL: deepcivics-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
24bedfd3c8d4449037d0781c85e9c7e244d534190a3f5d29b005933d5e5fc9e4
|
|
| MD5 |
b6c14f4c997ebbda1f47767dd05b1861
|
|
| BLAKE2b-256 |
0257eab48360fd12d010af1477d00bc028a83a102cfa84f6f199f72dc88dd015
|