Wolfram Language & System 10.4 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)

WeatherForecastData

WeatherForecastData[loc]
gives the most recent forecast for all weather forecast properties for the specified location.

WeatherForecastData[prop]
gives the forecast for the specified property for the current location.

WeatherForecastData[date]
gives the forecast at the time or times specified by date for all properties at the current location.

WeatherForecastData[loc,prop]
gives the forecast for the property at the specified location.

WeatherForecastData[loc,prop,datespec]
gives the forecast at the time or times specified by datespec for the property at the location.

Details and OptionsDetails and Options

  • WeatherForecastData gives weather forecast data worldwide.
  • WeatherForecastData[] returns the most recent forecast for all forecast properties for the current location.
  • WeatherForecastData[] makes use of $GeoLocation and $TimeZone to determine your location and time zone.
  • The location can be specified as an ICAO code such as , a WMO code such as , an amateur weather station code such as , 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.
  • date should be specified as a DateObject or where start and end are both a DateObject.
  • datespec can be specified as a date list, a DateObject, or as a string in DateString format.
  • WeatherForecastData takes datespec to be given by $TimeZone unless otherwise specified by a DateObject. Results are returned in UTC.
  • 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 property forecasts.
  • datespec can be specified as for compatibility with DateRange specifications. step can be All or . All gives all forecast values. If omitted, step is assumed to have the value All.
  • Location and date can also be specified together as Association["Location"->loc,"Date"datespec].
  • WeatherForecastData[loc,prop,datespec,func] is used to specify the format of output when locations are specified.
  • Possible settings for func include:
  • 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
  • Alternate argument structures supported include WeatherForecastData[loc,date], WeatherForecastData[prop,date], WeatherForecastData[date,prop], WeatherForecastData[loc,func], WeatherForecastData[loc,date,func], and WeatherForecastData[loc,prop,func].
  • The option UnitSystem is available for controlling the units of the results. The following settings can be used:
  • "Imperial"return results in imperial units
    "Metric"return results in metric units
  • Data is only available for up to a week in the future.
  • Instantaneous forecast properties:
  • "CloudCoverFraction"fraction of the sky obscured by cloud cover
    "Humidity"relative humidity
    "PrecipitationRate"average precipitation rate
    "Pressure"barometric pressure
    "StationPressure"pressure, uncorrected for elevation
    "Temperature"temperature
    "WindChill"wind chill temperature
    "WindDirection"wind direction in degrees
    "WindSpeed"wind gust speed
  • Properties aggregated over periods between forecast times include:
  • "PrecipitationAmount"precipitation amount
    "PrecipitationTypes"types of precipitation forecasted (hail, rain, snow)
  • Aggregate properties available for increments:
  • "MaxTemperature"maximum temperature
    "MaxWindSpeed"maximum wind speed
    "MeanHumidity"mean relative humidity
    "MeanPressure"mean pressure
    "MeanStationPressure"mean station pressure
    "MeanTemperature"mean temperature
    "MeanWindChill"mean wind chill temperature
    "MeanWindSpeed"mean wind speed
    "MinTemperature"minimum temperature
    "TotalPrecipitation"precipitation amount
  • WeatherForecastData is assembled from a variety of sources, including the Global Forecast System and the North American Mesoscale Forecast System.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

Find the temperatures for tomorrow at 3pm:

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

Find the forecast highs for Miami over the next week:

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

Chart the cloud coverage over the next week:

In[3]:=
Click for copyable input
Out[3]=
Introduced in 2016
(10.4)