<!--
{
  "availability" : [
    "iOS: 18.0.0 -",
    "iPadOS: 18.0.0 -",
    "macCatalyst: 18.0.0 -",
    "macOS: 15.0.0 -",
    "tvOS: 18.0.0 -",
    "visionOS: 2.0.0 -",
    "watchOS: 11.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WeatherKit",
  "identifier" : "/documentation/WeatherKit/WeatherService/monthlyStatistics(for:including:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WeatherKit"
    ],
    "preciseIdentifier" : "s:10WeatherKit0A7ServiceC17monthlyStatistics3for9includingAA07MonthlyaE0VyxGxQp_tSo10CLLocationC_AA0haE5QueryVyxGxQptYaKRvzSeRzSERzSQRzs8SendableRzlF"
  },
  "title" : "monthlyStatistics(for:including:)"
}
-->

# monthlyStatistics(for:including:)

Returns monthly weather statistics for the requested location, for all 12 months of the Gregorian calendar year.

```
final func monthlyStatistics<each T>(for location: CLLocation, including dataSets: repeat MonthlyWeatherStatisticsQuery<each T>) async throws -> (repeat MonthlyWeatherStatistics<each T>) where repeat each T : Decodable, repeat each T : Encodable, repeat each T : Equatable, repeat each T : Sendable
```

## Parameters

`location`

The requested location.

## Return Value

The requested monthly weather statistics

## Discussion> Throws: Weather data error `WeatherError`

The statistics returned for each month are derived from weather data recorded over the past decades, to the present date. Each item returned represents statistics for a particular Gregorian Calendar month of the year.

This is a variadic API in which any combination of data sets can be requested and returned as a tuple. Here’s an example:

```swift
let (monthlyPrecipitationStatistics, monthlyTemperatureStatistics) = try await service.monthlyStatistics(for: newYork, including: .precipitation, .temperature)
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)