Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
v1.0.0
Browse files Browse the repository at this point in the history
see NEWS
  • Loading branch information
obrl_soil committed Jan 16, 2018
1 parent a611dfc commit c3fedf9
Show file tree
Hide file tree
Showing 55 changed files with 1,552 additions and 676 deletions.
19 changes: 10 additions & 9 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
Package: dsmartr
Type: Package
Title: dsmartr: An R implementation of the DSMART algorithm
Version: 0.0.0.9013
Date: 2017-08-24
Version: 1.0.0
Date: 2018-01-09
Authors@R: c(
person("Lauren", "O'Brien", email = "obrl_soil@gmail.com", role = c('aut', 'cre')),
person("Nathan", "Odgers", email = "[email protected]", role = 'aut'),
person("Brendan", "Malone", email = "[email protected]", role = 'aut'))
person("Lauren", "O'Brien", email = "obrlsoilau@gmail.com", role = c('aut', 'cre')),
person("Nathan", "Odgers", email = "[email protected]", role = 'ctb'),
person("Brendan", "Malone", email = "[email protected]", role = 'ctb'))
Description: This package reinterprets legacy soil mapping by correlating existing map information with higher-density environmental data.
URL: https://github.com/obrl-soil/dsmartr
BugReports: https://github.com/obrl-soil/dsmartr/issues
Depends: R (>= 3.3.0)
Depends: R (>= 3.3.0),
raster,
sp,
sf
Imports:
C50,
bindrcpp,
Expand All @@ -19,12 +22,10 @@ Imports:
magrittr,
methods,
purrr,
raster,
rgdal,
rgeos,
rlang,
sf (>= 0.5),
snow,
sp,
stats,
tidyr,
units,
Expand Down
38 changes: 25 additions & 13 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# Generated by roxygen2: do not edit by hand

export(dsmartr_check_polygons)
export(dsmartr_class_maps)
export(dsmartr_collate)
export(dsmartr_eval_npred)
export(dsmartr_eval_nxpred)
export(dsmartr_eval_pgap)
export(dsmartr_eval_ties)
export(dsmartr_iterate)
export(dsmartr_most_likely)
export(dsmartr_pred_masks)
export(dsmartr_prep_points)
export(dsmartr_prep_polygons)
export(check_attributes)
export(class_maps)
export(collate)
export(eval_npred)
export(eval_pgap)
export(eval_ties)
export(in_range)
export(iterate)
export(most_likely)
export(prediction_masks)
export(prep_points)
export(prep_polygons)
export(strict_cfp)
importFrom(C50,C5.0)
importFrom(dplyr,distinct)
importFrom(dplyr,filter)
Expand All @@ -23,31 +24,42 @@ importFrom(methods,is)
importFrom(purrr,map)
importFrom(purrr,map2_lgl)
importFrom(purrr,map_int)
importFrom(raster,alignExtent)
importFrom(raster,beginCluster)
importFrom(raster,calc)
importFrom(raster,cellFromPolygon)
importFrom(raster,cellFromXY)
importFrom(raster,clusterR)
importFrom(raster,crop)
importFrom(raster,crs)
importFrom(raster,endCluster)
importFrom(raster,extent)
importFrom(raster,extract)
importFrom(raster,getCluster)
importFrom(raster,inMemory)
importFrom(raster,intersect)
importFrom(raster,ncell)
importFrom(raster,nlayers)
importFrom(raster,raster)
importFrom(raster,rasterToPoints)
importFrom(raster,ratify)
importFrom(raster,readAll)
importFrom(raster,stack)
importFrom(raster,unstack)
importFrom(raster,writeRaster)
importFrom(raster,xyFromCell)
importFrom(rgeos,gIntersection)
importFrom(rgeos,gIntersects)
importFrom(rgeos,gUnaryUnion)
importFrom(sf,st_area)
importFrom(sf,st_as_sf)
importFrom(sf,st_geometry)
importFrom(sf,st_point)
importFrom(sf,st_set_crs)
importFrom(sf,st_set_geometry)
importFrom(sf,st_sfc)
importFrom(sf,st_transform)
importFrom(sf,write_sf)
importFrom(sf,st_write)
importFrom(sp,spTransform)
importFrom(stats,complete.cases)
importFrom(stats,na.omit)
Expand Down
12 changes: 12 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
## v.1.0.0 'what I did on my holidays'
* Happy New Year, have an API change. Took 'dsmartr_' out of all function names because Twitter Said
* Added @importFroms to data.R so sf/sp/raster don't need to be libraried
* switched to custom function 'strict_cfp' for returning cell numbers that intersect polygons - better performance, plus old way has some obscure bugs with particular geometries
* Covariate samples now write to GPKG as slow write issue has been resolved (see sf issue #470)
* all internal functions separated from wrappers, enabling unit testing
* Core functions all have unit tests
* prediction_masks function corrected
* eval_npred and eval_nxpred functions combined
* Documentation updated
* Regenerated demo data with some tidying up, particularly soil map geometry

## v.0.0.0.9013

* simplified and debugged `dsmartr_class_maps`
Expand Down
9 changes: 5 additions & 4 deletions R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@
#' A dataset containing an extract of 1:100,000 scale soils mapping from the Whitsunday coast area.
#' The complete dataset can be viewed in the \href{https://qldglobe.information.qld.gov.au/}{Queensland
#' Globe.} Data was extracted from the Queensland Soil and Land Information (SALI) database in 2017
#' and formatted for dsmartr in R 3.3.
#' @format A tbl/sf dataframe of mixed POLYGON/MULTIPOLYGON types in EPSG:3577, with 100 rows
#' and formatted for dsmartr in R 3.4.2.
#' @format An sf data.frame of POLYGON type in EPSG:3577, with 105 rows
#' and 10 variables:
#' \describe{
#' \item{PROJECT_CODE}{Three-letter code identifying the soil survey}
Expand All @@ -82,18 +82,19 @@
#' \item{PERC_1}{Estimated percentage of the map unit occupied by CLASS_1}
#' \item{PERC_2}{Estimated percentage of the map unit occupied by CLASS_2}
#' \item{PERC_3}{Estimated percentage of the map unit occupied by CLASS_3}
#' \item{geom}{list-column with class 'sfc_GEOMETRY', 'sfc'}}
#' \item{geom}{list-column with class 'sfc_POLYGON', 'sfc'}}
#' @source \itemize{
#' \item{\url{https://publications.qld.gov.au/dataset/soils-whitsunday-coast-wcs}}
#' \item{\url{https://www.qld.gov.au/environment/land/soil/soil-data/survey-types/}}}
#' @note This object's geometry has its precision attribute set to one decimal place (approx 10cm on the ground).
'heronvale_soilmap'

#' Data: Decoded soil class names
#'
#' A table of soil class labels found in 'heronvale_soilmap' and 'heronvale_known_sites', along with
#' their full names. Explanations of the concept associated with each soil name are available in the
#' report associated with this mapping project.
#' @format A tibble with 38 rows and 2 columns:
#' @format A data.frame with 37 rows and 2 columns:
#' \describe{
#' \item{CLASS}{Soil class label}
#' \item{NAME}{Soil class name}}
Expand Down
10 changes: 6 additions & 4 deletions R/dsmartr.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
#' dsmartr is an approach to the DSMART model (Odgers, 2014), which attempts increase the
#' level of detail in legacy soil maps. Relationships between these maps and various environmental
#' datasets are used to build a classification tree model. The model is used to map the map
#' components as a fine-scaled raster. This process is repeated multiple times, with variation introduced around sample location and
#' soil class proportions to vary the outputs somewhat. The model realisations are then processed
#' to give a 'most likely' soils map. Refer to the package vignette for more detail.
#' components as a fine-scaled raster. This process is repeated multiple times, with variation
#' introduced around sample location and soil class proportions to vary the outputs somewhat. The
#' model realisations are then processed to give a 'most likely' soils map. Refer to the package
#' vignette for more detail.
#'
#' @references Odgers, N.P., Sun, W., McBratney, A.B., Minasny, B., Clifford, D., (2014)
#' \href{http://dx.doi.org/10.1016/j.geoderma.2013.09.024}{Disaggregating and harmonising soil map
#' units through resampled classification trees}. Geoderma, 214-215: 91-100.
#'
"_PACKAGE"

utils::globalVariables(names = c("CELL"), package = 'dsmartr')
Loading

0 comments on commit c3fedf9

Please sign in to comment.