Welcome
This is an experimental project that seek to combine group-based modeling and interactive visualization under the same roof. If you want a friendly book to better understand group-based, or approximate, master equations, start here.
Usage
You have three ways to interact with our project:
Online: a dashboard lives here. You can explore the parameters sweep that we have precomputed.Make: follow the installation steps, then you should be able to do single runs usingmake(see installation below).Code: see this repo or this example folder.
Installation
If you are interested in a particular set of parameters without writing code, you need to do the following
# clone and init InstitutionalDynamics.jl git submodules
git clone --recurse-submodules https://github.com/jstonge/hello-gmes.git
cd ./hello-gmes
Now that we have cloned the repo and are in root dir, we install Julia dependencies
julia
julia> ]
(@v1.10) pkg> activate .
(hello-GMEs) pkg> instantiate
# ctrl+d to quit
Right now the libs are compiled for Julia 1.10 and higher. Once done, we can run the single-run with make, and launch the app. The run will show up in the single-run/ page once finished running:
# run single run with make, e.g.
make single-run-coevo BETA=0.16 RHO=0.05 ETA=0.26 XI=1 ALPHA=1. GAMMA=1 B=0.2 C=0.5
# install observable app
npm install
# launch the app
npm run dev
Project structure
We take as starting point the Observable Framework structure, but modify it a little to accomodate our simulation work. That is, on top of the Observable Framework project that mostly lives in src/ (see hidden summary below for authors' description), we have a project structure heavily inspired from the Turing Way's repository structure:
How to get started with Observable Framework
This is (also) an Observable Framework project. To start the local preview server, run:
npm run dev
Then visit http://localhost:3000 to preview your project.
For more, see https://observablehq.com/framework/getting-started.
Project structure
A typical Framework project looks like this:
.
├─ docs
│ ├─ components
│ │ └─ timeline.js # an importable module
│ ├─ data
│ │ ├─ launches.csv.js # a data loader
│ │ └─ events.json # a static data file
│ ├─ example-dashboard.md # a page
│ ├─ example-report.md # another page
│ └─ index.md # the home page
├─ .gitignore
├─ observablehq.config.js # the project config file
├─ package.json
└─ README.md
docs - This is the “source root” — where your source files live. Pages go here. Each page is a Markdown file. Observable Framework uses file-based routing, which means that the name of the file controls where the page is served. You can create as many pages as you like. Use folders to organize your pages.
docs/index.md - This is the home page for your site. You can have as many additional pages as you’d like, but you should always have a home page, too.
docs/data - You can put data loaders or static data files anywhere in your source root, but we recommend putting them here.
docs/components - You can put shared JavaScript modules anywhere in your source root, but we recommend putting them here. This helps you pull code out of Markdown files and into JavaScript modules, making it easier to reuse code across pages, write tests and run linters, and even share code with vanilla web applications.
observablehq.config.js - This is the project configuration file, such as the pages and sections in the sidebar navigation, and the project’s title.
Command reference
| Command | Description |
|---|---|
npm install |
Install or reinstall dependencies |
npm run dev |
Start local preview server |
npm run build |
Build your static site, generating ./dist |
npm run deploy |
Deploy your project to Observable |
npm run clean |
Clear the local data loader cache |
npm run observable |
Run commands like observable help |