Skip to content

Commit

Permalink
Merge pull request #24 from steffilazerte/v0.2.2
Browse files Browse the repository at this point in the history
Merge v0.2.2 to master
  • Loading branch information
steffilazerte authored Jun 16, 2017
2 parents a072926 + e17d95b commit aa4cded
Show file tree
Hide file tree
Showing 77 changed files with 6,809 additions and 1,674 deletions.
7 changes: 4 additions & 3 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
^envirocan.Rproj$
^weathercan.Rproj$
^\.Rproj\.user$
^extra$
^data-raw$
^testing.R$
^Readme
^old R$
^\.travis\.yml$
^appveyor\.yml$
^.*\.Rproj$
^cran-comments.md$
^revdep$
^docs$
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
.Rhistory
.RData
.Ruserdata
*.Rproj
old R

.Rproj


inst/doc
18 changes: 15 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r

language: R
language: r
sudo: false
cache: packages

matrix:
include:
- os: linux
dist: precise
r: release
- os: linux
dist: precise
r: devel

- os: linux
dist: trusty
env: R_CODECOV=true
r: release
- os: linux
dist: trusty
env: R_CODECOV=true
r: devel

- os: osx
osx_image: xcode8.1
r: release

- os: osx
osx_image: beta-xcode6.4
- os: osx
r: release
23 changes: 14 additions & 9 deletions DESCRIPTION
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,29 +1,34 @@
Package: envirocan
Package: weathercan
Type: Package
Title: Download weather data from the Environment Canada website
Version: 0.2.1
Title: Download Weather Data from the Environment and Climate Change Canada Website
Version: 0.2.2
Authors@R: c(
person("LaZerte", "Stefanie E.", email = "steffi@steffi.ca", role = c("aut","cre")),
person("Albers", "Sam", email = "sam.albers@gmail.com", role = c("ctb")))
Description: This package provides means of grabbing station information,
person("Steffi", "LaZerte", email = "steffi@steffi.ca", role = c("aut","cre")),
person("Sam", "Albers", email = "sam.albers@gmail.com", role = c("ctb")))
Description: Provides means of grabbing station information,
searching for stations by name or proximity, and then weather data from the
Environment and Climate Change Canada website.
License: GPL-3
LazyData: TRUE
URL: https://github.com/steffilazerte/weathercan
Depends:
R (>= 3.2.2)
R (>= 3.3.3)
Imports:
httr (>= 1.1.0),
dplyr (>= 0.4.3),
httr (>= 1.1.0),
lazyeval (>= 0.1.10),
lubridate (>= 1.5.6),
magrittr (>= 1.5),
methods (>= 3.2.2),
rvest (>= 0.3.1),
sp (>= 1.2-3),
stringi (>= 1.1.2),
tibble (>= 1.2),
tidyr (>= 0.4.1),
xml2 (>= 0.1.2)
RoxygenNote: 5.0.1
RoxygenNote: 6.0.1
Suggests:
ggplot2,
knitr,
rmarkdown,
testthat
Expand Down
19 changes: 19 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,25 @@ title: "News"
author: "Steffi LaZerte"
output: html_document
---

# weathercan 0.2.2

## Changes
- Update and expand vignettes (closes #15)
- Data now returned as tibbles
- Added listcol functionality (closes #8)
- Added internal tests for interpolation
- Updated R version
- Standardized reference to stations dataset (`stn`) in all functions

## Major changes
- envirocan renamed to weathercan (closes #17)

## Bug fixes
- Fixed inclusion of New Brunswick stations (closes #9)
- Downloads with no data return empty tibble and an informative message (closes #21)


# envirocan 0.2.1 (2017-03-04)
- Minor bug fixes: correcting encoding information for downloads, updating function calls to dplyr package, updating stations dataset

Expand Down
168 changes: 148 additions & 20 deletions R/data.R
Original file line number Diff line number Diff line change
@@ -1,46 +1,174 @@
#' Station data downloaded from Environment Canada
#' Station data downloaded from Environment and Climate Change Canada
#'
#' A dataset containing station information downloaded from Environment Canada
#' on June 17th 2016. Note that a station may have several station IDs,
#' A dataset containing station information downloaded from Environment and
#' Climate Change Canada. Note that a station may have several station IDs,
#' depending on how the data collection has changed over the years. Station
#' information can be updated by stations <- running stations_all() and then by
#' specifying stn = stations in most functions.
#' information can be updated by running \code{stations_new <- stations_all()}
#' and then by specifying stn = stations_new in most functions.
#'
#' @format A data frame with 26199 rows and 12 variables:
#' @format A data frame with 26211 rows and 12 variables:
#' \describe{
#' \item{prov}{Province}
#' \item{station_name}{Station name}
#' \item{station_id}{Environment Canada's station ID number. Required for
#' downloading station data.}
#' \item{station_id}{Environment Canada's station ID number. Required for downloading station data.}
#' \item{climate_id}{Climate ID number}
#' \item{WMO_id}{Climate ID number}
#' \item{TC_id}{Climate ID number}
#' \item{lat}{Latitude of station location}
#' \item{lon}{Longitude of station location}
#' \item{elev}{Elevation of station location}
#' \item{lat}{Latitude of station location in degree decimal format}
#' \item{lon}{Longitude of station location in degree decimal format}
#' \item{elev}{Elevation of station location in metres}
#' \item{interval}{Interval of the data measurements ('hour', 'day', 'month')}
#' \item{start}{Starting year of station data}
#' \item{end}{Ending year of station data}
#' \item{start}{Starting year of data record}
#' \item{end}{Ending year of data record}
#' }
#' @source \url{http://climate.weather.gc.ca/index_e.html}
"stations"

#' Hourly weather data for Kamloops downloaded with \code{weather()}
#' Hourly weather data for Kamloops
#'
#' An example dataset of hourly weather data for Kamloops
#' Downloaded with \code{\link{weather}()}. Terms are more thoroughly defined here
#' \url{http://climate.weather.gc.ca/glossary_e.html}
#'
#' @format An example dataset of hourly weather data for Kamloops:
#' \describe{
#' \item{station_name}{Station name}
#' \item{station_id}{Environment Canada's station ID number. Required for downloading station data.}
#' \item{prov}{Province}
#' \item{lat}{Latitude of station location in degree decimal format}
#' \item{lon}{Longitude of station location in degree decimal format}
#' \item{date}{Date}
#' \item{time}{Time}
#' \item{year}{Year}
#' \item{month}{Month}
#' \item{day}{Day}
#' \item{hour}{Hour}
#' \item{qual}{Data quality}
#' \item{weather}{The state of the atmosphere at a specific time.}
#' \item{hmdx}{Humidex}
#' \item{hmdx_flag}{Humidex data flag}
#' \item{pressure}{Pressure (kPa)}
#' \item{pressure_flag}{Pressure data flag}
#' \item{rel_hum}{Relative humidity}
#' \item{rel_hum_flag}{Relative humidity data flag}
#' \item{temp}{Temperature}
#' \item{temp_dew}{Dew Point Temperature}
#' \item{temp_dew_flag}{Dew Point Temperatureflag}
#' \item{visib}{Visibility (km)}
#' \item{visib_flag}{Visibility data flag}
#' \item{wind_chill}{Wind Chill}
#' \item{wind_chill_flag}{Wind Chill flag}
#' \item{wind_dir}{Wind Direction (10's of degrees)}
#' \item{wind_dir_flag}{wind Direction Flag}
#' \item{wind_spd}{Wind speed km/hr}
#' \item{wind_spd_flag}{Wind speed flag}
#' \item{elev}{Elevation (m)}
#' \item{climat_id}{Climate identifier}
#' \item{WMO_id}{World Meteorological Organization Identifier}
#' \item{TC_id}{Transport Canada Identifier}
#' }
#' @source \url{http://climate.weather.gc.ca/index_e.html}
"kamloops"

#' Hourly weather data for Prince George downloaded with \code{weather()}
#' Hourly weather data for Prince George
#'
#' Downloaded with \code{\link{weather}()}. Terms are more thoroughly defined here
#' \url{http://climate.weather.gc.ca/glossary_e.html}
#'
#' An example dataset of hourly weather data for Prince George
#' @format An example dataset of hourly weather data for Prince George:
#' \describe{
#' \item{station_name}{Station name}
#' \item{station_id}{Environment Canada's station ID number. Required for downloading station data.}
#' \item{prov}{Province}
#' \item{lat}{Latitude of station location in degree decimal format}
#' \item{lon}{Longitude of station location in degree decimal format}
#' \item{date}{Date}
#' \item{time}{Time}
#' \item{year}{Year}
#' \item{month}{Month}
#' \item{day}{Day}
#' \item{hour}{Hour}
#' \item{qual}{Data quality}
#' \item{weather}{The state of the atmosphere at a specific time.}
#' \item{hmdx}{Humidex}
#' \item{hmdx_flag}{Humidex data flag}
#' \item{pressure}{Pressure (kPa)}
#' \item{pressure_flag}{Pressure data flag}
#' \item{rel_hum}{Relative humidity}
#' \item{rel_hum_flag}{Relative humidity data flag}
#' \item{temp}{Temperature}
#' \item{temp_dew}{Dew Point Temperature}
#' \item{temp_dew_flag}{Dew Point Temperatureflag}
#' \item{visib}{Visibility (km)}
#' \item{visib_flag}{Visibility data flag}
#' \item{wind_chill}{Wind Chill}
#' \item{wind_chill_flag}{Wind Chill flag}
#' \item{wind_dir}{Wind Direction (10's of degrees)}
#' \item{wind_dir_flag}{wind Direction Flag}
#' \item{wind_spd}{Wind speed km/hr}
#' \item{wind_spd_flag}{Wind speed flag}
#' \item{elev}{Elevation (m)}
#' \item{climat_id}{Climate identifier}
#' \item{WMO_id}{World Meteorological Organization Identifier}
#' \item{TC_id}{Transport Canada Identifier}
#' }
#' @source \url{http://climate.weather.gc.ca/index_e.html}
"pg"

#' Daily weather data for Kamloops downloaded with \code{weather()}
#' Daily weather data for Kamloops
#'
#' Downloaded with \code{\link{weather}()}. Terms are more thoroughly defined here
#' \url{http://climate.weather.gc.ca/glossary_e.html}
#'
#' An example dataset of daily weather data for Kamloops
#' @format An example dataset of daily weather data for Kamloops:
#' \describe{
#' \item{station_name}{Station name}
#' \item{station_id}{Environment Canada's station ID number. Required for downloading station data.}
#' \item{prov}{Province}
#' \item{lat}{Latitude of station location in degree decimal format}
#' \item{lon}{Longitude of station location in degree decimal format}
#' \item{date}{Date}
#' \item{year}{Year}
#' \item{month}{Month}
#' \item{day}{Day}
#' \item{cool_deg_days}{Cool degree days}
#' \item{cool_deg_days_flag}{Cool degree days flag}
#' \item{dir_max_gust}{Direction of max wind gust}
#' \item{dir_max_gust_flag}{Direction of max wind gust flag}
#' \item{heat_deg_days}{Heat degree days}
#' \item{heat_deg_days_flag}{Heat degree days flag}
#' \item{max_temp}{Maxixum temperature}
#' \item{max_temp_flag}{Maxixum temperature flag}
#' \item{mean_temp}{Mean temperature}
#' \item{mean_temp_flag}{Mean temperature flag}
#' \item{min_temp}{Minimum temperature}
#' \item{min_temp_flag}{Minimum temperature flag}
#' \item{snow_grnd}{Snow on the ground (cm)}
#' \item{snow_grnd_flag}{Snow on the ground flag}
#' \item{spd_max_gust}{Speed of the max gust km/h}
#' \item{spd_max_gust_flag}{Speed of the max gust flag}
#' \item{total_precip}{Total precipitation (any form)}
#' \item{total_precip_flag}{Total precipitation flag}
#' \item{total_rain}{Total rain (any form)}
#' \item{total_rain_flag}{Total rain flag}
#' \item{total_snow}{Total snow (any form)}
#' \item{total_snow_flag}{Total snow flag}
#' \item{elev}{Elevation (m)}
#' \item{climat_id}{Climate identifier}
#' \item{WMO_id}{World Meteorological Organization Identifier}
#' \item{TC_id}{Transport Canada Identifier}
#' }
#' @source \url{http://climate.weather.gc.ca/index_e.html}
"kamloops_day"

#' RFID Data on finch visits to feeders
#'
#' An example dataset of finch RFID data for interpolation
#' @format An example dataset of finch RFID data for interpolation:
#' \describe{
#' \item{bird_id}{Bird ID number}
#' \item{time}{Time}
#' \item{feeder_id}{feeder ID}
#' \item{species}{Species}
#' \item{lat}{Latitude of station location in degree decimal format}
#' \item{lon}{Longitude of station location in degree decimal format}
#' }
"finches"
Loading

0 comments on commit aa4cded

Please sign in to comment.