Description Usage Arguments Details Value Author(s) Examples
View source: R/getMissingScrape.R
During the course of scraping the server sometimes
loses the connection or returns an empty file. When that happens
the scrapeToCsv
should be run again to complete the scrape.
That function takes a sequence of files that have not been downloaded.
To figure out the missing files, call getMissingScrape
1 | getMissingScrape(monthlyList = MONTHLY.STATION.LIST, directory = "EnvCanada")
|
monthlyList |
The file name of the list of stations that report
monthly. This is created by calling |
directory |
the default directory where scrapes are stored. EnvCanada. |
The monthly list of stations contains all the stations that report monthly, numbered from 99111111 upwards. As files are scraped then are downloaded to EnvCanada. If the scrape should fail, or if you want to do it in bits and peices you can find out which files are missing by comparing the master station list with the directory of EnvCanada. This function makes that easy and uses the file names to determin which elements of the monthly station list are missing.
the function returns a sequence of integers that are references
into the monthly station list. That list has 7676 stations. If elements
52,78,954, and 3215 do not have their associated files in envCanada, then
those files can be scraped by calling scrapeToCsv
and passing the
sequence of elements to that function
Steven Mosher
1 2 3 4 5 | ## Not run:
missing <- getMissingScrape()
scrapeToCsv(Stations,get=missing)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.