<p>Code and data from: “The population dynamics of clustered consumer-resource spatial patterns: insights from the demographics of a Turing mechanism” (2024) by Zachary Hajian-Forooshani, Iris Saraeny Rivera Salinas, Ivette Perfecto and John Vandermeer. With these files all of the analysis can be recreated.</p>
<p><br></p>
<p><strong>R script:</strong> <em>“2024_10_16_Phorid_survey_analysis_figures_final”</em></p>
<ul>
<li>Script for statistical analysis of the Phoridae field surveys.<br>
</li>
<li><strong>Relies on data from:</strong> “Azteca_DSP_Phorid_dynamics_survey_data.csv”<br>
</li>
</ul>
<p><strong>R script:</strong> <em>“2024_10_16_DSP_test_for_empirical_data”</em></p>
<ul>
<li>Script for Demographic Spatial Patterning test and randomization procedure as outlined in Figure 2 of the manuscript and described in Supplementary Material<br>
</li>
<li><strong>Relies on data from:</strong><br>
<ul>
<li>“Azteca_census_data_Jan_2018.csv”</li>
</ul>
</li>
<li><strong>Produces:</strong><br>
<ul>
<li>“dsp.df.final.csv”</li>
<li>“dsp.randomizations.df.final.csv”</li>
</ul>
</li>
</ul>
<p><strong>R script:</strong> <em>“2024_10_16_DSP_results_Fig3”</em></p>
<ul>
<li>Plots the results from the DSP test for Fig 3.<br>
</li>
<li><strong>Relies on data from:</strong><br>
<ul>
<li>“dsp.df.final.csv”</li>
<li>“dsp.randomizations.df.final.csv”</li>
</ul>
</li>
</ul>
<p><strong>R script:</strong> <em>“2024_10_16_Azteca_DSP_age_specific_mortality_calculations”</em></p>
<ul>
<li>Calculates the age specific mortalities in the empirical data.<br>
</li>
<li><strong>Produces:</strong> ”2023_11_15_Azteca_DSP_empirical_death_rates_full_df.csv”<br>
</li>
</ul>
<p><strong>R script:</strong> <em>“2024_10_16_density_dependence_in_clusters_for_SupMat”</em></p>
<ul>
<li>Script with analysis to show that older nests tend to be in the center of clusters for supplementary material.<br>
</li>
<li><strong>Relies on data from:</strong><br>
<ul>
<li>“Azteca_census_data_Jan_2018.csv”</li>
</ul>
</li>
</ul>
<p><strong>R script:</strong> <em>“2024_10_16_Processing_death_rate_data_from_netlogo_model”</em></p>
<ul>
<li>Script to process death rate trends from the netlogo consumer-resource model.<br>
</li>
<li><strong>Relies on data from:</strong><br>
<ul>
<li>“Netlogo_consumer_resrouce_model_output.csv"</li>
</ul>
</li>
<li><strong>Produces:</strong><br>
<ul>
<li>"2023_11_19_azteca_DSP_netlogo_mortality_df_with_replicates.csv"</li>
</ul>
</li>
</ul>
<p><strong>R script:</strong> <em>“2024_10_16_Netlogo_spatial_output_Fig6_landscape”</em></p>
<ul>
<li>Makes figures from the output of the netlogo consumer-resource model. Data is embedded in the script which was copied directly from runs of the netlogo model to get spatial explicit information on consumers and resources.<br>
</li>
<li><strong>Relies on data from:</strong><br>
<ul>
<li>“Netlogo_consumer_resource_model_output.csv"</li>
</ul>
</li>
</ul>
<p><strong>R script:</strong> <em>“2024_10_16_Empirical_and_model_comparisions_Death_rates_and_Spatial_patterns_Fig5_Fig8_Fig9”</em></p>
<ul>
<li>Script to compare death rate and spatial patterning trends from empirical data and netlogo consumer-resource model.<br>
</li>
<li><strong>Relies on data from:</strong><br>
<ul>
<li>“azteca_phorid_model_data_for_paper_Feb27_202.csv”</li>
<li>“2023_11_15_Azteca_DSP_empirical_death_rates_full_df.csv”</li>
<li>“2023_11_19_azteca_DSP_netlogo_mortality_df_with_replicates.csv”</li>
</ul>
</li>
</ul>
<p><strong>R script:</strong> <em>“2024_10_16_Azteca_DSP_netlogo_age_specific_death_rate_threshold_sensitivity_analysis”</em></p>
<ul>
<li>Sensitivity analysis for the death rate trends in the empirical data and model as described in the supplementary material.<br>
</li>
<li><strong>Relies on data from:</strong><br>
<ul>
<li>“2023_11_19_azteca_DSP_netlogo_mortality_df_with_replicates.csv”</li>
<li>“Azteca_census_data_Jan_2018.csv”</li>
</ul>
</li>
</ul>
<p><strong>R script:</strong> <em>“2024_10_16_Frequency_distribution_empirical_model_comparison_Fig7"</em></p>
<ul>
<li>Script to make Fig 7 comparing the landscape scale spatial patterns between the model and the empirical data.<br>
</li>
<li><strong>Relies on data from:</strong><br>
<ul>
<li>“Netlogo_consumer_resource_model_output.csv”</li>
<li>“Azteca_census_data_Jan_2018.csv”</li>
</ul>
</li>
</ul>
<p><strong>Netlogo file:</strong> <em>“2024_10_16_Netlogo_consumer_resource_model.nlogo”</em></p>
<ul>
<li>Implementation of the spatially explicit consumer-resource model that tracks demography of resources.</li>
</ul><p></p>