gives the most recent measurement for air temperature near the current location.


gives the air temperature value for the specified time near the current location.


gives the most recent measurement for air temperature near the specified location.


gives the value or values for the specified date and location.


gives values for all specified locations on the specified dates.

Details and Options

  • AirTemperatureData gives current and historical air temperature data for all standard weather stations worldwide.
  • AirTemperatureData[] makes use of $GeoLocation and $TimeZone to determine your location and time zone. It returns the most recent measurement of air temperature for the nearest high-reliability weather station to the location specified by $GeoLocation.
  • The location 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 specified by latitude/longitude pairs, assuming degrees as units, a GeoPosition specification, or Entity objects, assuming they represent objects with geographic coordinates. They can also be GeoGraphics primitives such as GeoDisk, or a city specification of the type used in CityData. AirTemperatureData gives results for the nearest high-reliability weather station to the location.
  • locationspec can be either individual locations or lists of them.
  • datespec can be specified as a date list, a string in DateString format, or as a DateObject.
  • AirTemperatureData[locationspec,datespec] by default takes datespec to be given in local time and uses UTC for all output times.
  • When specific times are given, an interpolated result for that time is returned. datespec specifications for a day or longer period return the interval of air temperature measurements.
  • datespec can be specified as {start,end,step} for compatibility with DateRange specifications. step can be All, "Day", "Week", "Month", or "Year". All gives all recorded observations. If omitted, step is assumed to have the value All.
  • Location and date can also be specified together as Association["Location"->locationspec,"Date"datespec].
  • AirTemperatureData[locationspec,datespec,func] is used to specify the format of output when locations are specified.
  • Possible settings for func include:
  • Allreturn all values for extended locations and times
    Automaticreturn intervals for extended locations and indeterminate times
    Intervalreturn intervals for extended locations and times
    Maxreturn maximum values for extended locations and times
    Meanreturn mean value for extended locations and times
    Minreturn minumum values for extended locations and times
    StandardDeviationreturn standard deviation for extended locations and times
    "Stations"return all values along with their source weather station
  • Temperature is returned as a Quantity in either Celsius or Fahrenheit.
  • The option UnitSystem controls output units. The default value is set by $UnitSystem. The following settings can also be used:
  • "Imperial"return results in imperial units
    "Metric"return results in metric units
  • AirTemperatureData[locationspec,"property"] returns the specified weather station property for the location corresponding to locationspec.
  • Properties related to identifying weather stations include:
  • "Coordinates"weather station coordinates as a GeoPosition
    "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
  • AirTemperatureData can retrieve observational air temperature data from meteorological stations throughout the world.


open allclose all

Basic Examples  (1)

Find the most recent air temperature measurement near your current location:

Temperatures can be returned in Celsius or Fahrenheit:

Discover the temperature for a specific weather station:

Obtain the interpolated temperature at a specific date and location:

Scope  (19)

Location Specification  (6)

The current recorded temperature from a high-reliability station at the approximate coordinates of "KBOS":

Coordinates can be supplied for a location:

Entity objects can be used:

Obtain the appropriate Entity using free-form input ():

Discover the recorded air temperature range in a 180-degree arc to the east of Paris:

Find the range of recent air temperature measurements across a geographic region:

To return the station from coordinates or a city name, use the "StationName" property:

Station Properties  (3)

Find the name and coordinates of the station used:

Discover the relative distance of the station used from a specified location:

Learn a station's altitude:

Date Specification  (3)

Dates can be input using DateObject:

Dates can also be specified in DateList format:

Date ranges in the format {start,end} will return all recorded data within that range:

Date specifications for a time period larger than an hour will return the Interval for the temperatures for that time period:

Lists of Locations  (3)

Lists of locations can be provided:

Calculate the interpolated air temperature for multiple locations at a specific time:

Find the calculated air temperatures of multiple locations and dates:

Format Specification  (2)

Find the air temperature for an extended location:

Obtain the maximum or minimum recorded temperature:

Use the setting Mean to obtain the average temperature:

Return the station for all displayed values:

Association Specification  (2)

Date and location can be specified together using Association:

Association specification works with format arguments:

Options  (2)

UnitSystem  (2)

By default, results use the format given by $UnitSystem:

Set UnitSystem to "Imperial" to specify Fahrenheit:

Or set UnitSystem to "Metric" to specify Celsius:

UnitConvert can also be used to adjust the units:

Applications  (4)

Recent temperature measurements from the capital cities of South America:

Find the coldest current temperature measurement within 100 miles of Anchorage, Alaska:

Find weather stations along 90 degrees west longitude:

Observe the interpolated temperature at noon as a function of latitude:

Discover the distribution of temperature measurements for Venice on a given day:

Properties & Relations  (4)

By default, location is specified by $GeoLocation:

IconData works with the outputs of AirTemperatureData:

Use GeoGraphics and IconData to display the local temperatures at a selection of cities within Germany:

Find all stations in a region with GeoEntities:

Find the temperature at all stations:

Neat Examples  (3)

Calculate the speed of sound based on recent air pressure and temperature measurements throughout major cities in Colorado:

Examine the correlation of temperature and altitude for weather stations within the Alps:

Find the temperature variation over the course of a year:

Find the average temperature variation by month:

Find that the maximum temperature variation occurs in winter rather than summer, like the averages:

Based on this, look at how the variance in the daily temperature variations changes over the year:

Wolfram Research (2014), AirTemperatureData, Wolfram Language function,


Wolfram Research (2014), AirTemperatureData, Wolfram Language function,


Wolfram Language. 2014. "AirTemperatureData." Wolfram Language & System Documentation Center. Wolfram Research.


Wolfram Language. (2014). AirTemperatureData. Wolfram Language & System Documentation Center. Retrieved from


@misc{reference.wolfram_2023_airtemperaturedata, author="Wolfram Research", title="{AirTemperatureData}", year="2014", howpublished="\url{}", note=[Accessed: 12-April-2024 ]}


@online{reference.wolfram_2023_airtemperaturedata, organization={Wolfram Research}, title={AirTemperatureData}, year={2014}, url={}, note=[Accessed: 12-April-2024 ]}