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 <- readNWISdv("04085427", "00060", "2012-01-01", "2012-06-30")
#> GET: https://waterservices.usgs.gov/nwis/dv/?site=04085427&format=waterml,1.1&ParameterCd=00060&StatCd=00003&startDT=2012-01-01&endDT=2012-06-30
nwis_citation <- create_NWIS_bib(nwisData)
nwis_citation
#> U.S. Geological Survey (2024). _National Water Information System data
#> available on the World Wide Web (USGS Water Data for the Nation)_.
#> doi:10.5066/F7P55KJN <https://doi.org/10.5066/F7P55KJN>, Accessed Dec
#> 03, 2024,
#> <https://waterservices.usgs.gov/nwis/dv/?site=04085427&format=waterml,1.1&ParameterCd=00060&StatCd=00003&startDT=2012-01-01&endDT=2012-06-30>.

print(nwis_citation, style = "Bibtex")
#> @Manual{,
#>   title = {National Water Information System data available on the World Wide Web (USGS Water Data for the Nation)},
#>   author = {{U.S. Geological Survey}},
#>   doi = {10.5066/F7P55KJN},
#>   note = {Accessed Dec 03, 2024},
#>   year = {2024},
#>   url = {https://waterservices.usgs.gov/nwis/dv/?site=04085427&format=waterml,1.1&ParameterCd=00060&StatCd=00003&startDT=2012-01-01&endDT=2012-06-30},
#> }
print(nwis_citation, style = "citation")
#> U.S. Geological Survey, 2024, National Water Information System data
#> available on the World Wide Web (USGS Water Data for the Nation),
#> accessed Dec 03, 2024, at
#> https://waterservices.usgs.gov/nwis/dv/?site=04085427&format=waterml,1.1&ParameterCd=00060&StatCd=00003&startDT=2012-01-01&endDT=2012-06-30,
#> https://dx.doi.org/10.5066/F7P55KJN
#> 
#> A BibTeX entry for LaTeX users is
#> 
#>   @Manual{,
#>     title = {National Water Information System data available on the World Wide Web (USGS Water Data for the Nation)},
#>     author = {{U.S. Geological Survey}},
#>     doi = {10.5066/F7P55KJN},
#>     note = {Accessed Dec 03, 2024},
#>     year = {2024},
#>     url = {https://waterservices.usgs.gov/nwis/dv/?site=04085427&format=waterml,1.1&ParameterCd=00060&StatCd=00003&startDT=2012-01-01&endDT=2012-06-30},
#>   }
# }