Skip to content

Commit

Permalink
Updates accompanying manuscript revisions. Introduce different model …
Browse files Browse the repository at this point in the history
…versions handling species that are not associated to agriculturally influenced habitats differently
  • Loading branch information
nefff1 committed Nov 14, 2022
1 parent ff3a7f4 commit 3a56d89
Show file tree
Hide file tree
Showing 7 changed files with 1,806 additions and 203 deletions.
276 changes: 276 additions & 0 deletions Other/Agricultural_species.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,276 @@
Adscita alpina
Adscita dujardini
Adscita geryon
Adscita statices
Aglais io
Aglais urticae
Agriades glandon
Agriades orbitulus
Anthocharis cardamines
Aphantopus hyperantus
Aporia crataegi
Araschnia levana
Aricia agestis
Aricia artaxerxes
Aricia nicias
Boloria dia
Boloria euphrosyne
Boloria napaea
Boloria pales
Boloria selene
Boloria titania
Brenthis daphne
Brenthis ino
Brintesia circe
Cacyreus marshalli
Callophrys rubi
Carcharodus alceae
Carterocephalus palaemon
Chazara briseis
Coenonympha arcania
Coenonympha darwiniana
Coenonympha gardetta
Coenonympha glycerion
Coenonympha pamphilus
Coenonympha tullia
Colias alfacariensis
Colias crocea
Colias hyale
Colias palaeno
Colias phicomone
Cupido alcetas
Cupido argiades
Cupido minimus
Cupido osiris
Cyaniris semiargus
Erebia aethiops
Erebia albergana
Erebia arvernensis
Erebia bubastis
Erebia epiphron
Erebia eriphyle
Erebia euryale
Erebia flavofasciata
Erebia manto
Erebia medusa
Erebia melampus
Erebia mnestra
Erebia oeme
Erebia pandrose
Erebia pharte
Erebia pronoe
Erebia sudetica
Erebia triarius
Erebia tyndarus
Erynnis tages
Euchloe simplonia
Eumedonia eumedon
Euphydryas aurinia
Euphydryas cynthia
Fabriciana adippe
Fabriciana niobe
Glaucopsyche alexis
Hamearis lucina
Hesperia comma
Heteropterus morpheus
Hipparchia fagi
Hipparchia genava
Hipparchia semele
Hipparchia statilinus
Hyponephele lycaon
Iolana iolas
Iphiclides podalirius
Issoria lathonia
Jordanita globulariae
Jordanita notata
Jordanita subsolana
Kretania trappi
Lampides boeticus
Lasiommata maera
Lasiommata megera
Lasiommata petropolitana
Leptidea juvernica
Leptidea sinapis
Lycaena alciphron
Lycaena dispar
Lycaena helle
Lycaena hippothoe
Lycaena phlaeas
Lycaena tityrus
Lycaena virgaureae
Lysandra bellargus
Lysandra coridon
Maniola jurtina
Melanargia galathea
Melitaea asteria
Melitaea athalia aggr
Melitaea aurelia
Melitaea cinxia
Melitaea deione
Melitaea diamina
Melitaea didyma
Melitaea parthenoides
Melitaea phoebe
Melitaea varia
Minois dryas
Muschampia floccifera
Muschampia lavatherae
Ochlodes sylvanus
Oeneis glacialis
Papilio machaon
Parnassius apollo
Parnassius mnemosyne
Phengaris alcon
Phengaris arion
Phengaris nausithous
Phengaris teleius
Pieris brassicae
Pieris bryoniae
Pieris mannii
Pieris napi
Pieris rapae
Plebejus argus
Plebejus argyrognomon
Plebejus idas
Polyommatus amandus
Polyommatus damon
Polyommatus daphnis
Polyommatus dorylas
Polyommatus eros
Polyommatus escheri
Polyommatus icarus
Polyommatus thersites
Pontia callidice
Pontia edusa
Pseudophilotes baton
Pyrgus accreta
Pyrgus alveus
Pyrgus andromedae
Pyrgus armoricanus
Pyrgus cacaliae
Pyrgus carlinae
Pyrgus carthami
Pyrgus malvae
Pyrgus malvoides
Pyrgus onopordi
Pyrgus serratulae
Pyrgus warrenensis
Pyronia tithonus
Rhagades pruni
Satyrium acaciae
Satyrium spini
Satyrus ferula
Scolitantides orion
Speyeria aglaja
Spialia sertorius
Thymelicus acteon
Thymelicus lineola
Thymelicus sylvestris
Vanessa atalanta
Vanessa cardui
Zygaena carniolica
Zygaena ephialtes
Zygaena exulans
Zygaena fausta
Zygaena filipendulae
Zygaena lonicerae
Zygaena loti
Zygaena minos
Zygaena purpuralis
Zygaena romeo
Zygaena transalpina
Zygaena trifolii
Zygaena viciae
Aeropedellus variegatus
Aiolopus strepens
Aiolopus thalassinus
Anacridium aegyptium
Anonconotus alpinus
Antaxius pedestris
Arcyptera fusca
Barbitistes obtusus
Bohemanella frigida
Calliptamus barbarus
Calliptamus italicus
Calliptamus siciliae
Chorthippus albomarginatus
Chorthippus apricarius
Chorthippus biguttulus
Chorthippus brunneus
Chorthippus dorsatus
Chorthippus eisentrauti
Chorthippus mollis
Chorthippus montanus
Chorthippus parallelus
Chorthippus vagans
Chrysochraon dispar
Conocephalus dorsalis
Conocephalus fuscus
Decticus verrucivorus
Ephippiger ephippiger
Ephippiger terrestris
Ephippiger vicheti
Euchorthippus declivus
Eumodicogryllus bordigalensis
Eupholidoptera chabrieri
Euthystira brachyptera
Gomphocerippus rufus
Gomphocerus sibiricus
Gryllomorpha dalmatina
Gryllotalpa gryllotalpa
Gryllus campestris
Leptophyes albovittata
Leptophyes laticauda
Leptophyes punctatissima
Locusta migratoria
Mecostethus parapleurus
Metrioptera bicolor
Metrioptera brachyptera
Metrioptera fedtschenkoi
Metrioptera roeselii
Metrioptera saussuriana
Miramella alpina
Miramella formosanta
Myrmeleotettix maculatus
Nemobius sylvestris
Odontopodisma decipiens
Oecanthus pellucens
Oedaleus decorus
Oedipoda caerulescens
Oedipoda germanica
Omocestus haemorrhoidalis
Omocestus rufipes
Omocestus viridulus
Pachytrachis striolatus
Pezotettix giornae
Phaneroptera falcata
Phaneroptera nana
Pholidoptera aptera
Pholidoptera fallax
Pholidoptera griseoaptera
Pholidoptera littoralis
Platycleis albopunctata
Podisma pedestris
Podismopsis keisti
Polysarcus denticauda
Psophus stridulus
Pteronemobius heydenii
Ruspolia nitidula
Saga pedo
Sphingonotus caerulans
Stauroderus scalaris
Stenobothrus lineatus
Stenobothrus nigromaculatus
Stenobothrus rubicundulus
Stenobothrus stigmaticus
Stethophyma grossum
Tetrix bipunctata
Tetrix ceperoi
Tetrix subulata
Tetrix tenuicornis
Tetrix undulata
Tettigonia cantans
Tettigonia caudata
Tettigonia viridissima
Uvarovitettix depressus
Yersinella raymondii
18 changes: 11 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,30 @@ The following R code files are included in the folder *R_Code*:

- **R_Main_analyses.R**: Main file containing all the relevant analyses reported in the study. Relies on processed data originating from analyses based on code in other files.

- **R_Climate_change.R**: Code used to compute climate change variables
- **R_Climate_change.R**: Code used to compute climate change variables.

- **R_Land_use_change.R**: Code used to compute land-use change variables
- **R_Land_use_change.R**: Code used to compute land-use change variables.

- **R_Temperature_niche.R**: Code used to compute species' temperature niches
- **R_Temperature_niche.R**: Code used to compute species' temperature niches.

- **R_Proportion_Switzerland.R**: Code used to calculate species distribution proportions in Switzerland
- **R_Proportion_Switzerland.R**: Code used to calculate species distribution proportions in Switzerland.

- **R_Occupancy_detection_models.R**: Code used to prepare species records data and run occupancy-detection models. This code was run on a HPC cluster.

- **f_occ_det.R**: Helper function used to run occupancy-detection models in Stan.

The following Stan code files are included in the folder *Stan_Code*:

- **Stan_regression.stan**: Stan model code of the regression model fitted to species trends.
- **Stan_regression_full.stan**: Stan model code of the regression model fitted to species trends. Full model used for versions 2 and 3.

- **Stan_regression_restricted.stan**: Stan model code of the regression model fitted to species trends. Restricted model used for version 1 (parameter estimates for agricultural area and grassland-use intensity change only rely on species of agriculturally influenced habitats).

- **Stan_occ_det_cmdstan.stan**: Stan model code of the occupancy-detection models.

The folder *Other* contains:

- **Bash_start_HPC_cluster.sh**: example of the shell code used to run occupancy-detection models on the HPC cluster
- **Bash_start_HPC_cluster.sh**: example of the shell code used to run occupancy-detection models on the HPC cluster.

- **specieslist.txt**: List of all 390 study species and the insect groups they belong to.

- **specieslist.txt**: List of all 390 study species and the insect groups they belong to
- **Agricultural_species.txt**: List of species (partly) bound to agriculturally influenced habitats.
2 changes: 1 addition & 1 deletion R_Code/R_Climate_change.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ d_climate <- d_climate %>%
mutate(date_dummy = paste(year, as.numeric(month), 1, sep = "-"),
ndays = days_in_month(as.Date(date_dummy)))

# bioclimatic regions
# bioclimatic zones
d_zone <- fread('Data/d_zone.csv')

# records data
Expand Down
6 changes: 3 additions & 3 deletions R_Code/R_Land_use_change.R
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ for (region_i in unique(d_AgrArea_reg$zone)){
zone = region_i,
var = "AgrArea_prop")

# AgrArea -------------------------------------------------------------------------.
# AgrArea --------------------------------------------------------------------.
target_AgrArea <- d_AgrArea_reg %>%
filter(zone == region_i)

Expand Down Expand Up @@ -455,7 +455,7 @@ for (region_i in unique(d_AgrArea_reg$zone)){

for (i in 1:(50/timestep)){

# AgrArea_prop ------------------------------------------------------------------.
# AgrArea_prop -------------------------------------------------------------.

# change
change_mean <- mean(pred_AgrArea_prop[, i * timestep + 1] - pred_AgrArea_prop[, (i-1) * timestep + 1])
Expand Down Expand Up @@ -488,7 +488,7 @@ for (region_i in unique(d_AgrArea_reg$zone)){
bind_rows(d_as_gam_smry, .)


# IAR -------------------------------------------------------------------.
# IAR ----------------------------------------------------------------------.

# change
change_mean <- mean(pred_IAR[, i * timestep + 1] - pred_IAR[, (i-1) * timestep + 1])
Expand Down
Loading

0 comments on commit 3a56d89

Please sign in to comment.