jstonge / teenyverse

The Teenyverse
https://jstonge.github.io/teenyverse/
0 stars 0 forks source link

teenyverse

The Teenyverse. See project status for the ongoing development work.

Workflow

├── index.qmd              # Main file to render the interactive page. There should be only `ojs` cells in it.
├── models                 # All models live in their own directory
│   ├── sourcesink1.jl
│   ├── sourcesink2.jl
|   ├── ...
|   └── sourcesink_template.jl
├── sourcesink_sketch.jpg  # Sketch of the model
├── src
│   ├── 01_source-sinkDB.jl  # Add params to the SQLite DB
│   ├── 02_script2vacc.jl    # Script to generate bash scripts for params sweep on the VACC
│   └── 04_processing.jl     # Processing script before passing to index.qmd
├── source-sink.db         # SQLite DB containing grid of params for the models 
└── source-sink-res.db     # SQLite DB containing data to visualize

Trying out a new model

Adding a parameter sweep

Adding a new parameter configurations to an existing model

optional arguments: --db DB Use Database to query parameters -L L LIMIT of rows (type: Int64, default: 5) -O O The OFFSET clause after LIMIT specifies how many rows to skip at the beginning of the result set. (type: Int64, default: 0) --beta BETA Spreading rate from non-adopter to adopter beta (type: Float64, default: 0.07) -g G Recovery rate gamma, i.e. rate at which adopters loose behavioral trait (type: Float64, default: 1.0) -r R Global behavioral diffusion rho (allows the behaviour to spread between groups) (type: Float64, default: 0.1) -b B Group benefits b (type: Float64, default: 0.18) -c C Institutional cost c (type: Float64, default: 1.05) -m M Noise u (type: Float64, default: 0.0001) -o O Output file for results (default: ".") -h, --help show this help message and exit


 Once this is done running, the rendered file should reflect the changes. To see the changes on the web page, we need to push the changes on Github. Then Github action will take care of update the web page.

### Modify/add new models

 - To modify an existing model, create a new file in `models` (see `source-sink/models/source-sink2.jl` for a template). Write the model in a function of the same name. This model should be added as a new tab in the `output` section in the main `index.qmd` file.
 - To add a new model create a new folder (see for example `teenyverse/posts/sci-group-life-cycle`). The folder should follow the same logic than first model.