TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/elenacarino-max/mas-climapp/llms.txt
Use this file to discover all available pages before exploring further.
/comparar route looks up the most recent manually stored record for a given municipality, fetches the current live reading from AEMET for the same location, and returns the numeric difference between the two for each shared measurement field. This makes it easy to identify how much local observations deviate from the official AEMET baseline. A GET request loads the comparison form with no result. A POST request triggers the comparison and renders the result alongside the form.
Request
GET — load the form
comparar.html template with resultado set to null. No comparison is performed.
POST — run the comparison
Name of the municipality to compare. Must match the
municipio value stored in at least one manual record exactly. Example: "Madrid".Optional date filter in
YYYY-MM-DD format. When provided, only manual records matching this date are considered as the comparison baseline. Leave blank to use the most recent record for the municipality regardless of date.Example request
Response
The endpoint renderscomparar.html and passes a resultado object to the template. When the comparison succeeds, the object contains the stored values, the live AEMET values, and the calculated deviation for each field.
Success
abs(manual − aemet)), so they are always non-negative. The hay_discrepancia boolean is true when any deviation exceeds its threshold (temperature > 3 °C, humidity > 10%, wind > 10 km/h, rain > 5 mm).
Failure — missing municipality field
Failure — no stored record found
Comparisons are always between a manual record (
"fuente": "manual") and the live AEMET reading. AEMET-sourced records stored via /api/clima are not used as the baseline for this comparison.