A function to find which scrapes need to be done
During the course of scraping the server sometimes
loses the connection or returns an empty file. When that happens
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(monthlyList = MONTHLY.STATION.LIST, directory = "EnvCanada")
- The file name of the list of stations that report
monthly. This is created by calling
- 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.
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
scrapeToCsvand passing the sequence of elements to that function
## Not run: # missing <- getMissingScrape() # scrapeToCsv(Stations,get=missing) # ## End(Not run)