epigrass-creator
Latest: v1.1.2
Documented skill file locations: added Skill Files section to SKILL.md explaining where wizard.py and epigrass_wizard.py live and how to invoke them programmatically or as a CLI; listed example files; synced _meta.json version
Epigrass Creator Skill
Create epidemiological metapopulation models using Epigrass through an interactive, step-by-step wizard.
Skill Files
All files are located in this skill's directory (the same folder as SKILL.md):
| File | Description |
|---|---|
wizard.py | Full interactive 5-step CLI wizard. Run with python3 <skill_dir>/wizard.py, or drive programmatically: from wizard import EpigrassWizard; EpigrassWizard().run(). Supports all steps including GeoPackage import and network generation. |
epigrass_wizard.py | Programmatic wizard API, designed for agent-driven use. Import with from epigrass_wizard import EpigrassWizard, then guide the user through each step using get_model_selection_prompt(), get_sites_prompt(), get_parameters_prompt(), get_edges_prompt(), get_simulation_prompt() and collect input with set_model_type(), add_site(), add_parameter(), add_simulation_setting(). Finish with save_model() and get_summary(). Also runnable as a CLI: python3 <skill_dir>/epigrass_wizard.py. |
examples/dengue_seir_example.json | Example model_spec.json for a dengue SEIR model. |
examples/geopackage_example.md | Walkthrough for importing sites from a GeoPackage file. |
Prefer epigrass_wizard.py's programmatic API when acting as an agent (it avoids blocking input() calls); use wizard.py when the user wants to run the wizard themselves in a terminal.
What is Epigrass?
Epigrass (Epidemiological Geo-referenced Analysis and Simulation System) is a Python library for simulating disease spread across geographic networks.
Supported Models
| Model | Compartments | Use Case |
|---|---|---|
| SIR | S, I, R | Diseases with lifelong immunity |
| SEIR | S, E, I, R | Diseases with latent period |
| SEIS | S, E, I | Diseases with temporary immunity |
| SIS | S, I | Diseases with no immunity |
| SI | S, I | Fatal diseases |
| Custom | User-defined | Specialized scenarios |
Workflow (5 Steps)
- Model Selection - Choose model type
- Site Definition - Define geographic locations (manual, grid, cities, or GeoPackage import)
- Parameters - Configure epidemiological parameters
- Network - Define connections between sites
- Simulation - Set simulation settings and generate files
GeoPackage Support
Import sites directly from GeoPackage (.gpkg) files:
- Supports any geospatial vector data
- Automatic coordinate extraction
- Column mapping for name, population, geocode
- Works with municipal boundaries, health regions, etc.
Requirements: pip install geopandas (or fiona as fallback)
Usage Examples
User: Create a dengue model for Brazilian cities
→ Wizard guides through SEIR selection, city list, parameters
User: Build SIR model with 10x10 grid
→ Wizard creates synthetic network
User: Custom model with hospitalization
→ Wizard collects compartments and transitions
Output
model.epg- Epigrass scriptsites.csv- Site/node dataedges.csv- Edge/connection datamodel_spec.json- Full specification
Requirements
- Python 3.8+
- epigrass (
pip install epigrass)
