weatherData v0.5.0


Monthly downloads



by Ram Narasimhan

Get Weather Data from the Web

Functions that help in fetching weather data from websites. Given a location and a date range, these functions help fetch weather data (temperature, pressure etc.) for any weather related analysis.


Build Status

weatherData is a library of functions that will fetch weather data (Temperature, Pressure, Humidity, Wind Speed etc.) from the Web for you as a clean data frame.

If you want to perform weather Analysis, but don't wish to be bothered with scraping the data yourself, you can consider using weatherData.

Github Page with Examples

The main page for weatherData (with explanations and Examples) can be found at


To install the development version of weatherData from github, use the devtools package.


Load the library


Windows users may also need to first install Rtools from CRAN. (Look in bin/windows)


Suggestions are welcome! If you would have a particular need for weather data, let me know what changes you'd like to see in the package. If you find bugs, please do report it. Fetching data from the web can be fragile. Submit an Issue.

How to Use this package


checkDataAvailabilityForDateRange("SFO", "2010-10-29", "2013-01-12")

The command above will see if weather data is available for the Airport supplied ("SFO") for the two end dates supplied: for the 20th Oct 2010 and for Jan 12th 2013 in this case.

This command is useful for a quick check, before invoking getDateRangeWeather


This is a data frame of Ambient temperature data, extracted from Weather Undergound. Each row has two entries (columns). The Timestamp (YYYY-MM-DD HH:MM:SS) and the TemperatureF (in degrees F)


This function will get the latest recorded Temperature for a give city or station. Any valid US Airport code or International 4-letter Airport Weather Code is valid. For example "EGLL" for London, UK. Note: This function uses the Sys.Date to learn today's date

getStationCode("Buffalo", state="WY")

This function will return a record containing matches to a given station name, and the 4 letter code can then be used in the arguments to other functions such as getWeatherForDate()

More examples (with explanations) can be found at

Functions in weatherData

Name Description
checkDataAvailability Check if WeatherUnderground has Data for given station and date
checkDataAvailabilityForDateRange Quick Check to see if WeatherUnderground has Weather Data for given station for a range of dates
IntlWxStations Data - International Weather Stations
London2013 Data - Ambient Temperature for the City of London for all of 2013
SFO2012 Data - Ambient Temperature for the City of San Francisco for all of 2012
SFO2013 Data - Ambient Temperature for the City of San Francisco for all of 2013
checkSummarizedDataAvailability Quick Check to see if WeatherUnderground has Summarized Weather Data for given station for a custom range of dates
getCurrentTemperature Get the latest recorded temperature for a location
SFO2013Summarized Data - Summarized Daily Temperature for the City of San Francisco for all of 2013
USAirportWeatherStations Data - US Weather Stations ID's
getDailyMinMaxTemp Get the daily minimum (maximum) temperatures for a given weather stations
getDetailedWeather Gets weather data for a single date (All records)
getWeatherForMultipleYears For Multiple Years, fetch the weather data for a station
getWeatherForYear Get weather data for one full year
getTemperatureForDate Getting Temperature data for a single date (or a range of dates)
getWeatherForDate Getting data for a range of dates
showAvailableColumns Shows all the available Weather Data Columns
weatherData-package Get Weather & Temperature data from the Web
Mumbai2013 Data - Ambient Temperature for the City of Mumbai, India for all of 2013
NewYork2013 Data - Ambient Temperature for New York City for all of 2013
getStationCode Gets the Weather Station code for a location (in the US)
getSummarizedWeather Gets daily summary weather data (One record per day)
No Results!

Last month downloads


Type Package
Date 2017-05-16
LazyData TRUE
License GPL
RoxygenNote 6.0.1
NeedsCompilation no
Packaged 2017-06-05 20:11:46 UTC; Ram
Repository CRAN
Date/Publication 2017-06-05 21:55:33 UTC
imports curl , plyr , utils
depends R (>= 2.10)
suggests testthat

Include our badge in your README