Closed KevinShook closed 5 years ago
I've re-written the functions so that there are single functions to read in monthly and daily values, respectively. I've added a function to d/l a single station from the EC site as well. This could be improved by removing the need to specify the province. However, that would require getting the station list, which seems to only be accessible through the WMS server.
Looks good to me!
Description
I've added 4 functions to read in AHCCD daily and monthly precips and temps. The data are in EC's awful month x day or year x month formats. The header may be in English or English and French
Related Issue
Example
Each function reads in a single .txt file, e.g. monthly_total_precip <- read_AHCCD_monthly_temp("mt3011120.txt")
Unfortunately we can't distribute the daily values, and the monthly files are contained in a single huge .zip file, so I can't think of how to incorporate automated tests. I'm attaching some test files, but it might be a good idea to get some other ones, esp. as they change the file formats without warning. The data location is indicated in the documentation for each function.
The first character of the file name indicates its time step (d - daily, m- monthly). The second indicates the data type, whether precip or temp and the type of value, either min, max or mean. mt3011120.txt ms3011120.txt dt1126150.txt dm1085835.txt