Skip to main content

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

Launch on Binder

##🧠 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

deepcivics-0.1.2.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

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

deepcivics-0.1.2-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file deepcivics-0.1.2.tar.gz.

File metadata

  • Download URL: deepcivics-0.1.2.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for deepcivics-0.1.2.tar.gz
Algorithm Hash digest
SHA256 201aef6af668c654f6b7d864e333585b3306e91f5a410b79b675e86d5e2bf204
MD5 9d2af4e9b3b6b9cd9080cef530844c0f
BLAKE2b-256 fc7afc93fc116040e4fc8ab270aa685dacd319d7c5e33c471da2364466f4ba8c

See more details on using hashes here.

File details

Details for the file deepcivics-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: deepcivics-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for deepcivics-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 43cfc123fd12972fb781514ed18480eea344048d4ce842e0e1a4383350da0df9
MD5 c9c254579d2a0f1704a1005828ba1bdc
BLAKE2b-256 d1011d31bc7dd47f0487724f584e23091373104dc115425eca68418ee75be8bb

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