|
|
These locations are used for model training:
|
|
|
**Data selection**
|
|
|
|
|
|
Locations for model training on 4 locations
|
|
|
|
|
|
- (48.333056, 16.631944), # Vienna, Austria
|
|
|
- (48.3330, 16.6319), # Vienna, Austria
|
|
|
- (64.1355, -21.8954), # Reykjavik, Iceland
|
|
|
- (35.1667, 33.3667), # Nicosia, Cyprus
|
|
|
- (59.3293, 18.0686), # Stockholm, Sweden
|
|
|
- (41.3851, 2.1734), # Barcelona, Spain
|
|
|
- (55.6761, 12.5683), # Copenhagen, Denmark
|
|
|
- (52.3676, 4.9041), # Amsterdam, Netherlands
|
|
|
- (48.8566, 2.3522), # Paris, France
|
|
|
- (37.9838, 23.7275), # Athens, Greece
|
|
|
- (53.3498, -6.2603), # Dublin, Ireland
|
|
|
- (50.0755, 14.4378), # Prague, Czech Republic
|
|
|
- (47.4979, 19.0402), # Budapest, Hungary
|
|
|
- (45.4408, 12.3155), # Venice, Italy
|
|
|
- (60.1695, 24.9354), # Helsinki, Finland
|
|
|
- (51.5074, -0.1278), # London, United Kingdom
|
|
|
- (40.4168, -3.7038), # Madrid, Spain
|
|
|
- (43.7102, 7.2620), # Nice, France
|
|
|
- (50.8503, 4.3517), # Brussels, Belgium
|
|
|
- (54.6872, 25.2797), # Vilnius, Lithuania
|
|
|
- (42.6977, 23.3219), # Sofia, Bulgaria
|
|
|
- (59.9139, 10.7522), # Oslo, Norway
|
|
|
- (46.2044, 6.1432), # Geneva, Switzerland
|
|
|
- (56.9496, 24.1052), # Riga, Latvia
|
|
|
- (44.4268, 26.1025), # Bucharest, Romania
|
|
|
- (48.1486, 17.1077), # Bratislava, Slovakia
|
|
|
- (44.7871, 20.4572), # Belgrade, Serbia
|
|
|
- (52.2297, 21.0122) # Warsaw, Poland
|
|
|
|
|
|

|
|
|
|
|
|
these are the new locations with more variety of temperature ranges
|
|
|
Additional locations for model training on all locations, with variety of temperate ranges
|
|
|
|
|
|
- (48.3330, 16.6319), # Vienna, Austria
|
|
|
- (64.1355, -21.8954), # Reykjavik, Iceland
|
|
|
- (35.1667, 33.3667), # Nicosia, Cyprus
|
|
|
- (59.3293, 18.0686), # Stockholm, Sweden
|
|
|
- (41.3851, 2.1734), # Barcelona, Spain
|
|
|
- (55.6761, 12.5683), # Copenhagen, Denmark
|
|
|
- (37.9838, 23.7275), # Athens, Greece
|
... | ... | @@ -60,25 +35,34 @@ these are the new locations with more variety of temperature ranges |
|
|
- (39.4550, -31.2720), # Azores, Portugal, westernmost point in Europe
|
|
|
- (67.9340, 68.7060) # Ural Mountains, Russia, easternmost point in Europe
|
|
|
|
|
|
and these for model validation:
|
|
|
|
|
|
Location for model validation
|
|
|
|
|
|
- (52.3676, 4.9041), # Amsterdam, Netherlands
|
|
|
- (54.6872, 25.2797), # Vilnius, Lithuania
|
|
|
- (59.9139, 10.7522), # Oslo, Norway
|
|
|
- (56.9496, 24.1052), # Riga, Latvia
|
|
|
- (48.1486, 17.1077), # Bratislava, Slovakia
|
|
|
- (44.7871, 20.4572) # Belgrade, Serbia
|
|
|
- (55.7558, 37.6176) # Moscow, Russia
|
|
|
- (59.3293, 18.0686), # Stockholm, Sweden
|
|
|
- (38.7223, -9.1393), # Lisbon, Portugal
|
|
|
- (50.4501, 30.5234), # Kyiv, Ukraine
|
|
|
- (37.9838, 23.7275), # Athens, Greece
|
|
|
- (48.2082, 16.3738), # Vienna, Austria
|
|
|
- (53.3498, -6.2603), # Dublin, Ireland
|
|
|
- (35.8989, 14.5146), # Valletta, Malta
|
|
|
- (78.2232, 15.6469), # Svalbard, Norway
|
|
|
- (69.9058, 27.0287), # Utsjoki, Finland
|
|
|
- (37.3891, -5.9845), # Seville, Spain
|
|
|
- (37.5079, 15.0830) # Catania, Sicily, Italy
|
|
|
|
|
|

|
|
|
|
|
|
Additional stand-alone location for validation
|
|
|
|
|
|
- (48.1351, 11.5820) # Germany, Munich
|
|
|
|
|
|
|
|
|
**Data source and inspection**
|
|
|
For each location weather data (2017-04-01 to 2024-04-01) were fetched from open-meteo. Then I inspect and clean the data by dealing with NAN and plotting the data for these columns: T2M, RH2M, dew_point_2m, RR, pressure_msl, surface_pressure, global_tilted_irradiance.
|
|
|
|
|
|

|
|
|
|
|
|
**Feature Engineering**
|
|
|
After separating time index and feature engineering the dataframe consists of these columns:
|
|
|
|
|
|
**fetched**
|
... | ... | @@ -96,7 +80,6 @@ After separating time index and feature engineering the dataframe consists of th |
|
|
- 'lat',
|
|
|
- 'lon'
|
|
|
- 'alt'
|
|
|
after feedback I also fetched altitude of the locations from Open-Elevation API
|
|
|
|
|
|
**time**
|
|
|
- 'hour',
|
... | ... | @@ -155,10 +138,9 @@ after feedback I also fetched altitude of the locations from Open-Elevation API |
|
|
- '365d_rolling_min',
|
|
|
- '365d_rolling_std'
|
|
|
|
|
|
**Data Model-Preparation**
|
|
|
Afterwards I normalize and scale the data with a MinMaxScaler.
|
|
|
|
|
|
|
|
|
|
|
|
With this code the sequences with sequence length = 6 and param = 'T2M' for the model are created.
|
|
|
```
|
|
|
X_train, y_train = [], []
|
... | ... | |