
Data and scripts belonging to:
Landscape composition and configuration affect natural pest control.

Reference: Mansier, L., ten Brink J.A., Janssen A. & van Rijn, P.C.J. 
Landscape composition and configuration affect natural pest control. 

This model can be found additionally found at the github page of Laura Mansier, once the article is accepted for publication


DATA & SCRIPTS
Prerequisites: R and Packages: "tidyverse", "readxl", "reshape2", "gganimate", "patchwork", "dyplr", "scales", "magick", "av"

The model consists of multiple scripts: the model itself "SpatialModel_final", 
a script with the additional function "functions", a script with the initialisation of the model "initialisation", 
a script with all the parameters "Parameters" and a script to run the analyses "Run_spatialmodel".

The landscape scenarios analysed in the model can all be found as excel files.
If all these scripts are in the same folder + the "Landscape_scenarios" file, then you only need to run "Run_spatialmodel" to obtain 
the data from the analyses used in our paper. Note that running this script per landscape scenario will take a while (multiple days).

You can visualise the data using our "Figures_manuscript" script.
Additionally, when the main model is run with "Run_spatialmodel", there will be gifs made of how the populations move over the landscape.
This is done with the script "Animation". We have encoded them to MP4 and all finished MP4s can be found in the "Animate" folder.
Here, all animations are given in MP4 format for the landscape scenarios that can be found in our manuscript.