Giter Site home page Giter Site logo

croatia_sdm's Introduction

Croatia SDM's version 0.01 (11/04/2023)

Croatia's Biom Species Distribution Models.

Description of model code files

  1. 01_make_spp_data.R – This reads the spreadsheets (contained in the “spp” directory, performs the filtering and writes a shapefile into a new directory in “SDM” that will contain the model results. I made the naming convention(s) fairly straight forward and defined by variables at the beginning of each file so, the should be easy to change. The data from the excel files that is written to each shapefile is named after the species and has the following columns: y", "obs_type", "species", "nobs", and, "dttm". The “y” column contains a binominal value for presence/absence and “obs_type” represents the data type being, “pres” and “real abs”.

  2. 02_create_sdm_covariates.R –I am not sure if you will use this or not but, it is a script for downloading raster data, projecting, and masking it to the project area. Following the logic of the rest of the code, the raster covariates are contained in a directory called “data”, one level down from root. The source resolution, or processed, resolution is 100m2. I believe the code is fairly clear so, should be adaptable in creating new data. The rasters currently in the data directory are:

  3. 03_croatia_sdm.R - There are some variables at the beginning of the script that can be changed to customize directory structure and model parameters. The pseudo absence data is created following the same column naming convention and is then merged with the spp data. The “obs_type” for pseudo absence is encoded as “pseudo abs”. The raster data is assigned to the resulting merged data is what is used in the model and is written out to a separate shapefile “traning_data.shp”. I am screening for observations that fall in the same pixel(s) and dropping the zero value if it cooccurs with a 1 else, it is the first duplicate observation. The data is screened for collinearity/multicollinearity and a parameter significance tests and model selection applied. I then apply an optimize fit based on prediction variance (only on the zero class) and a final model fit. Class imbalances is accounted for in each model based on a fractional Bootstrap sample associated with each class. The spatial prediction outputs a raster “spp_results.tif” that contains the probabilities and classified raster. The probability threshold derives 4 methods and averages the results. There seems to be fairly good agreement so, disparity is not expected. Model plots are output to “SDM_model.pdf” and the model object is saved as “SDM_model.RData”. I still need to add the cross-validation, to evaluate performance, and write out a validation report but, things are looking good. There is a standard error plot in the pdf.

Other code

  1. accuracy.R – Modification of rfUtilities function which provides validation metrics based on confusion matrix

  2. check.packages.R - Checks if required libraries are installed and adds them if not in library. Also defines library environment and mirror. Can be used to simply add required libraries to current R environmnet.

  3. occurrence.threshold.R - Modification of rfUtilities function to include log loss as option

Contact:

Iva Mihalić BIOM, Croatia [email protected]

Louie Taylor BIOM, Croatia [email protected]

Jeffrey S. Evans, Ph.D. Senior Landscape Ecologist & Biometrician The Nature Conservancy | Global Protect, Science [email protected]

croatia_sdm's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

mzec

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.