> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fix6.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Weather Data

> Retrieve observed weather data over the project carea for a given period.

The `period` can take the following values, with a default of `daily`: ['daily', 'weekly', 'monthly', 'yearly'].

The `start_date` defaults to a year before the current date. The earliest `start_date` is is ten years before the current date. However you can request more data be made
available for your project, back to 1980. To do so please reach us at `api@fix6.io`.
The latest `end_date` is usually seven days before the current date, but is subject to publishing of reanalysis data.

If your start and/or end dates fall within a time period, the data will only be aggregated to the start and/or end date.
Meaning, aggregation will be incomplete for montly data if your start date.

Periods are queried based on the local time. So aggregation begins at midnight local time for the project area.



## OpenAPI

````yaml get /projects/{project_id}/weather
openapi: 3.0.2
info:
  title: Fix6 API
  version: 0.2.1
servers: []
security: []
paths:
  /projects/{project_id}/weather:
    get:
      summary: Get Weather Data
      description: >-
        Retrieve observed weather data over the project carea for a given
        period.


        The `period` can take the following values, with a default of `daily`:
        ['daily', 'weekly', 'monthly', 'yearly'].


        The `start_date` defaults to a year before the current date. The
        earliest `start_date` is is ten years before the current date. However
        you can request more data be made

        available for your project, back to 1980. To do so please reach us at
        `api@fix6.io`.

        The latest `end_date` is usually seven days before the current date, but
        is subject to publishing of reanalysis data.


        If your start and/or end dates fall within a time period, the data will
        only be aggregated to the start and/or end date.

        Meaning, aggregation will be incomplete for montly data if your start
        date.


        Periods are queried based on the local time. So aggregation begins at
        midnight local time for the project area.
      operationId: get_weather_data_projects__project_id__weather_get
      parameters:
        - required: true
          schema:
            title: Project Id
            type: string
          name: project_id
          in: path
        - required: false
          schema:
            title: Period
            type: string
            default: daily
          name: period
          in: query
        - required: false
          schema:
            title: Start Date
            type: string
          name: start_date
          in: query
        - required: false
          schema:
            title: End Date
            type: string
          name: end_date
          in: query
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AggregateERA5Frame'
        '409':
          description: Incorrect query parameters passed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    AggregateERA5Frame:
      title: AggregateERA5Frame
      required:
        - period
        - project_id
        - lat
        - lon
        - avg_temperature_degC
        - min_temperature_degC
        - max_temperature_degC
        - avg_dewpoint_temperature_degC
        - min_dewpoint_temperature_degC
        - max_dewpoint_temperature_degC
        - avg_wind_speed_m_per_s
        - max_wind_speed_m_per_s
        - avg_surface_pressure_Pa
        - avg_total_cloud_cover_0_1
        - sum_total_precipitation_mm_of_water_equivalent
        - avg_relative_humidity_0_1
      type: object
      properties:
        period:
          title: Period
          type: string
          format: date-time
        project_id:
          title: Project Id
          type: string
        lat:
          title: Lat
          maximum: 90
          minimum: -90
          type: number
        lon:
          title: Lon
          maximum: 180
          minimum: -180
          type: number
        avg_temperature_degC:
          title: Avg Temperature Degc
          type: number
        min_temperature_degC:
          title: Min Temperature Degc
          type: number
        max_temperature_degC:
          title: Max Temperature Degc
          type: number
        avg_dewpoint_temperature_degC:
          title: Avg Dewpoint Temperature Degc
          type: number
        min_dewpoint_temperature_degC:
          title: Min Dewpoint Temperature Degc
          type: number
        max_dewpoint_temperature_degC:
          title: Max Dewpoint Temperature Degc
          type: number
        avg_wind_speed_m_per_s:
          title: Avg Wind Speed M Per S
          type: number
        max_wind_speed_m_per_s:
          title: Max Wind Speed M Per S
          type: number
        avg_surface_pressure_Pa:
          title: Avg Surface Pressure Pa
          type: number
        avg_total_cloud_cover_0_1:
          title: Avg Total Cloud Cover 0 1
          type: number
        sum_total_precipitation_mm_of_water_equivalent:
          title: Sum Total Precipitation Mm Of Water Equivalent
          type: number
        avg_relative_humidity_0_1:
          title: Avg Relative Humidity 0 1
          type: number
        sum_snowfall_mm_of_water_equivalent:
          title: Sum Snowfall Mm Of Water Equivalent
          type: number
        sum_snow_depth_mm_of_water_equivalent:
          title: Sum Snow Depth Mm Of Water Equivalent
          type: number
    HTTPError:
      title: HTTPError
      required:
        - detail
      type: object
      properties:
        detail:
          title: Detail
          type: string
      example:
        detail: HTTPException raised.
    HTTPValidationError:
      title: HTTPValidationError
      type: object
      properties:
        detail:
          title: Detail
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
    ValidationError:
      title: ValidationError
      required:
        - loc
        - msg
        - type
      type: object
      properties:
        loc:
          title: Location
          type: array
          items:
            anyOf:
              - type: string
              - type: integer
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````