Add build status and update data

parent c8175d86
Pipeline #5837197 passed with stage
in 12 minutes and 59 seconds
LICENSE
README.Rmd
README.md
README.bib
README.html
\.Rproj$
README.*
.Rpro*
.git*
^.*\.Rproj$
^\.Rproj\.user$
.gitattributes
.gitignore
# History files
.Rhistory
.Rapp.history
# Session Data files
.RData
# Example code in package build process
*-Ex.R
# RStudio files
.Rproj.user/
# produced vignettes
vignettes/*.html
vignettes/*.pdf
# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3
.httr-oauth
## ignore backup files
.R*
*~
.Rproj.user
canadaHCDx.Rproj
README.html
.Rproj.user
......@@ -2,13 +2,11 @@
f <- tempfile()
curl::curl_download("ftp://client_climate@ftp.tor.ec.gc.ca/Pub/Get_More_Data_Plus_de_donnees/Station%20Inventory%20EN.csv", f)
library(readr)
station_data <- read_csv(f, col_types =
cols(`DLY First Year` = col_integer(),
Latitude = col_integer()), skip = 3)
station_data <- read_csv(f, skip = 3)
names(station_data) <- c("Name", "Province", "ClimateID", "StationID", "WMOID",
"TCID", "LatitudeDD", "LongitudeDD", "Latitude", "Longitude",
"Elevation", "FirstYear", "LastYear", "HourlyFirstYr", "HourlyLastYr",
"DailyFirstYr", "DailyLastYr", "MonthlyFirstYr", "MonthlyLastYr")
station_timestamp <- gsub(" UTC", "", gsub("Modified Date: ", "", read_lines(f, n_max = 1)))
save(station_data, station_timestamp, file = "R/sysdata.rda")
save(station_data, station_timestamp, file = "R/sysdata.rda", compress = "xz", compression_level = 9)
}
No preview for this file type
......@@ -10,6 +10,8 @@ knitr::opts_chunk$set(echo = TRUE)
library(canadaHCDx)
```
__Build status:__ [![build status](https://gitlab.com/ConorIA/canadaHCDx/badges/master/build.svg)](https://gitlab.com/ConorIA/canadaHCDx/commits/master)
Environment and Climate Change Canada (ECCC) provides archival climate data for a [wealth of climate stations](ftp://client_climate@ftp.tor.ec.gc.ca/Pub/Get_More_Data_Plus_de_donnees/Station%20Inventory%20EN.csv) across the country. This data is available for download on the ECCC [data portal](http://climate.weather.gc.ca/). This website is useful for browsing data, and is convenient for downloading short periods of data. However, if you are seeking a 30-year baseline, the manual download of the necessary data can become very tedious. In that regard, ECCC also provides a bulk download function to make acquiring that data a little bit easier. While the process is much simpler than it has been in the past, one still must put in a little leg work to:
1) Identify the station of interest
......@@ -107,7 +109,7 @@ map_stations(find_station_adv(target = c(43.7860, -79.1873), mindist = 10, maxdi
# Disclaimer
The package outlined in this document is published under the GNU General Public License, version 2 (GPL-2.0). The GPL is an open source, copyleft license that allows for the modification and redistribution of original works. This license is what makes it perfectly legal for me to build upon Simpson's work and modify it as I see fit. It is important to note, however, that programs licensed under the GPL come with NO WARRANTY. In our case, a simple R package isn't likely to blow up your computer or kill your cat. Nonetheless, it is always a good idea to pay attention to what you are doing, to ensure that you have downloaded the correct data, and that everything looks ship-shape.
The package outlined in this document is published under the GNU General Public License, version 3 (GPL-3.0). The GPL is an open source, copyleft license that allows for the modification and redistribution of original works. This license is what makes it perfectly legal for me to build upon Simpson's work and modify it as I see fit. It is important to note, however, that programs licensed under the GPL come with NO WARRANTY. In our case, a simple R package isn't likely to blow up your computer or kill your cat. Nonetheless, it is always a good idea to pay attention to what you are doing, to ensure that you have downloaded the correct data, and that everything looks ship-shape.
# What to do if something doesn't work
......
......@@ -2,6 +2,8 @@
__Build status:__ [![build status](https://gitlab.com/ConorIA/canadaHCDx/badges/master/build.svg)](https://gitlab.com/ConorIA/canadaHCDx/commits/master)
Environment and Climate Change Canada (ECCC) provides archival climate data for a [wealth of climate stations](ftp://client_climate@ftp.tor.ec.gc.ca/Pub/Get_More_Data_Plus_de_donnees/Station%20Inventory%20EN.csv) across the country. This data is available for download on the ECCC [data portal](http://climate.weather.gc.ca/). This website is useful for browsing data, and is convenient for downloading short periods of data. However, if you are seeking a 30-year baseline, the manual download of the necessary data can become very tedious. In that regard, ECCC also provides a bulk download function to make acquiring that data a little bit easier. While the process is much simpler than it has been in the past, one still must put in a little leg work to:
1) Identify the station of interest
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment