Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/adrianaarang/climapp/llms.txt

Use this file to discover all available pages before exploring further.

ClimApp lets you supplement live AEMET data with your own field observations. The manual entry form at /registro accepts a full set of weather parameters, validates each value against defined ranges, and persists the record locally — tagged with fuente: "manual" so it can be distinguished from agency data throughout the rest of the application.

What you can record

Each manual entry captures the following fields:

Date

The observation date in DD/MM/YYYY format. The form uses this as the primary temporal key for filtering and comparison.

Temperature

Air temperature in degrees Celsius. Accepted range: −50 °C to 60 °C.

Humidity

Relative humidity as a percentage. Accepted range: 0% to 100%.

Wind speed

Wind speed in km/h. Must be ≥ 0.

Rainfall

Accumulated rainfall in millimetres. Must be ≥ 0.

Station ID

The AEMET station identifier (estacion_id) associated with your observation.

Municipality

The municipality name. Loaded automatically when you select a station from the dropdown, or resolved as a fallback from estacion_por_municipio.json.

How to submit a reading

1

Navigate to /registro

Open the manual entry form by clicking Registro in the navigation bar or going directly to /registro.
2

Select a municipality

Choose your municipality from the dropdown. The list is populated from static/js/estacion_por_municipio.json, which maps each municipality to its AEMET station ID. Selecting a municipality automatically sets the station ID field.
3

Fill in the weather values

Enter the observed values for temperature, humidity, wind speed, rainfall, and date. All fields are required.
4

Submit the form

Click Submit. The browser sends a JSON payload to POST /api/registrar. If validation passes, the record is written to storage and a success message is displayed. If any value is out of range or the date format is wrong, a validation error is returned.

Validation rules

Every submission is checked by validate_weather_data in utils/validators.py before being written to disk. The following rules must all pass:
fecha
string
required
Observation date. Must be a parseable date string. The canonical format is DD/MM/YYYY; DD-MM-YYYY and YYYY-MM-DD are also accepted by the validator, but the frontend always sends DD/MM/YYYY.
temperatura
number
required
Air temperature in °C. Must be a finite number in the range −50 to 60 (inclusive).
humedad
number
required
Relative humidity in %. Must be a finite number in the range 0 to 100 (inclusive).
viento
number
required
Wind speed in km/h. Must be a finite number ≥ 0.
lluvia
number
required
Rainfall in mm. Must be a finite number ≥ 0.

Storage

Validated records are appended to data/registros_climaticos.json by JSONRepository.guardar(). The file is created automatically if it does not exist. Each saved record includes two extra fields injected by the controller:
{
  "estacion_id": "3195",
  "fecha": "29/04/2026",
  "temperatura": 22.5,
  "humedad": 60.0,
  "viento": 15.0,
  "lluvia": 0.0,
  "municipio": "Madrid",
  "fuente": "manual"
}
The fuente: "manual" tag is what allows the historical records view and the comparison tool to distinguish your entries from AEMET-sourced data.
The date must be in DD/MM/YYYY format when sent to the API. Submissions with a date in any other format will fail validation and return a 400 error. The form’s JavaScript automatically formats the date picker value before sending, but if you call the API directly you must format the date yourself.

Build docs developers (and LLMs) love