Figure 1 generated with "01_concept/concept_col1.jl"
Figure 2 generated with "02_MBH_comb/MBH_comb_figure.jl"
Figure 3 generated with "03_corrected_HDR/true_hdr_comb_fig.jl"

SOM fig. S1 generated with "04_som/gamma/fixedCV.jl"
SOM fig. S2 generated with "04_som/theo_MBHDRfigs/s2.jl"
SOM fig. S3 generated with "04_som/theo_MBHDRfigs/s2.jl"
SOM fig. S4 generated with "04_som/theo_MBHDRfigs/s2.jl"
SOM fig. S5 generated with "04_som/theo_MBHDRfigs/s2.jl"
SOM fig. S6 generated with "04_som/delta_location_indpendence/somfig.jl"
SOM fig. S7 generated with "05_review/1-macarthur-reanalysis.jl"

Hypothesis tests mean-biased measures found in "02_MBH_com/empirical_hypo_test.jl"
Hypothesis test for negligble trend of delta found in "05_review/1-fig2t.jl"
Hypothesis tests heterogeneity-diversity relationships found in "03_corrected_HDR/empirical/analysis.jl"

Empirical data for global crop cover is stored in "02_MBH_comb/data/crop_cover/"
Empirical data for global elevation is stored in "02_MBH_comb/data/elevation/"
Empirical data for bird abundance and elevation is stored in "03_corrected_HDR/empirical/01_carnicer/data/"
Empirical data from MacArthurs' seminal paper on FHD is stored in "05_review/data/foliage_density.csv"

Step by step instructions:

1.	Download the julia programing language with a command line/terminal/shell:

	On Windows run 
	`
	winget install julia -s msstore 
	`

	On Mac or Linux run
	`
	curl -fsSL https://install.julialang.org | sh
	`

	or download from the julia website: https://julialang.org/downloads/
	Time taken < 1 minute


2.	Add julia to your PATH. Note that if you used the terminal/shell to install julia it is already added in your PATH. 


3.	Open the julia REPL in your terminal with
	`
	julia
	`


4.	In the julia REPL add the required packages with
	`
	] add CairoMakie, Distributions, GLM, HypothesisTests, SpecialFunctions, StatsBase, DelimitedFiles, ArchGDAL, Random, DataFrames, DataFramesMeta, ColorSchemes, CSV, ColorTypes, LaTeXStrings
	`
	(note `]` must be typed to enter the package manager). Version numbers for julia and packages are included in 'MI-HDR/Manifest.toml', should there be breaking changes.
	Time taken: ~3 minutes


5.	Close the julia REPL and open a new terminal/command line/shell in the location of the repository on your machine, e.g. 'C://Pellett_et_al_2024/'


6.	Run the desired scripts from above with e.g.
	`
	julia 01_concept/concept_col1.jl
	`
	The above command will generate figure 1 and store it in 'Pellett_et_al_2024/figures/'. The other figures can be created in the same way. For hypothesis tests, the results can be seen using the REPL or in a code editor like Visual Studio Code.
	Time taken for each script < 1 minute


https://doi.org/10.5281/zenodo.1156144