ropensci / tidyhydat

An R package to import Water Survey of Canada hydrometric data and make it tidy
https://docs.ropensci.org/tidyhydat
Apache License 2.0
70 stars 19 forks source link

Add HYDAT citation function #167

Open boshek opened 2 years ago

boshek commented 2 years ago

Using utils::bibentry for a way to cite HYDAT.

boshek commented 2 years ago

Something like this:|

hy_citation <- function() {
  title <- paste0(
    "Extracted from Environment and Climate Change Canada’s HYDAT.sqlite, released on ",
    as.Date(hy_version()$Date)
  )

  bibentry(
    bibtype = "Manual",
    title = title,
    author = person("Environment and Climate Change Canada"),
    year = format(hy_version()$Date, "%Y"),
    url = "https://collaboration.cmc.ec.gc.ca/cmc/hydrometrics/www/"
  )
}