WeatherData

WeatherData[loc,"property"]
gives the most recent measurement for the specified weather property at the location corresponding to loc.

WeatherData[loc,"property",date]
gives all measurements during the specified date.

WeatherData[loc,"property",{start,end}]
gives a list of dates and measurements for the time interval start to end.

WeatherData[loc,"property",{start,end,step}]
gives measurements aggregated over the time period represented by step.

DetailsDetails

  • WeatherData gives current and historical weather data for all standard weather stations worldwide.
  • The location loc in WeatherData[loc,] can be specified as an ICAO code such as , a WMO code such as , an NCDC ID such as , an amateur weather station code such as , or another standardized weather station identifier.
  • The location can also be given as , or a city specification is given of the type used in CityData, in which case WeatherData[loc,] gives results for the nearest high-reliability weather station.
  • WeatherData[spec] gives the nearest weather station to spec for which data has ever been available.
  • WeatherData[{spec,n}] gives a list of the n nearest weather stations for which data has ever been available.
  • WeatherData[loc,"property",date] by default takes date to be given in UTC, and uses UTC for all output times.
  • Dates can be specified in either DateList or DateString format.
  • In time interval specifications , step can be , , , . All gives all recorded observations.
  • The option TimeZone->z allows different time zones to be assumed.
  • The following settings can be used:
  • 0UTC
    $TimeZonethe current time zone for your computer system
    zoffset z for UTC
  • Properties related to identifying weather stations include:
  • "Memberships"WMO, NCDC, and CWOP reporting network membership
    "NearestStation"the nearest weather station
    "StationDistance"distance in km between specified location and station given
    "StationName"weather station name
  • WeatherData can retrieve observational weather data from meteorological stations throughout the world.
  • Some properties may not be available until at least a few days after a given observation is made.
  • Instantaneous observation properties:
  • "CloudCoverFraction"fraction of the sky obscured by cloud cover
    "CloudHeight"elevation of 5/8 cloud obscuration
    "CloudTypes"list of cloud types observed
    "DewPoint"dew point temperature in °C
    "Humidity"relative humidity
    "PrecipitationRate"average precipitation rate in cm/hr
    "Pressure"barometric pressure in millibars
    "PressureTendency", , or for decreasing, steady, and increasing pressure
    "SnowAccumulationRate"average rate of snow accumulation in cm/hour
    "SnowDepth"depth of snow cover in cm
    "StationPressure"pressure, uncorrected for elevation
    "Temperature"temperature in °C
    "Visibility"visibility in kilometers
    "WindChill"wind chill temperature in °C
    "WindDirection"wind direction in degrees
    "WindGusts"gusting wind speed in kilometers/hour
    "WindSpeed"wind gust speed in kilometers/hour
  • Properties aggregated over periods between observations include:
  • "Conditions"list of weather conditions (fog, tornado, thunderstorm)
    "PrecipitationAmount"the most recent precipitation amount and duration
    "PrecipitationTypes"types of precipitation observed (hail, rain, snow)
    "SnowAccumulation"the most recent accumulation amount and duration
  • Aggregate properties:
  • "MaxTemperature"maximum temperature in °C
    "MaxWindSpeed"maximum wind speed in kilometers/hour
    "MeanDewPoint"mean dew point temperature in °C
    "MeanHumidity"mean relative humidity
    "MeanPressure"mean pressure in millibars
    "MeanStationPressure"mean station pressure in millibars
    "MeanTemperature"mean temperature in °C
    "MeanVisibility"mean visibility distance in kilometers
    "MeanWindChill"mean wind chill temperature in °C
    "MeanWindSpeed"mean wind speed in kilometers/hour
    "MinTemperature"minimum temperature in °C
    "TotalPrecipitation"precipitation amount in cm
    "WindGusts"wind gust speed in kilometers/hour
  • Weather station properties:
  • "Coordinates"latitude, longitude of station
    "DateRange"start and end dates for available station observation data
    "Elevation"station elevation in meters
    "Latitude"station latitude in degrees
    "Longitude"station longitude in degrees
  • WeatherData["name","property",,"form"] can give data in various forms, including:
  • "DateNonMetricValue"list of the form in non-metric units
    "DateValue"list of the form in metric units
    "DateValueQuality"list of the form
    "NonMetricValue"value only in non-metric units
    "Value"value only in metric units
  • WeatherData["name","property",,"ann"] gives various annotations associated with a property. Typical annotations include:
  • "Description"description of the property
    "LongDescription"longer textual description of the property
    "Units"units in which the value is given
    "UnitsName"English name for the units used
    "UnitsNotation"notation for the units used
    "UnitsStandardName"Wolfram Language standard name for the units used

ExamplesExamplesopen allclose all

Basic Examples  (5)Basic Examples  (5)

The current temperature in Chicago:

In[1]:=
Click for copyable input
Out[1]=

The wind speed near the coordinates given:

In[1]:=
Click for copyable input
Out[1]=

Make a plot of the pressure for March, 2008:

In[1]:=
Click for copyable input
Out[1]=

Plot daily mean temperatures for 2007:

In[1]:=
Click for copyable input
Out[1]=

Plot monthly precipitation totals for 20002005:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2008
(7.0)
| Updated in 2014
(10.0)