Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
^data-raw$
^doc$
^Meta$
^_pkgdown\.yml$
^docs$
^pkgdown$
^\.github$
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
inst/doc
/doc/
/Meta/
docs
9 changes: 6 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,19 @@ Imports:
lubridate,
magrittr,
methods,
raster,
sf,
stringr,
terra
Suggests:
climateR (>= 0.3.5),
knitr,
raster,
rmarkdown,
testthat (>= 3.0.0),
tidyr,
tigris,
usethis
usethis,
tigris
Config/testthat/edition: 3
VignetteBuilder: knitr
Remotes:
mikejohnson51/climateR
7 changes: 6 additions & 1 deletion R/data_cropland_world_2015_era5.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#' Global cropland weights
#'
#' A data.table with ERA5 resolution returned by running secondary_weights() with cropland data from
#' 2015
#' 2015 from https://glad.umd.edu/dataset/croplands
#'
#' Dataset Reference: P. Potapov, S. Turubanova, M.C. Hansen, A. Tyukavina, V.
# Zalles, A. Khan, X.-P. Song, A. Pickens, Q. Shen, J. Cortez. (2021) Global
# maps of cropland extent and change show accelerated cropland expansion in the
# twenty-first century. Nature Food. https://doi.org/10.1038/s43016-021-00429-z
#'
"cropland_world_2015_era5"
6 changes: 0 additions & 6 deletions R/data_nj_counties.R

This file was deleted.

3 changes: 2 additions & 1 deletion R/global_variables.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@

globalVariables(c("cell_area_km2", "coverage_fraction", "day", "era5_grid",
"hour", "month", "poly_id", "sum_weight", "value", "w_area",
"w_sum", "weight", "x", "y", "year", "."))
"w_sum", "weight", "x", "y", "year", ".", "is_right_xmin",
"is_left_xmax"))
4 changes: 2 additions & 2 deletions R/overlay_weights.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#'
#' @examples
#' overlay_output_with_secondary_weights <- overlay_weights(
#' polygons = nj_counties, # Polygons outlining the 21 counties of New Jersey
#' polygons = tigris::counties("nj"), # Polygons outlining the 21 counties of New Jersey
#' polygon_id_col = "COUNTYFP", # The name of the column with the unique
#' # county identifiers
#' grid = era5_grid, # The grid to use when extracting area weights (era5_grid is the
Expand All @@ -32,7 +32,7 @@
#'
#'
#' overlay_output_without_secondary_weights <- overlay_weights(
#' polygons = nj_counties, # Polygons outlining the 21 counties of New Jersey
#' polygons = tigris::counties("nj"), # Polygons outlining the 21 counties of New Jersey
#' polygon_id_col = "COUNTYFP" # The name of the column with the unique county
#' # identifiers
#' )
Expand Down
Loading
Loading