pre_model - PNHP/Regional_SDM GitHub Wiki

Pre-modeling assumptions

At this point we are assuming that:

  1. Environmental data are prepared and stored in geotiff format and saved in one folder that is accessible to R.

  2. EO polygon data have been screened by a person. Polygon data should have these things:

  • a column designating representational accuracy (RA) of each polygon. RA entries should taken from this list: "very high", "high", "medium", "low", "very low"
  • a column designating the species scientific name (SNAME)
  • a column designating EO_ID. Note that these can repeat among states and they need to be unique, so appending them with a state code may be necessary. I've created a text field named EO_ID_ST and records look like this: "NJ_2345", "MA_1357"
  • no overlapping polygons (use topology tools in GIS to check and merge/remove dups - especially a problem with principle-sub relationships).
  • current code will handle multi-part polys so you don't need to worry about that
  1. A set of background random points are prepared and attributed
  • this could be the same for all of us. Kirsten and Amy have talked about avoiding using training points near the very edges of our study area, so it may be most consistent for us to have a single data set with this rule applied and shared among all of us.
  1. You have these R packages installed
  • RSQLite
  • ROCR
  • vcd
  • abind
  • foreign
  • randomForest
  • spsurvey
  • sp
  • rgdal
  • raster
  • knitr
  • xtable
  1. You'll also need to install MikTeX in order to get the metadata to export to pdf. Installation info here:
  • http://miktex.org/
  • You can use other TeX compilers, but this is one of the most popular for windows.
  1. You have an sqlite viewer installed to help checking the SQLite database. DB Browser for SQLite (http://sqlitebrowser.org/) is a nice one.
  • The scripts refer to lookup tables in an SQLite DB. They also write information to the SQLite DB. There is a text representation (DB dump) of the DB we are using in this repository. The script (and instructions) for creating the DB from this text file is in the script (preproc_getCleanSqliteDB.R).