Home

Awesome

PySD Cookbook

Simple recipes for powerful analysis of system dynamics models

by James Houghton

Try out in Binder

Binder

This cookbook is intended as a resource for system dynamics practitioners working to use big data to improve their modeling practice. I strive to make each recipe short, simple to understand, and transferable, so that the script can be copied and adapted to the desired problem.

Each recipe is structured as follows:

  1. Introduction to the technique and its relevance to System Dynamics
  2. Ingredients necessary to use the technique
  3. Description of the Demo Model
  4. Description of the Demo Data
  5. Notes on the particular third party python libraries in use
  6. Steps necessary to conduct the analysis with code examples

How to use this cookbook

An easily readable, linked version of this cookbook is available on Read the Docs

Every recipe in this cookbook is an executable ipython notebook. Because of this, I recommend that you download a copy of the cookbook, and follow along by executing the steps in each notebook as you read, playing with the parameters, etc.

If you want to implement a recipe, you can then make a copy of the notebook you are interested in, and modify it to analyze your own problem with your own data.

To download the cookbook in its entirity, use this link or select one of the options in the righthand panel of the github window.

At least PySD 3.0.0 is needed to run these notebooks. However, we recommend using the latest available PySD version (check also for its requirements).

Structure of this repository

As several recipes may use the same models or the same data, I've separated the recipes into a directory called Analyses where individual recipes are grouped by category. The Data directory contains all of the data used in the analyses, and in most cases notebooks describing the data, where it came from, and how it is formatted. The Models directory includes the various model files that are used throughout the analyses.