On this topic I will add information from the Spanish weather service (AEMET) (see here) to my climate change environment.
If you want to skip the technical data loading stuff and go straight to the results, Click here
Although the documentation is quite sparse and—as far as I could see—only in Spanish, it is quite easy to use.
On this page you can see the different kinds of data that are available.
I have chosen to use 'valores-climatologicos' API request
The workflow below will extract the daily climate data for all weather stations and load them into the table aemet_data.
Below is a screenshot of part of the database table with the daily data aemet_data.
The workflow below will load a table with one row for each AEMet weather station, plus some additional info, like its Latitude, Longitude and the province where it is located.
If I execute a SELECT count (distinct province) FROM public.aemet_stations on this table, I get a result of 54. This is an issue, because officially there are only 50 provinces in Spain. This means we have 4 provinces too many.
Let`s try to spot them:
One obvious 'error' we can see straight at the beginning of our table : 'BALEARES' and 'ILLES BALEARS' are obviously the same Province. I will change all occurrences of 'ILLES BALEARS' to 'BALEARES'
Another one is that some stations have a value 'null' for province, Apparently, these rows have all columns 'null'. Why ???. For now I will just delete them, as they are of no use.
Another error seems to be that we have both "SANTA CRUZ DE TENERIFE" and "STA. CRUZ DE TENERIFE", which are obviously the same. I will update them to SANTA CRUZ DE TENERIFE.
It's OK now, we have 52 values , including 'Ceuta' and 'Melilla' which were not in the 'official' list of province
(I have downloaded the 'official' list of provinces in Spain as a csv file from this web address : https://datos.gob.es/en/catalogo/a09002970-provincias-de-espana