Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normals #79

Merged
merged 61 commits into from
Sep 24, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
56d6c26
Add basic climate normals
steffilazerte Sep 13, 2019
ea10da5
Use find_skip()
steffilazerte Sep 13, 2019
7135aca
Correct ECCC reference
steffilazerte Sep 13, 2019
19bcdbf
use_ functions moved to usethis()
steffilazerte Sep 13, 2019
34d19e4
Clean up normals
steffilazerte Sep 17, 2019
f7eb37a
Add alternatives for tidyr v1
steffilazerte Sep 17, 2019
ca1ac7f
Fix call to column name to show appropriate problems
steffilazerte Sep 17, 2019
4f46090
Add rvest
steffilazerte Sep 17, 2019
dce205d
Fix docs add examples
steffilazerte Sep 17, 2019
630008b
test tidyr v0.8.0
steffilazerte Sep 17, 2019
7b31b78
Cleanup, fixing check notes/errors
steffilazerte Sep 18, 2019
96ee739
normals tweaks: Address unordered normals, more measurements, missing…
steffilazerte Sep 19, 2019
3c64190
Move url arguments to options
steffilazerte Sep 19, 2019
a90844c
Remove previously deprecated functions
steffilazerte Sep 19, 2019
57fe737
Use Rmarkdown in documentation
steffilazerte Sep 19, 2019
f45eb1f
Correct urls
steffilazerte Sep 19, 2019
33173c6
Don't expect error for incorrect urls
steffilazerte Sep 19, 2019
692c132
Add data and vignettes describing climate normal codes, glossary of t…
steffilazerte Sep 20, 2019
6f0454f
Rename nested data to normals
steffilazerte Sep 20, 2019
6fb16f8
Add formating
steffilazerte Sep 20, 2019
744db42
Update internal data
steffilazerte Sep 20, 2019
b69a855
Documentation tweaks
steffilazerte Sep 20, 2019
f68f341
Merge master
steffilazerte Sep 20, 2019
8d45412
Remind user to use climate_id not station_id
steffilazerte Sep 20, 2019
9adfa22
Simplify/correct normals example
steffilazerte Sep 20, 2019
92cae0c
Update package details
steffilazerte Sep 20, 2019
0068e01
Correct .call
steffilazerte Sep 20, 2019
425ea32
Add units to glossary_normals and vignette
steffilazerte Sep 20, 2019
21c5007
Correct vignette code
steffilazerte Sep 20, 2019
f9e25c1
Build vignettes
steffilazerte Sep 20, 2019
1722076
dont run example because it runs longer than CRAN allows
boshek Sep 23, 2019
2493b1d
account for a global variable ' '
boshek Sep 23, 2019
2984703
render docs
boshek Sep 23, 2019
abbe4f4
Add details to normals docs
steffilazerte Sep 23, 2019
6632cb9
Tweak normals: Extract/Add `meets_wmo` to normals, check skip for eac…
steffilazerte Sep 23, 2019
44aa0a2
Ignore local vignettes
steffilazerte Sep 23, 2019
a22064f
Only return one line per station is normals_only = TRUE
steffilazerte Sep 23, 2019
672d030
Remember to -1 for skips
steffilazerte Sep 23, 2019
fc32729
Use .data and quotes rather than globalVariables
steffilazerte Sep 23, 2019
2bf0944
Add check for stations normals return only one line per station
steffilazerte Sep 24, 2019
901a912
Remove tripple !! for new rlang
steffilazerte Sep 24, 2019
f769285
All timezones UTC with time_display options. Fixes #74
steffilazerte Sep 24, 2019
7babc36
Add tidyr v1 check
steffilazerte Sep 24, 2019
f7953da
Update version, NEWS and codemeta
steffilazerte Sep 24, 2019
f710c61
Spell checks
steffilazerte Sep 24, 2019
179a779
Update data
steffilazerte Sep 24, 2019
5057137
Add normals vignette, fix flags vignette
steffilazerte Sep 24, 2019
bc6e112
Add rlang to test
steffilazerte Sep 24, 2019
9c9ee9a
Update docs
steffilazerte Sep 24, 2019
85c1b49
Add naniar to suggests, fix interpolate timezones
steffilazerte Sep 24, 2019
5ff4062
Add message to alert users to change in time display
steffilazerte Sep 24, 2019
ed0c090
Remove factors from stations and weather data (Fixes #78)
steffilazerte Sep 24, 2019
8b42f36
Add naniar to suggests
steffilazerte Sep 24, 2019
829b956
Fix global binding
steffilazerte Sep 24, 2019
02dded2
Fix docs
steffilazerte Sep 24, 2019
b0a4d6c
Add meteoland article
steffilazerte Sep 24, 2019
532ba45
Update site
steffilazerte Sep 24, 2019
c2de1d0
Suppress warnings on naniar functions
steffilazerte Sep 24, 2019
3c78588
Remove example that required google maps key
steffilazerte Sep 24, 2019
48d596f
Remove example that required google maps key - update site
steffilazerte Sep 24, 2019
5144a6b
Prep for release
steffilazerte Sep 24, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Spell checks
  • Loading branch information
steffilazerte committed Sep 24, 2019
commit f710c614f65df9dc707831ae7e71c356bba815cf
2 changes: 1 addition & 1 deletion R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@
#' \item{ECCC_name}{Original measurement type from ECCC}
#' \item{weathercan_name}{R-compatible name given when downloaded with the
#' `normals_dl()` function}
#' \item{description}{Description of the measurment type from ECCC}
#' \item{description}{Description of the measurement type from ECCC}
#' }
"glossary_normals"

Expand Down
25 changes: 24 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ options(width = 100)

This package makes it easier to search for and download multiple months/years of historical weather data from [Environment and Climate Change Canada (ECCC) website](http://climate.weather.gc.ca/historical_data/search_historic_data_e.html).

Bear in mind that these downloads can be fairly large and performing multiple downloads may use up ECCC's bandwidth unecessarily. Try to stick to what you need.
Bear in mind that these downloads can be fairly large and performing multiple downloads may use up ECCC's bandwidth unnecessarily. Try to stick to what you need.

For more details and tutorials checkout the [weathercan website](http://ropensci.github.io/weathercan)

Expand Down Expand Up @@ -106,6 +106,29 @@ ggplot(data = kam_pg, aes(x = time, y = temp, group = station_name, colour = sta
geom_line()
```

## Climate Normals

To access climate normals, you first need to know the `climate_id` associated with the station you're interested in.

```{r}
stations_search("Winnipeg", normals_only = TRUE)
```

Then you can download the climate normals with the `normals_dl()` function.

```{r}
n <- normals_dl("5023222")
```

There are two parts to the normals data, average weather measurements and average frost dates.

```{r}
library(tidyr)
unnest(n, normals)
unnest(n, frost)
```


## Citation

```{r, warning = FALSE}
Expand Down
60 changes: 60 additions & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
10AM
11AM
12PM
9AM
AppVeyor
Boreal
canada
codecov
coords
CRS
css
csv
doesn
DOI
dplyr
ECCC
envirocan
gc
GitHub
Hadley
http
Humidex
isn
json
kamloops
Kamloops
kPa
listcol
listcols
lon
Manitoban
Meteoland
midnights
MUData
normals
Normals
popups
readme
RFID
RMarkdown
ropensci
rOpenSci
ROpenSci
sp
stn
svg
Temperatureflag
tibble
tibbles
tidyverse
timeframe
timezones
Timezones
unformatted
unnest
unnesting
WGS84
Wickham
WMO
YYYY
2 changes: 1 addition & 1 deletion man/glossary_normals.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions release_script.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ source("data-raw/data-index.R")
# Check spelling
dict <- hunspell::dictionary('en_CA')
devtools::spell_check()
spelling::update_wordlist()

## Finalize package version

Expand Down