Skip to content

Commit

Permalink
fixing build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
fawda123 committed Feb 27, 2024
1 parent 8569991 commit 6019059
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ importFrom(plotly,layout)
importFrom(plotly,plot_ly)
importFrom(plotly,subplot)
importFrom(reactable,colDef)
importFrom(rnoaa,ncdc)
importFrom(stats,ecdf)
importFrom(stats,lm)
importFrom(stats,median)
Expand Down
8 changes: 5 additions & 3 deletions R/anlz_hydroload.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
#' @param trace logical indicating if function progress is printed in the consol
#'
#' @details
#' This function uses rainfall and streamflow data from NOAA and USGS and requires an API key. See the "Authentication" section under the help file for \code{\link[rnoaa]{ncdc}}. This key can be added to the R environment file and called for later use, see the examples.
#' This function uses rainfall and streamflow data from NOAA and USGS and requires an API key. See the "Authentication" section under the help file for ncdc in the defunct rnoaa package. This key can be added to the R environment file and called for later use, see the examples.
#'
#' These estimates are used in annual compliance assessment reports produced by the Tampa Bay Nitrogen Management Consortium. Load estimates and adjustment factors are based on regression models in https://drive.google.com/file/d/11NT0NQ2WbPO6pVZaD7P7Z6qjcwO1jxHw/view?usp=drivesdk
#'
#' @concept analyze
#'
#' @importFrom rnoaa ncdc
#'
#' @return A data frame with hydrological load estimates by bay segments for the requested years
#' @export
#'
Expand Down Expand Up @@ -53,13 +55,13 @@ anlz_hydroload <- function(yrs, noaa_key = NULL, trace = FALSE){
end <- paste0(yr, "-12-31")

# download NOAA UWS rainfall station data
sp_rainfall <- rnoaa::ncdc(datasetid = "GHCND", stationid = "GHCND:USW00092806",
sp_rainfall <- ncdc(datasetid = "GHCND", stationid = "GHCND:USW00092806",
datatypeid = "PRCP", startdate = start, enddate = end,
limit = 500, add_units = TRUE, token = noaa_key)
sp_rain <- sp_rainfall$data %>%
dplyr::summarise(sum = sum(value)/254)

tia_rainfall <- rnoaa::ncdc(datasetid = "GHCND", stationid = "GHCND:USW00012842",
tia_rainfall <- ncdc(datasetid = "GHCND", stationid = "GHCND:USW00012842",
datatypeid = "PRCP", startdate = start, enddate = end,
limit = 500, add_units = TRUE, token = noaa_key)
tia_rain <- tia_rainfall$data %>%
Expand Down
2 changes: 1 addition & 1 deletion R/globalVariables.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ globalVariables(c("Chlorophyll_aQ", "Latitude", "Longitude", "SampleTime", "Samp
"indnm", "brk", "cls", "conc", "exced", "gmean", "MWQA", "station_tot",
"sumgt400", "yearfac", "nyrs", "ActivityDepthHeightMeasure.MeasureUnitCode",
"ActivityDepthHeightMeasure.MeasureValue", "chla_target", "chla_val",
"la_target", "la_val", "MonitoringLocationTypeName"))
"la_target", "la_val", "MonitoringLocationTypeName", "loadest", "out1"))

#' @importFrom grDevices rgb
NULL
Expand Down
2 changes: 1 addition & 1 deletion man/anlz_hydroload.Rd

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

0 comments on commit 6019059

Please sign in to comment.