Learn R Programming

rclimateca (version 1.0.2)

getClimateDataRaw: DEPRECATED: Get parsed CSV data from Environment Canada

Description

This function just downloads a .csv file from the bulk data service from Environment Canda. It follows as closely as possible the EC specifications, and does not modify the result except to remove the header information. To apply this function over multiple months/stations/years/months, use getClimateData.

Usage

getClimateDataRaw(stationID, timeframe = c("monthly", "daily", "hourly"),
  Year = NA, Month = NA,
  endpoint = "http://climate.weather.gc.ca/climate_data/bulk_data_e.html",
  flag.info = FALSE, ...)

Arguments

stationID

A stationID (you could find this using getClimateSites)

timeframe

One of "montly" "daily" or "hourly"

Year

The year for which to fetch the data

Month

The month for which to fetch the data

endpoint

The url from which to fetch data (in case this changes in the future)

flag.info

Pass TRUE to get a list with elements $data and $flags

...

further arguments passed on to the downloading function

Value

A data.frame of results, or a list if flag.info=TRUE

References

http://climate.weather.gc.ca/historical_data/search_historic_data_e.html ftp://client_climate@ftp.tor.ec.gc.ca/Pub/Get_More_Data_Plus_de_donnees/Readme.txt