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.
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:
-
0 UTC $TimeZone the current time zone for your computer system z offset 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 all close allBasic Examples (5)
The current temperature in Chicago:
WeatherData["Chicago", "Temperature"]The current temperature in Chicago in Fahrenheit:
WeatherData["Chicago", "Temperature", "NonMetricValue"]The wind speed near the coordinates given:
WeatherData[{45, -90}, "WindSpeed"]Make a plot of the pressure for March, 2008:
DateListPlot[WeatherData["KABQ", "Pressure", {2008, 3}], Joined -> True]Plot daily mean temperatures for 2007:
DateListPlot[WeatherData["KMDZ", "MeanTemperature", {{2007, 1, 1}, {2007, 12, 31}, "Day"}], Joined -> True]Plot monthly precipitation totals for 2000–2005:
DateListPlot[WeatherData["KBOS", "TotalPrecipitation", {{2000, 1, 1}, {2005, 12, 31}, "Month"}], Joined -> True]Scope (10)
Names & Identifiers (9)
Specifying Locations (6)
List all weather stations by name:
WeatherData[]//ShortThe current temperature at station "KBOS":
WeatherData["KBOS", "Temperature"]The current temperature from a high-reliability station at the approximate coordinates of "KBOS":
WeatherData[{42.3, -71.0}, "Temperature"]The current temperature near the city name, "Boston":
WeatherData["Boston", "Temperature"]Cities may also be given in their full form as used by
or by using the corresponding Entity:
WeatherData[{"Boston", "Massachusetts", "UnitedStates"}, "Temperature"]WeatherData[Entity["City", {"Boston", "Massachusetts", "UnitedStates"}], "Temperature"]To return the station from coordinates or a city name, use the the "StationName" property:
WeatherData[{42.3, -71.0}, "StationName"]Finding Nearby Stations (2)
Return the absolute closest station to the given coordinates:
WeatherData[{42.3, -71}, "NearestStation"]Find the 10 closest stations to the location:
WeatherData[{{42.3, -71}, 10}, "NearestStation"]List World Meteorological Organization weather stations:
WeatherData["WMO"]//ShortProperties (1)
List all available properties:
WeatherData["KBOS", "Properties"]Get a short description of a property:
WeatherData["KBOS", "WindChill", "Description"]By default, WeatherData returns metric system values:
WeatherData["KBOS", "Temperature"]The "NonMetricValue" annotation gives the temperature in Fahrenheit:
WeatherData["KBOS", "Temperature", "NonMetricValue"]You can also request the "DateValue" annotation to see when this observation was taken:
WeatherData["KBOS", "Temperature", "DateValue"]The Fahrenheit temperature is available with the date via the "DateNonMetricValue" annotation:
WeatherData["KBOS", "Temperature", "DateNonMetricValue"]Time series information is returned as a TimeSeries:
WeatherData["KBOS", "Temperature", {2008, 9, 20}]Requesting aggregate properties without a time range will give Missing["NotApplicable"]:
WeatherData["KBOS", "MinTemperature"]Applications (2)
Mean temperature by month in Boston, MA, and Miami, FL, showing different temperatures and variabilities.
DateListPlot[WeatherData[#, "MeanTemperature", {{2000}, {2007}, "Month"}]& /@ {"KBOS", "KMIA"}, Joined -> True, Filling -> Bottom]Plot min and max temperatures for a location:
min = WeatherData["KMDZ", "MinTemperature", {{2007, 1, 1}, {2007, 12, 31}, "Day"}];
max = WeatherData["KMDZ", "MaxTemperature", {{2007, 1, 1}, {2007, 12, 31}, "Day"}];DateListPlot[{min, max}, Joined -> True, Filling -> {1 -> {2}}]Possible Issues (2)
Because some stations record maxima between reportings, properties and calculated values may differ:
First@WeatherData["KBOS", "MaxTemperature", {{2008, 7, 1}, {2008, 7, 1}, "Day"}, "Value"]Max@WeatherData["KBOS", "Temperature", {{2008, 7, 1}, {2008, 7, 1}}, "Value"]Aggregate properties may not be available for all stations:
WeatherData["KSTL", "MaxTemperature", {{2007}, {2008}, "Day"}]See Also
CityData CountryData WeatherForecastData AirTemperatureData AirPressureData WindSpeedData WindDirectionData WindVectorData DateList GeoPosition $GeoLocation FindGeoLocation PsychrometricPropertyData TideData IconData
Function Repository: CurrentWeatherData SpaceWeatherData WeatherRegionPlot HeatIndex WindChill
Related Links
History
Introduced in 2008 (7.0) | Updated in 2014 (10.0)
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_2026_weatherdata, author="Wolfram Research", title="{WeatherData}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/WeatherData.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_weatherdata, organization={Wolfram Research}, title={WeatherData}, year={2014}, url={https://reference.wolfram.com/language/ref/WeatherData.html}, note=[Accessed: 12-June-2026]}