projectmesa / mesa-geo

GIS Extension for Mesa Agent-Based Modeling
Other
153 stars 53 forks source link
agent-based-modeling complex-systems geospatial-modeling gis mesa mesa-geo python simulation

Mesa-Geo: GIS Extension for Mesa Agent-Based Modeling

CI/CD GitHub CI Read the Docs Codecov
Package PyPI PyPI - License PyPI - Downloads
Meta linting - Ruff code style: black Hatch project DOI
Chat chat

Mesa-Geo implements a GeoSpace that can host GIS-based GeoAgents, which are like normal Agents, except they have a geometry attribute that is a Shapely object and a crs attribute for its Coordinate Reference System. You can use Shapely directly to create arbitrary geometries, but in most cases you will want to import your geometries from a file. Mesa-Geo allows you to create GeoAgents from any vector data file (e.g. shapefiles), valid GeoJSON objects or a GeoPandas GeoDataFrame.

Using Mesa-Geo

To install Mesa-Geo, run

pip install mesa-geo

You can also use pip to install the GitHub version:

pip install -e git+https://github.com/projectmesa/mesa-geo.git#egg=mesa-geo

Or any other (development) branch on this repo or your own fork:

pip install -U -e git+https://github.com/YOUR_FORK/mesa-geo@YOUR_BRANCH#egg=mesa-geo

Take a look at the examples repository for sample models demonstrating Mesa-Geo features.

For more help on using Mesa-Geo, check out the following resources:

Contributing to Mesa-Geo

Want to join the team or just curious about what is happening with Mesa & Mesa-Geo? You can...

If you run into an issue, please file a ticket for us to discuss. If possible, follow up with a pull request.

If you would like to add a feature, please reach out via ticket or join a dev session (see Mesa discussions). A feature is most likely to be added if you build it!

Don't forget to check out the Contributors guide.

Citing Mesa-Geo

To cite Mesa-Geo in your publication, you can use the CITATION.bib.