R/initializeMazamaSpatialUtils.R

Defines functions initializeMazamaSpatialUtils

Documented in initializeMazamaSpatialUtils

#' @export
#' @import MazamaCoreUtils
#'
#' @title Initialize Mazama Spatial Utils
#'
#' @param spatialDataDir directory where spatial datasets are created
#' @param stateCodeDataset MazamaSpatialUtils dataset returning ISO 3166-2 alpha-2 stateCodes
#' @description Convenience function that wraps:
#'
#' \preformatted{
#'   logger.setup()
#'   logger.setLevel(WARN)
#'   setSpatialDataDir('~/Data/Spatial')
#'   loadSpatialData('NaturalEarthAdm1')
#' }
#'
#' If file logging is desired, these commands should be run individually with
#' output log files specified as arguments to \code{logger.setup()}.
#' @seealso \code{\{link{logger.setup}}

initializeMazamaSpatialUtils <- function(
  spatialDataDir = '~/Data/Spatial',
  stateCodeDataset = 'NaturalEarthAdm1'
) {

  setSpatialDataDir(spatialDataDir)
  loadSpatialData(stateCodeDataset)

}

Try the PWFSLSmoke package in your browser

Any scripts or data that you put into this service are public.

PWFSLSmoke documentation built on July 8, 2020, 7:19 p.m.