Skip to content

Commit

Permalink
Stylecleaning (#147)
Browse files Browse the repository at this point in the history
Close #145. Code linting and extensive improvements to docs
  • Loading branch information
brews committed Aug 1, 2019
1 parent 90e0f58 commit b9e1b6e
Show file tree
Hide file tree
Showing 79 changed files with 3,371 additions and 1,964 deletions.
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ Imports:
reshape2,
plyr
RoxygenNote: 6.1.1
Roxygen: list(markdown = TRUE)
VignetteBuilder: knitr
6 changes: 4 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

Changes in this release:

* Added `as.fhx()`. This takes data frames, tibbles, and lists as input. It assumes they have "year", "series", and "rec_type" elements/columns and returns an fhx object. (Issue #120).
* Added `as.fhx()`. This takes data frames, tibbles, and lists as input. It assumes they have "year", "series", and "rec_type" elements/columns. It returns an `fhx` object. This makes life easier for people who work with the tidyverse. It helps make life easier for users who want to work with thier own non-FHX fire-history file formats. (Issue #120)

* Extensive improvement to documentation (e.g. Issue #145). This includes new "See Also" sections so users can find cool functions, fixes for spelling errors, and clarifications to dyslexic prose.

* Removed deprecated `run_sea()`. Be sure to use `sea()` now.

Expand All @@ -14,7 +16,7 @@ Changes in this release:

* Added unit tests for basic plotting function options.

* Minor internal code cleanup (Issue #130, Issue #88, Issue #133, Issue #136, Issue #88).
* Minor internal code cleanup (Issue #130, Issue #88, Issue #133, Issue #136, Issue #88) and code linting.


# burnr v0.4.0
Expand Down
89 changes: 63 additions & 26 deletions R/data.R
Original file line number Diff line number Diff line change
@@ -1,49 +1,86 @@
#' Los Griegos Peak plot2 fire-history data
#'
#' An fhx object with fire-history data from Los Griegos Peak, New Mexico.
#' An `fhx` object with fire-history data from Los Griegos Peak, New Mexico.
#'
#' @format An fhx object with 26 series from 1366 to 2012 CE. Each series is a string with 5 characters.
#' @format An fhx object with 26 series from 1366 to 2012 CE.
#'
#' @seealso [lgr2_meta] Los Griegos Peak metadata.
"lgr2"


#' Metadata for the Los Griegos Peak fire-history dataset
#'
#' A dataset with species information for the Los Griegos Peak plot2 fire-history dataset (`lgr2`).
#' @description
#' A data frame with species information for the Los Griegos Peak plot2
#' fire-history dataset ([lgr2]).
#'
#' @format A data frame with 26 rows and 2 variables:
#' \itemize{
#' \item TreeID: name of tree series
#' \item SpeciesID: abbreviated tree species
#' }
#' @format A `data.frame` with 26 rows and 2 variables:
#' * "TreeID": Name of tree series.
#' * "SpeciesID": Abbreviated tree species
#'
#' @seealso [lgr2] Log Griegos Peak fire-history data.
"lgr2_meta"


#' Peggy Mesa fire-history data
#'
#' An fhx object with fire-history data from Peggy Mesa. See dataset `pgm_meta` for metadata. Data from Guiterman, Christopher H., Ellis Q. Margolis, and Thomas W. Swetnam. 2015. "Dendroecological Methods For Reconstructing High-Severity Fire In Pine-Oak Forests." Tree-Ring Research 71 (2): 67-77. doi:10.3959/1536-1098-71.2.67.

#' @description
#' An `fhx` object with fire-history data from Peggy Mesa.
#'
#' @format An `fhx` object with 41 series from 1555 to 2013 CE.
#'
#' @source Guiterman, Christopher H., Ellis Q. Margolis, and
#' Thomas W. Swetnam. 2015. "Dendroecological Methods For Reconstructing
#' High-Severity Fire In Pine-Oak Forests." Tree-Ring Research 71 (2): 67-77.
#' doi:10.3959/1536-1098-71.2.67.
#'
#' @format An fhx object with 41 series from 1555 to 2013 CE. Each series is a string with 5 characters.
#' @seealso
#' * [pgm_meta] Peggy Mesa metadata.
#' * [pgm_pdsi] PDSI time-series for Peggy Mesa site.
"pgm"


#' Metadata for the Peggy Mesa fire-history dataset
#'
#' A dataset with species and location information for the Peggy Mesa fire-history dataset (`pgm`). Data from Guiterman, Christopher H., Ellis Q. Margolis, and Thomas W. Swetnam. 2015. "Dendroecological Methods For Reconstructing High-Severity Fire In Pine-Oak Forests." Tree-Ring Research 71 (2): 67-77. doi:10.3959/1536-1098-71.2.67.
#' @description
#' A data frame with species and location information for the Peggy Mesa
#' fire-history dataset ([pgm]).
#'
#' @format A `data.frame` with 41 rows and 5 variables:
#' * "TreeID": Name of tree series.
#' * "SpeciesID": Abbreviated tree species.
#' * "Latitude": latitude of tree in decimal degrees.
#' * "Longitude": longitude of tree in decimal degrees.
#' * "Elevation": tree elevation in meters.
#'
#' @source Guiterman, Christopher H., Ellis Q. Margolis, and
#' Thomas W. Swetnam. 2015. "Dendroecological Methods For Reconstructing
#' High-Severity Fire In Pine-Oak Forests." Tree-Ring Research 71 (2): 67-77.
#' doi:10.3959/1536-1098-71.2.67.
#'
#' @format A data frame with 41 rows and 5 variables:
#' \itemize{
#' \item TreeID: name of tree series
#' \item SpeciesID: abbreviated tree species
#' \item Latitude: latitude of tree in decimal degrees
#' \item Longitude: longitude of tree in decimal degrees
#' \item Elevation: tree elevation in meters
#' }
#' @seealso
#' * [pgm] Peggy Mesa fire-history data.
#' * [pgm_pdsi] PDSI time-series for Peggy Mesa site.
"pgm_meta"


#' Reconstructed PDSI time series for the Peggy Mesa fire-history dataset
#'
#' A tree-ring reconstructed Palmer Drought-Severity Index time series corresponding to the Peggy Mesa fire-history dataset (`pgm`) -- specifically, the Jemez Mountains area (gridpoint 133). The reconstruction is from The North American Drought Atlas (Cook and Krusic 2004).
#' @description
#' A tree-ring reconstructed Palmer Drought-Severity Index time series
#' corresponding to the Peggy Mesa fire-history dataset ([pgm]) -- specifically,
#' the Jemez Mountains area (gridpoint 133). The reconstruction is from The
#' North American Drought Atlas (Cook and Krusic 2004).
#'
#' @format A `data.frame` with 2004 rows and 1 variables. Row names give the
#' year for the reconstructed value:
#' * "RECON": The reconstructed PDSI series.
#'
#' @source Cook, E. R., and Krusic, P. J. (2004). The North American Drought
#' Atlas. Retrieved September 13, 2017, from
#' http://iridl.ldeo.columbia.edu/SOURCES/.LDEO/.TRL/.NADA2004/.pdsi-atlas.html
#'
#' @format A data frame with 2004 rows and 1 variables. Row names give the year for the reconstructed value:
#' \itemize{
#' \item RECON: The reconstructed PDSI series.
#' }
"pgm_pdsi"
#' @seealso
#' * [pgm] Peggy Mesa fire-history data.
#' * [pgm_meta] Peggy Mesa metadata.
"pgm_pdsi"
Loading

0 comments on commit b9e1b6e

Please sign in to comment.