This function uses the monthly list of stations and downloads them to a local directory. There are 7676 files as of July 2011. The function throws warnings about wrong files sizes. These can be ignored or suppressed by setting warning options
A data structure returned from
get is assigned to a sequence of numbers that is used to index
the monthly station list. It defaults to 1:100000. This results in the
function trying to download all 7676 files from Env Canada. Alternatively,
one can download the files in chunks, for example setting
The local directory to write the csv files to. "EnvCanada"
createMonthlyStations is executed the master list is
parsed and only those stations that report monthly are copied into a
file. The file contains a web Id that is used when downloading. To
scrape the files in the monthly data structure youc all
scrapeToCsv and provide a sequence of stations you want to
download. The download will occasionally fail for server timeouts.
By using the function
getMissingScrapes you can determine which
files are missing from the directory. So if you try to download all
7676 files and the server times out after 2365, the function
getMissingScrapes will provide a sequence of files to be
downloaded to complete your scrape.
function downloads files according to the sequence of values in the "get" parameter.
1 2 3 4 5 6 7 8 9
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.