{"id":825,"name":"canadaHCD","description":"Access Canadian Historical Climate Data from R.","url":"https://github.com/gavinsimpson/canadaHCD","last_synced_at":"2026-06-12T21:30:34.404Z","repository":{"id":70770891,"uuid":"59783439","full_name":"gavinsimpson/canadaHCD","owner":"gavinsimpson","description":"Access Canadian Historical Climate Data from R","archived":false,"fork":false,"pushed_at":"2023-09-22T14:01:42.000Z","size":4855,"stargazers_count":10,"open_issues_count":3,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-06-06T19:03:09.948Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gavinsimpson.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-05-26T21:08:37.000Z","updated_at":"2023-10-11T17:09:48.000Z","dependencies_parsed_at":"2023-09-21T19:45:25.571Z","dependency_job_id":"57bf5ce8-cef4-414a-8cdf-a6bf68a4ab53","html_url":"https://github.com/gavinsimpson/canadaHCD","commit_stats":{"total_commits":151,"total_committers":2,"mean_commits":75.5,"dds":0.09933774834437081,"last_synced_commit":"b7e846a57e7c9f7cce5263ca73bf06b3d8853a87"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gavinsimpson/canadaHCD","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinsimpson%2FcanadaHCD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinsimpson%2FcanadaHCD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinsimpson%2FcanadaHCD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinsimpson%2FcanadaHCD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gavinsimpson","download_url":"https://codeload.github.com/gavinsimpson/canadaHCD/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinsimpson%2FcanadaHCD/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34170161,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"owner":{"login":"gavinsimpson","name":"Gavin Simpson","uuid":"514696","kind":"user","description":"","email":"","website":"fromthebottomoftheheap.net","location":"Denmark","twitter":"ucfagls","company":"Aarhus University","icon_url":"https://avatars.githubusercontent.com/u/514696?u=d1a83968af3b73c440d1c003c5f6f47858591bcc\u0026v=4","repositories_count":194,"last_synced_at":"2024-06-11T15:57:49.314Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/gavinsimpson","funding_links":[],"total_stars":828,"followers":487,"following":10,"created_at":"2022-11-05T13:52:13.320Z","updated_at":"2024-06-11T15:57:53.093Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gavinsimpson","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gavinsimpson/repositories"},"packages":[],"commits":{"id":1254420,"full_name":"gavinsimpson/canadaHCD","default_branch":"main","total_commits":151,"total_committers":2,"total_bot_commits":0,"total_bot_committers":0,"mean_commits":75.5,"dds":0.09933774834437081,"past_year_total_commits":0,"past_year_total_committers":0,"past_year_total_bot_commits":0,"past_year_total_bot_committers":0,"past_year_mean_commits":0.0,"past_year_dds":0.0,"last_synced_at":"2026-06-08T20:00:28.969Z","last_synced_commit":"b7e846a57e7c9f7cce5263ca73bf06b3d8853a87","created_at":"2023-03-27T11:40:21.904Z","updated_at":"2026-06-08T20:00:28.879Z","committers":[{"name":"Gavin Simpson","email":"ucfagls@gmail.com","login":"gavinsimpson","count":136},{"name":"Conor Anderson","email":"conor@conr.ca","login":"ConorIA","count":15}],"past_year_committers":[],"commits_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinsimpson%2FcanadaHCD/commits","host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-06-10T00:00:07.748Z","repositories_count":6255109,"commits_count":884270441,"contributors_count":35062728,"owners_count":1164132,"icon_url":"https://github.com/github.png","host_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories"}},"issues_stats":{"full_name":"gavinsimpson/canadaHCD","html_url":"https://github.com/gavinsimpson/canadaHCD","last_synced_at":"2026-05-13T07:02:26.949Z","status":"error","issues_count":17,"pull_requests_count":12,"avg_time_to_close_issue":34342730.28571428,"avg_time_to_close_pull_request":7393718.583333333,"issues_closed_count":14,"pull_requests_closed_count":12,"pull_request_authors_count":1,"issue_authors_count":4,"avg_comments_per_issue":1.8235294117647058,"avg_comments_per_pull_request":1.9166666666666667,"merged_pull_requests_count":6,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":0,"past_year_pull_requests_count":0,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":null,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":0,"past_year_pull_request_authors_count":0,"past_year_issue_authors_count":0,"past_year_avg_comments_per_issue":null,"past_year_avg_comments_per_pull_request":null,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":0,"created_at":"2023-05-09T10:35:16.267Z","updated_at":"2026-05-13T07:02:26.950Z","repository_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinsimpson%2FcanadaHCD","issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/gavinsimpson%2FcanadaHCD/issues","issue_labels_count":{"bug":10,"enhancement":6},"pull_request_labels_count":{},"issue_author_associations_count":{"OWNER":7,"NONE":5,"CONTRIBUTOR":5},"pull_request_author_associations_count":{"CONTRIBUTOR":12},"issue_authors":{"gavinsimpson":7,"ConorIA":5,"BastienFR":3,"dankelley":2},"pull_request_authors":{"ConorIA":12},"host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-06-10T00:00:24.323Z","repositories_count":14788092,"issues_count":33449548,"pull_requests_count":110039362,"authors_count":11298975,"icon_url":"https://github.com/github.png","host_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories","owners_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/owners","authors_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors"},"past_year_issue_labels_count":{},"past_year_pull_request_labels_count":{},"past_year_issue_author_associations_count":{},"past_year_pull_request_author_associations_count":{},"past_year_issue_authors":{},"past_year_pull_request_authors":{},"maintainers":[{"login":"gavinsimpson","count":7,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/gavinsimpson"}],"active_maintainers":[]},"events":{"total":{},"last_year":{}},"keywords":[],"dependencies":[{"ecosystem":"actions","filepath":".github/workflows/R-CMD-check.yaml","sha":null,"kind":"manifest","created_at":"2023-09-21T19:45:24.143Z","updated_at":"2023-09-21T19:45:24.143Z","repository_link":"https://github.com/gavinsimpson/canadaHCD/blob/main/.github/workflows/R-CMD-check.yaml","dependencies":[{"id":13856859854,"package_name":"actions/checkout","ecosystem":"actions","requirements":"v3","direct":true,"kind":"composite","optional":false},{"id":13856859855,"package_name":"r-lib/actions/setup-pandoc","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":13856859856,"package_name":"r-lib/actions/setup-r","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":13856859857,"package_name":"r-lib/actions/setup-tinytex","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":13856859858,"package_name":"r-lib/actions/setup-r-dependencies","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":13856859859,"package_name":"r-lib/actions/check-r-package","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false}]},{"ecosystem":"actions","filepath":".github/workflows/pkgdown.yaml","sha":null,"kind":"manifest","created_at":"2023-09-21T19:45:24.291Z","updated_at":"2023-09-21T19:45:24.291Z","repository_link":"https://github.com/gavinsimpson/canadaHCD/blob/main/.github/workflows/pkgdown.yaml","dependencies":[{"id":13856859863,"package_name":"actions/checkout","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":13856859864,"package_name":"r-lib/actions/setup-pandoc","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":13856859865,"package_name":"r-lib/actions/setup-r","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":13856859866,"package_name":"r-lib/actions/setup-r-dependencies","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":13856859867,"package_name":"JamesIves/github-pages-deploy-action","ecosystem":"actions","requirements":"4.1.4","direct":true,"kind":"composite","optional":false}]},{"ecosystem":"actions","filepath":".github/workflows/readme-renderer.yaml","sha":null,"kind":"manifest","created_at":"2023-09-21T19:45:24.598Z","updated_at":"2023-09-21T19:45:24.598Z","repository_link":"https://github.com/gavinsimpson/canadaHCD/blob/main/.github/workflows/readme-renderer.yaml","dependencies":[{"id":13856859878,"package_name":"actions/checkout","ecosystem":"actions","requirements":"v3","direct":true,"kind":"composite","optional":false},{"id":13856859879,"package_name":"r-lib/actions/setup-pandoc","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":13856859880,"package_name":"r-lib/actions/setup-r","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":13856859881,"package_name":"r-lib/actions/setup-r-dependencies","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false}]},{"ecosystem":"actions","filepath":".github/workflows/test-coverage.yaml","sha":null,"kind":"manifest","created_at":"2023-09-21T19:45:24.852Z","updated_at":"2023-09-21T19:45:24.852Z","repository_link":"https://github.com/gavinsimpson/canadaHCD/blob/main/.github/workflows/test-coverage.yaml","dependencies":[{"id":13856859885,"package_name":"actions/checkout","ecosystem":"actions","requirements":"v3","direct":true,"kind":"composite","optional":false},{"id":13856859886,"package_name":"r-lib/actions/setup-r","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":13856859887,"package_name":"r-lib/actions/setup-r-dependencies","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false}]},{"ecosystem":"cran","filepath":"DESCRIPTION","sha":null,"kind":"manifest","created_at":"2023-09-21T19:45:25.298Z","updated_at":"2023-09-21T19:45:25.298Z","repository_link":"https://github.com/gavinsimpson/canadaHCD/blob/main/DESCRIPTION","dependencies":[{"id":13856859888,"package_name":"R","ecosystem":"cran","requirements":"\u003e= 4.1","direct":true,"kind":"depends","optional":false},{"id":13856859889,"package_name":"readr","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":13856859890,"package_name":"tibble","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":13856859891,"package_name":"curl","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":13856859892,"package_name":"dplyr","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":13856859893,"package_name":"zoo","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":13856859894,"package_name":"utils","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":13856859895,"package_name":"lutz","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":13856859896,"package_name":"tools","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":13856859897,"package_name":"tidyselect","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":13856859898,"package_name":"lubridate","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":13856859899,"package_name":"tidyr","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":13856859900,"package_name":"sf","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":13856859901,"package_name":"testthat","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":13856859902,"package_name":"knitr","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":13856859903,"package_name":"rmarkdown","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false}]}],"score":3.258096538021482,"created_at":"2023-09-11T11:54:36.052Z","updated_at":"2026-06-12T21:30:34.405Z","avatar_url":"https://github.com/gavinsimpson.png","language":"R","category":"Climate Change","sub_category":"Climate Data Access and Visualization","monthly_downloads":0,"total_dependent_repos":0,"total_dependent_packages":0,"readme":"```{r, echo = FALSE, message = FALSE}\nknitr::opts_chunk$set(collapse = TRUE, comment = \"#\u003e\", cache = FALSE)\noptions(tibble.width = 120)\n```\n# canadaHCD\n\n\u003c!-- badges: start --\u003e\n[![Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public.](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip)\n[![R build status](https://github.com/gavinsimpson/canadaHCD/workflows/R-CMD-check/badge.svg)](https://github.com/gavinsimpson/canadaHCD/actions)\n[![codecov](https://codecov.io/gh/gavinsimpson/canadaHCD/branch/main/graph/badge.svg?token=vDjUqs13Fb)](https://app.codecov.io/gh/gavinsimpson/canadaHCD)\n[![CRAN\\_Status\\_Badge](https://www.r-pkg.org/badges/version/canadaHCD)](https://cran.r-project.org/package=canadaHCD)\n[![CRAN Downloads](https://cranlogs.r-pkg.org/badges/grand-total/canadaHCD)](https://cran.r-project.org/package=canadHCD)\n\u003c!-- badges: end --\u003e\n\nAccess Canadian Historical Climate Data from R. The Government of Canada's\nHistorical Climate Data [website](http://climate.weather.gc.ca/index_e.html)\nprovides access to hourly, daily, and monthly weather records for stations\nthroughout Canada.\n\nThese are raw data that have undergone some quality control, but issues such\nas changes in station location are unmanged; the data for the original\n`stationID` stops at a certain point and a new `stationID` continues recording.\nFor a more curated data set for climate change research at broad spatial and\ntemporal scales see the [Adjusted and Homogenized Canadian Climate Data (AHCCD)](http://ec.gc.ca/dccha-ahccd/default.asp?lang=En\u0026n=B1F8423A-1).\n\n## Installation\n\n*canadaHCD* is still under active development towards a 0.1 release. In the\nmeantime, if you wish to use the package, please install it from this github\nrepo, which is most easily achieved using Hadley Wickham's *remotes* package:\n\n```{r, eval = FALSE}\n## install.packages(\"devtools\")\nremotes::install_github(\"gavinsimpson/canadaHCD\")\n```\n\n## Usage\n\nSay I'm interested in climate data for stations in Yellowknife, I can search\nfor all known `stationID`s with `\"Yellowknife\"` in their name using\n`find_station()`\n\n```{r find-station}\nlibrary(\"canadaHCD\")\nfind_station(\"Yellowknife\")\n```\n\nTo download the monthly HCD from `YELLOWKNIFE HYDRO` I can use `hcd_monthly()`,\nproviding it with the `StationID` for that particular weather station\n\n```{r download-monthly, results = \"hide\"}\nyh \u003c- hcd_monthly(1707)\n```\n\nThe data are returned as a [*tibble*](https://cran.r-project.org/web/packages/tibble/vignettes/tibble.html)\n(a `tbl_df`), which shows a compact version of the data frame.\n\n```{r show-data}\nyh\n```\n\nYou should be able to work with these objects mostly as if they were data frames.\n\nAllthough not yet exposed through any functions in the package, you can\naccess a snapshot of the station metadata via the `canadaHCD:::station_data`\ndata frame.\n\n```{r station-data}\ncanadaHCD:::station_data\n```\n\nIf we wanted to know which resolutions of data were available for the\n`YELLOWKNIFE HYDRO` station, we can extract certain columns from the station\ndata object\n\n```{r extract-station_data, tidy = TRUE, tidy.opts=list(blank=FALSE, width.cutoff=80)}\nid \u003c- grep(\"YELLOWKNIFE HYDRO\", canadaHCD:::station_data$Name)\nvars \u003c- c(\"HourlyFirstYr\", \"HourlyLastYr\", \"DailyFirstYr\", \"DailyLastYr\",\n    \"MonthlyFirstYr\", \"MonthlyLastYr\")\ncanadaHCD:::station_data[id, vars]\n```\n\nThe output shows that this station has no hourly data, but daily and monthly\ndata sets exist.\n","funding_links":[],"readme_doi_urls":[],"works":{},"citation_counts":{},"total_citations":0,"keywords_from_contributors":[],"project_url":"https://ost.ecosyste.ms/api/v1/projects/825","html_url":"https://ost.ecosyste.ms/projects/825"}