header_tag.html

Skip to contents

Uses attributes from the NWIS functions to create data citations.

Usage

create_NWIS_bib(x)

Arguments

x

Any data returned from an NWIS function, must include "queryTime" and "url" attributes, which should come with the data by default.

Value

bibentry object to use for citing the data.

Details

See ?bibentry for more information.

Examples

# \donttest{
nwisData <- read_waterdata_daily(monitoring_location_id = "USGS-04085427",
                                 parameter_code = "00060",
                                 time = c("2012-01-01", "2012-06-30"))
#> Requesting:
#> https://api.waterdata.usgs.gov/ogcapi/v1/collections/daily/items?f=json&lang=en-US&monitoring_location_id=USGS-04085427&parameter_code=00060&time=2012-01-01%2F2012-06-30&limit=50000
#> Remaining requests this hour:1150 
nwis_citation <- create_NWIS_bib(nwisData)
#> Warning: NWIS servers are slated for decommission. Please begin to migrate to read_waterdata functions.
nwis_citation
#> U.S. Geological Survey (2026). _USGS Water Data for the Nation: U.S.
#> Geological Survey National Water Information System database_.
#> doi:10.5066/F7P55KJN <https://doi.org/10.5066/F7P55KJN>. Accessed Sep
#> 09, 2026.

print(nwis_citation, style = "Bibtex")
#> @Manual{,
#>   title = {USGS Water Data for the Nation: U.S. Geological Survey National Water Information System database},
#>   author = {{U.S. Geological Survey}},
#>   doi = {10.5066/F7P55KJN},
#>   note = {Accessed Sep 09, 2026},
#>   year = {2026},
#> }
print(nwis_citation, style = "citation")
#> U.S. Geological Survey, 2026, USGS Water Data for the Nation: U.S.
#> Geological Survey National Water Information System database, accessed
#> Sep 09, 2026, at https://dx.doi.org/10.5066/F7P55KJN
#> 
#> A BibTeX entry for LaTeX users is
#> 
#>   @Manual{,
#>     title = {USGS Water Data for the Nation: U.S. Geological Survey National Water Information System database},
#>     author = {{U.S. Geological Survey}},
#>     doi = {10.5066/F7P55KJN},
#>     note = {Accessed Sep 09, 2026},
#>     year = {2026},
#>   }
# }