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.1.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.1-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: deepcivics-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 a66b3a6f0c7062e2a6724fd51345dc45af55d5fe79ea20531d565ede5e3e3807
MD5 bbac97e552d5e4e1b18ec01d31fe997e
BLAKE2b-256 2fdb692d9ae92dfff5a8d7f19e3f33c371eecf8ccf0f53ec75e5d3bf2da42d71

See more details on using hashes here.

File details

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

File metadata

  • Download URL: deepcivics-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 779921549561c426480748c159848db67d48f29ae0faf414d4b66e9653a973b6
MD5 0cc77942545b65ede579f47f85a207cc
BLAKE2b-256 f1258e7873d42db987f7ce853181262656cde6426f0391fbc6472274a6911e03

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