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.

Details

  • 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 "KNYC", a WMO code such as "WMO12345", an amateur weather station code such as "C1234", or another standardized weather station identifier.
  • The location can also be given as {lat,long}, 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[loc] 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. spec is limited to weather stations, GeoPosition and {lat,long} coordinates.
  • 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 {start,end,step}, step can be "Day", "Week", "Month", "Year". All gives all recorded observations for instantaneous properties.
  • 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"steady wind 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 {date,value} in non-metric units
    "DateValue"list of the form {date,value} in metric units
    "DateValueQuality"list of the form {date,value,quality}
    "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

Examples

open allclose all

Basic Examples  (5)

The current temperature in Chicago:

The current temperature in Chicago in Fahrenheit:

The wind speed near the coordinates given:

Make a plot of the pressure for March, 2008:

Plot daily mean temperatures for 2007:

Plot monthly precipitation totals for 20002005:

Applications  (1)

Plot min and max temperatures for a location:

Wolfram Research (2008), WeatherData, Wolfram Language function, https://reference.wolfram.com/language/ref/WeatherData.html (updated 2014).

Text

Wolfram Research (2008), WeatherData, Wolfram Language function, https://reference.wolfram.com/language/ref/WeatherData.html (updated 2014).

CMS

Wolfram Language. 2008. "WeatherData." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/WeatherData.html.

APA

Wolfram Language. (2008). WeatherData. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/WeatherData.html

BibTeX

@misc{reference.wolfram_2024_weatherdata, author="Wolfram Research", title="{WeatherData}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/WeatherData.html}", note=[Accessed: 12-October-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_weatherdata, organization={Wolfram Research}, title={WeatherData}, year={2014}, url={https://reference.wolfram.com/language/ref/WeatherData.html}, note=[Accessed: 12-October-2024 ]}