Skip to content
Merged
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
8 changes: 4 additions & 4 deletions R/addWaterYear.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
#'
#' @examples
#' \donttest{
#' nwisData <- readNWISdv("04085427", "00060", "2022-01-01", "2022-06-30")
#' nwisData <- addWaterYear(nwisData)
#' # nwisData <- readNWISdv("04085427", "00060", "2022-01-01", "2022-06-30")
#' # nwisData <- addWaterYear(nwisData)
#'
#' wqpData <- readWQPqw("USGS-01594440", "01075", "", "")
#' wqpData <- addWaterYear(wqpData)
#' # wqpData <- readWQPqw("USGS-01594440", "01075", "", "")
#' # wqpData <- addWaterYear(wqpData)
#' }
addWaterYear <- function(rawData) {
allowedDateColNames <- c(
Expand Down
12 changes: 6 additions & 6 deletions R/citations.R
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ create_NWIS_bib <- function(x) {
#'
#' @examples
#' \donttest{
#' WQPData <- readWQPqw("USGS-05288705",
#' parameterCd = "00300")
#' wqp_citation <- create_WQP_bib(WQPData)
#' wqp_citation
#' # WQPData <- readWQPqw("USGS-05288705",
#' # parameterCd = "00300")
#' # wqp_citation <- create_WQP_bib(WQPData)
#' # wqp_citation
#'
#' print(wqp_citation, style = "Bibtex")
#' print(wqp_citation, style = "citation")
#' # print(wqp_citation, style = "Bibtex")
#' # print(wqp_citation, style = "citation")
#' }
create_WQP_bib <- function(x) {
textVersion <- paste0(
Expand Down
4 changes: 2 additions & 2 deletions inst/CITATION
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ bibentry(bibtype = "Manual",
title = "dataRetrieval: R packages for discovering and retrieving water data available from U.S. federal hydrologic web services",
publisher = "U.S. Geological Survey",
address="Reston, VA",
version = "2.7.25",
version = "2.7.26",
institution = "U.S. Geological Survey",
year = 2026,
doi = "10.5066/P9X4L3GE",
textVersion = "De Cicco, L.A., Hirsch, R.M., Lorenz, D., Watkins, W.D., Johnson, M., Blodgett, D.L., Hinman, E.D., Zemmels, J., 2026, dataRetrieval: R packages for discovering and retrieving water data available from Federal hydrologic web services, v.2.7.25, doi:10.5066/P9X4L3GE"
textVersion = "De Cicco, L.A., Hirsch, R.M., Lorenz, D., Watkins, W.D., Johnson, M., Blodgett, D.L., Hinman, E.D., Zemmels, J., 2026, dataRetrieval: R packages for discovering and retrieving water data available from Federal hydrologic web services, v.2.7.26, doi:10.5066/P9X4L3GE"
)
8 changes: 4 additions & 4 deletions man/addWaterYear.Rd

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

12 changes: 6 additions & 6 deletions man/create_WQP_bib.Rd

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

30 changes: 15 additions & 15 deletions tutorials/basic_slides_deck.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -682,24 +682,24 @@ Here are a bunch of valid inputs:
#| code-line-numbers: "1-9|10-11|12-15|16-19"
#| label: rtime
# Ask for exact times:
time = "2025-01-01"
time = as.Date("2025-01-01")
time = "2025-01-01T23:20:50Z"
time = as.POSIXct(
time <- "2025-01-01"
time <- as.Date("2025-01-01")
time <- "2025-01-01T23:20:50Z"
time <- as.POSIXct(
"2025-01-01T23:20:50Z",
format = "%Y-%m-%dT%H:%M:%S",
tz = "UTC"
)
# Ask for specific range
time = c("2024-01-01", "2025-01-01") # or Dates or POSIXs
time <- c("2024-01-01", "2025-01-01") # or Dates or POSIXs
# Asking beginning of record to specific end:
time = c(NA, "2024-01-01") # or Date or POSIX
time <- c(NA, "2024-01-01") # or Date or POSIX
# Asking specific beginning to end of record:
time = c("2024-01-01", NA) # or Date or POSIX
time <- c("2024-01-01", NA) # or Date or POSIX
# Ask for period
time = "P1M" # past month
time = "P7D" # past 7 days
time = "PT12H" # past hours
time <- "P1M" # past month
time <- "P7D" # past 7 days
time <- "PT12H" # past hours
```

### Python
Expand Down Expand Up @@ -896,7 +896,7 @@ leaflet(
data = site_info_refined |>
sf::st_transform(crs = leaflet_crs)
) |>
addProviderTiles("CartoDB.Positron") |>
addProviderTiles("Esri.WorldGrayCanvas") |>
addCircleMarkers(popup = ~monitoring_location_name, radius = 3, opacity = 1)
```

Expand All @@ -909,7 +909,7 @@ If you have `geopandas` installed, the function will return a GeoDataFrame with
site_info_refined.set_crs(crs="WGS84").explore(
marker_kwds=dict(radius=7),
style_kwds=dict(opacity=1, fillOpacity=1),
tiles="CartoDB.Positron",
tiles="Esri.WorldGrayCanvas",
)
```

Expand Down Expand Up @@ -1023,7 +1023,7 @@ leaflet(
data = tus_summary |>
sf::st_transform(crs = leaflet_crs)
) |>
addProviderTiles("CartoDB.Positron") |>
addProviderTiles("Esri.WorldGrayCanvas") |>
addCircleMarkers(popup = ~monitoring_location_name, radius = 3, opacity = 1)
```

Expand Down Expand Up @@ -1093,7 +1093,7 @@ leaflet(
data = latest_discharge |>
sf::st_transform(crs = leaflet_crs)
) |>
addProviderTiles("CartoDB.Positron") |>
addProviderTiles("Esri.WorldGrayCanvas") |>
addCircleMarkers(
popup = paste(
latest_discharge$monitoring_location_id,
Expand Down Expand Up @@ -1124,7 +1124,7 @@ leaflet(
latest_discharge.set_crs(crs="WGS84").explore(
marker_kwds=dict(radius=7),
style_kwds=dict(opacity=1, fillOpacity=1),
tiles="CartoDB.Positron",
tiles="Esri.WorldGrayCanvas",
column="value",
cmap="viridis",
zoom_start=10,
Expand Down
8 changes: 4 additions & 4 deletions tutorials/changes_slides_deck.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ leaflet(
data = site_info_refined |>
sf::st_transform(crs = leaflet_crs)
) |>
addProviderTiles("CartoDB.Positron") |>
addProviderTiles("Esri.WorldGrayCanvas") |>
addCircleMarkers(popup = ~monitoring_location_name, radius = 3, opacity = 1)
```

Expand Down Expand Up @@ -799,7 +799,7 @@ leaflet(
data = latest_dane_county |>
sf::st_transform(crs = leaflet_crs)
) |>
addProviderTiles("CartoDB.Positron") |>
addProviderTiles("Esri.WorldGrayCanvas") |>
addCircleMarkers(
popup = paste(
latest_dane_county$monitoring_location_id,
Expand Down Expand Up @@ -844,7 +844,7 @@ leaflet(
data = latest_dane_county_daily |>
sf::st_transform(crs = leaflet_crs)
) |>
addProviderTiles("CartoDB.Positron") |>
addProviderTiles("Esri.WorldGrayCanvas") |>
addCircleMarkers(
popup = paste(
latest_dane_county_daily$monitoring_location_id,
Expand Down Expand Up @@ -943,7 +943,7 @@ leaflet(
data = sites_mn_wi |>
sf::st_transform(crs = leaflet_crs)
) |>
addProviderTiles("CartoDB.Positron") |>
addProviderTiles("Esri.WorldGrayCanvas") |>
addCircleMarkers(
popup = ~monitoring_location_name,
color = ~ pal(drainage_area),
Expand Down
6 changes: 3 additions & 3 deletions vignettes/read_waterdata_functions.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ leaflet_crs <- "+proj=longlat +datum=WGS84" #default leaflet crs

leaflet(data = sites_wi |>
sf::st_transform(crs = leaflet_crs)) |>
addProviderTiles("CartoDB.Positron") |>
addProviderTiles("Esri.WorldGrayCanvas") |>
addCircleMarkers(popup = ~monitoring_location_name,
radius = 0.1,
opacity = 1)
Expand Down Expand Up @@ -397,7 +397,7 @@ pal <- colorNumeric("viridis", sites_mn_wi$drainage_area)

leaflet(data = sites_mn_wi |>
sf::st_transform(crs = leaflet_crs)) |>
addProviderTiles("CartoDB.Positron") |>
addProviderTiles("Esri.WorldGrayCanvas") |>
addCircleMarkers(popup = ~monitoring_location_name,
color = ~ pal(drainage_area),
radius = 0.1,
Expand Down Expand Up @@ -433,7 +433,7 @@ pal <- colorFactor("viridis", what_huc_sites$hydrologic_unit_code)

leaflet(data = what_huc_sites |>
sf::st_transform(crs = leaflet_crs)) |>
addProviderTiles("CartoDB.Positron") |>
addProviderTiles("Esri.WorldGrayCanvas") |>
addCircleMarkers(popup = ~monitoring_location_name,
color = ~ pal(hydrologic_unit_code),
radius = 0.1,
Expand Down
2 changes: 1 addition & 1 deletion vignettes/samples_data.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ map_it <- function(df){
leaflet_crs <- "+proj=longlat +datum=WGS84"

leaf_map <- leaflet::leaflet() |>
leaflet::addProviderTiles("CartoDB.Positron") |>
leaflet::addProviderTiles("Esri.WorldGrayCanvas") |>
leaflet::addCircleMarkers(data = df_sf |>
sf::st_transform(crs = leaflet_crs),
color = "red",
Expand Down
4 changes: 2 additions & 2 deletions vignettes/wqp_large_pull_script.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ library(leaflet)
attr(all_nitrogen, "siteInfo") |>
filter(!is.na(dec_lon_va)) |>
leaflet() |>
addProviderTiles("CartoDB.Positron") |>
addProviderTiles("Esri.WorldGrayCanvas") |>
addCircleMarkers(~dec_lon_va, ~dec_lat_va,
color = "red", radius = 3, stroke = FALSE,
fillOpacity = 0.8, opacity = 0.8,
Expand All @@ -170,4 +170,4 @@ For an extended discussion, see:

# Disclaimer

Any use of trade, firm, or product names is for descriptive purposes only and does not imply endorsement by the U.S. Government.
Any use of trade, firm, or product names is for descriptive purposes only and does not imply endorsement by the U.S. Government.
Loading