---
title: "monthlyStatistics(for:including:)"
framework: weatherkit
role: symbol
role_heading: Instance Method
path: "weatherkit/weatherservice/monthlystatistics(for:including:)"
---

# monthlyStatistics(for:including:)

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

## Declaration

```swift
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

Return Value The requested monthly weather statistics

## Discussion

Discussion note: 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: let (monthlyPrecipitationStatistics, monthlyTemperatureStatistics) = try await service.monthlyStatistics(for: newYork, including: .precipitation, .temperature)
