Skip to content

Weather Information

The Weather Info service provides daily, current, and forecast weather information. For a single polygon, you can query daily weather almost two years historically and up to 10 days into the future.

Usage

The retrieveCurrentWeather() query is used to retrieve current weather information for a single polygon. The service takes a single argument:

  • polygonId

The output is returned in a GraphQL structure and is fully queryable. This means that you can ask for just the data you need and nothing more. The full output can now be found in the schema and documentation in the playground. See below for an example query that can be used to explore the data.


query {
  retrieveCurrentWeather(
    polygonId: "[YOUR POLYGON_ID GOES HERE]"
  ) 
  {
    Status
    Message
    Result {
      data {
        asOf
        cloudCover
        cloudCoverHighAltPct
        cloudCoverLowAltPct
        cloudCoverMidAltPct
        conditionCode
        daylight
        humidity
        precipitationIntensity
        pressure
        pressureTrend
        temperature
        temperatureApparent
        temperatureDewPoint
        uvIndex
        visibility
        windDirection
        windGust
        windSpeed
      }
    }
  }
}

The retrieveDailyWeather() query is used to retrieve daily weather information for a single polygon. The service takes three arguments:

  • polygonId
  • startDate
  • endDate

Historical weather information is returned for dates prior to,and including, the current date. Forecast weather information is provided for dates beyond the current date, up to 10 days in the future.

query {
  retrieveDailyWeather(
    polygonId: "[YOUR POLYGON_ID GOES HERE]",
    startDate: "2023-10-20",
    endDate: "2023-10-31"
  ) 
  {
    Status
    Message
    Result {
      data {
        days {
          forecastStart
          forecastEnd
          conditionCode
          maxUvIndex
          moonPhase
          moonrise
          moonset
          precipitationAmount
          precipitationChance
          precipitationType
          snowfallAmount
          solarMidnight
          solarNoon
          sunrise
          sunriseAstronomical
          sunriseCivil
          sunriseNautical
          sunset
          sunsetCivil
          sunsetNautical
          temperatureMax
          temperatureMin
          daytimeForecast {
            forecastStart
            forecastEnd
            cloudCover
            conditionCode
            humidity
            precipitationAmount
            precipitationChance
            precipitationType
            snowfallAmount
            windDirection
            windSpeed
          }
          overnightForecast {
            forecastStart
            forecastEnd
            cloudCover
            conditionCode
            humidity
            precipitationAmount
            precipitationChance
            precipitationType
            snowfallAmount
            windDirection
            windSpeed
          }
        }
      }
    }
  }
}

Please refer to the Schema Documentation in the API Playground for more information.