Skip to content

Commit

Permalink
update stat_locs and add data-raw for recreate
Browse files Browse the repository at this point in the history
  • Loading branch information
fawda123 committed Jun 24, 2024
1 parent c23c270 commit 680ee09
Show file tree
Hide file tree
Showing 9 changed files with 389 additions and 158 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@
^pkgdown$
^codecov\.yml$
^CRAN-SUBMISSION$
^data-raw$
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: SWMPr
Type: Package
Title: Retrieving, Organizing, and Analyzing Estuary Monitoring Data
Version: 2.5.0
Date: 2023-07-16
Date: 2023-06-24
Author: Marcus W. Beck [aut, cre],
Kimberly Cressman [ctb]
Maintainer: Marcus W. Beck <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion R/swmpr_misc.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' Locations of NERRS sites
#'
#' Location of NERRS sites in decimal degress and time offset from Greenwich mean time. Only active sites as of January 2015 are included. Sites are identified by five letters indexing the reserve and site names. The dataset is used to plot locations with the \code{\link{map_reserve}} function and to identify metabolic days with the \code{\link{ecometab}} function.
#' Location of NERRS sites in decimal degrees and time offset from Greenwich mean time. Only active sites are included. Sites are identified by five letters indexing the reserve and site names. The dataset is used to plot locations with the \code{\link{map_reserve}} function and to identify metabolic days with the \code{\link{ecometab}} function. Created from sampling_locations.csv provided by CDMO.
#'
#' @format A \code{\link[base]{data.frame}} object with 161 rows and 4 variables:
#' \describe{
Expand Down
368 changes: 368 additions & 0 deletions data-raw/sampling_stations.csv

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions data-raw/stat_locs.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

stat_locs <- readr::read_csv('data-raw/sampling_stations.csv') |>
dplyr::filter(Status == 'Active') |>
dplyr::select(
station_code = `Station Code`,
latitude = Latitude,
longitude = Longitude,
gmt_off = `GMT Offset`
) |>
dplyr::mutate(
station_code = substr(station_code, 1, 5),
latitude = as.numeric(latitude),
longitude = -1 * as.numeric(longitude)
) |>
dplyr::distinct()

usethis::use_data(stat_locs, overwrite = TRUE)
Binary file removed data/stat_locs.RData
Binary file not shown.
Binary file added data/stat_locs.rda
Binary file not shown.
155 changes: 0 additions & 155 deletions inst/stat_locs.csv

This file was deleted.

2 changes: 1 addition & 1 deletion man/stat_locs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 680ee09

Please sign in to comment.