Skip to content

ideo/composting-sim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Things you get exposed to with this toy model

  • Streamlit
  • Agent Based Modeling via the python library Mesa
  • Using python classes
  • Docstrings

About this toy model

In this toy model we use Mesa to simulate the process of a positive behavior (like composting) moving through a neighborhood. Via a streamlit app, we allow the user to explore how such propagation depends on the level of compatibility between neighbors and a the propensity of neighbors to talk about that behavior with others / adopt the behavior if encouraged to do so.

The behavioral model used here is a toy model with no scientific ground, but it could be improved to include a more complex one.

How to run it

  • Install the required packages from pipenv via pipenv install.
  • Run the script via pipenv run streamlit run sim_app.py
  • Interact with the simulation by clicking on the local URL that appears in the terminal at runtime. You can also share this simulation externally via the network URL.

Links and Resources

Learning Mesa

Agent-Based Modeling

WARNING - Streamlit & Pandas Version Conflicts

Streamlit will let you develop locally with the latest python (3.9.x) but can only host up to python 3.7.12. The latest pandas has moved on from python 3.7. All this is to say, please don't change the python and pandas versions specified in the pipenv files.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages