christian
fb27c8b367
All checks were successful
Docker Build & Publish / Build Docker (push) Successful in 1m9s
108 lines
12 KiB
TypeScript
108 lines
12 KiB
TypeScript
import { Forecast, coordType } from "@/types/types";
|
|
|
|
export const defaultState = {
|
|
results: [
|
|
{
|
|
address_components: [
|
|
{
|
|
long_name: "Sluseholmen",
|
|
short_name: "Sluseholmen",
|
|
types: ["route"],
|
|
},
|
|
{
|
|
long_name: "Vesterbro",
|
|
short_name: "Vesterbro",
|
|
types: ["political", "sublocality", "sublocality_level_1"],
|
|
},
|
|
{
|
|
long_name: "København",
|
|
short_name: "København",
|
|
types: ["locality", "political"],
|
|
},
|
|
{
|
|
long_name: "Denmark",
|
|
short_name: "DK",
|
|
types: ["country", "political"],
|
|
},
|
|
{
|
|
long_name: "2450",
|
|
short_name: "2450",
|
|
types: ["postal_code"],
|
|
},
|
|
],
|
|
formatted_address: "Sluseholmen, 2450 København, Denmark",
|
|
geometry: {
|
|
bounds: {
|
|
northeast: {
|
|
lat: 55.64754749999999,
|
|
lng: 12.5502837,
|
|
},
|
|
southwest: {
|
|
lat: 55.6435823,
|
|
lng: 12.5452758,
|
|
},
|
|
},
|
|
location: {
|
|
lat: 55.6452427,
|
|
lng: 12.5475522,
|
|
},
|
|
location_type: "GEOMETRIC_CENTER",
|
|
viewport: {
|
|
northeast: {
|
|
lat: 55.64754749999999,
|
|
lng: 12.5502837,
|
|
},
|
|
southwest: {
|
|
lat: 55.6435823,
|
|
lng: 12.5452758,
|
|
},
|
|
},
|
|
},
|
|
place_id: "ChIJBzR68YNUUkYRoxbRfFuUlEM",
|
|
types: ["route"],
|
|
},
|
|
],
|
|
status: "OK",
|
|
};
|
|
|
|
export const defaultForecast = {
|
|
coord: { lon: 12.5476, lat: 55.6452 },
|
|
weather: [
|
|
{ id: 803, main: "Clouds", description: "broken clouds", icon: "04n" },
|
|
],
|
|
base: "stations",
|
|
main: {
|
|
temp: 284.38,
|
|
feels_like: 283.83,
|
|
temp_min: 283.94,
|
|
temp_max: 285.38,
|
|
pressure: 1013,
|
|
humidity: 87,
|
|
},
|
|
visibility: 10000,
|
|
wind: { speed: 3.09, deg: 60 },
|
|
clouds: { all: 75 },
|
|
dt: 1715027131,
|
|
sys: {
|
|
type: 1,
|
|
id: 1575,
|
|
country: "DK",
|
|
sunrise: 1714965344,
|
|
sunset: 1715021822,
|
|
},
|
|
timezone: 7200,
|
|
id: 2618424,
|
|
name: "Copenhagen municipality",
|
|
cod: 200,
|
|
};
|
|
|
|
export const defaultGeoLocation: coordType = {
|
|
name: 'copenhagen',
|
|
geo:{
|
|
lat: 55.647229603577124,
|
|
lng: 12.54995987788925
|
|
}
|
|
}
|
|
|
|
export const defaultHourlyForecast: Forecast =
|
|
{"latitude":52.52,"longitude":13.419998,"generationtime_ms":0.5199909210205078,"utc_offset_seconds":7200,"timezone":"Europe/Berlin","timezone_abbreviation":"CEST","elevation":38.0,"current_units":{"time":"iso8601","interval":"seconds","temperature_2m":"°C","apparent_temperature":"°C","is_day":"","precipitation":"mm","rain":"mm","showers":"mm","snowfall":"cm","weather_code":"wmo code","cloud_cover":"%","wind_speed_10m":"km/h","wind_direction_10m":"°"},"current":{"time":"2024-05-10T00:45","interval":900,"temperature_2m":12.8,"apparent_temperature":11.4,"is_day":0,"precipitation":0.00,"rain":0.00,"showers":0.00,"snowfall":0.00,"weather_code":3,"cloud_cover":100,"wind_speed_10m":3.2,"wind_direction_10m":63},"hourly_units":{"time":"iso8601","temperature_2m":"°C","apparent_temperature":"°C","precipitation_probability":"%","precipitation":"mm","weather_code":"wmo code","wind_speed_10m":"km/h","is_day":""},"hourly":{"time":["2024-05-10T00:00","2024-05-10T01:00","2024-05-10T02:00","2024-05-10T03:00","2024-05-10T04:00","2024-05-10T05:00","2024-05-10T06:00","2024-05-10T07:00","2024-05-10T08:00","2024-05-10T09:00","2024-05-10T10:00","2024-05-10T11:00","2024-05-10T12:00","2024-05-10T13:00","2024-05-10T14:00","2024-05-10T15:00","2024-05-10T16:00","2024-05-10T17:00","2024-05-10T18:00","2024-05-10T19:00","2024-05-10T20:00","2024-05-10T21:00","2024-05-10T22:00","2024-05-10T23:00","2024-05-11T00:00","2024-05-11T01:00","2024-05-11T02:00","2024-05-11T03:00","2024-05-11T04:00","2024-05-11T05:00","2024-05-11T06:00","2024-05-11T07:00","2024-05-11T08:00","2024-05-11T09:00","2024-05-11T10:00","2024-05-11T11:00","2024-05-11T12:00","2024-05-11T13:00","2024-05-11T14:00","2024-05-11T15:00","2024-05-11T16:00","2024-05-11T17:00","2024-05-11T18:00","2024-05-11T19:00","2024-05-11T20:00","2024-05-11T21:00","2024-05-11T22:00","2024-05-11T23:00","2024-05-12T00:00","2024-05-12T01:00","2024-05-12T02:00","2024-05-12T03:00","2024-05-12T04:00","2024-05-12T05:00","2024-05-12T06:00","2024-05-12T07:00","2024-05-12T08:00","2024-05-12T09:00","2024-05-12T10:00","2024-05-12T11:00","2024-05-12T12:00","2024-05-12T13:00","2024-05-12T14:00","2024-05-12T15:00","2024-05-12T16:00","2024-05-12T17:00","2024-05-12T18:00","2024-05-12T19:00","2024-05-12T20:00","2024-05-12T21:00","2024-05-12T22:00","2024-05-12T23:00","2024-05-13T00:00","2024-05-13T01:00","2024-05-13T02:00","2024-05-13T03:00","2024-05-13T04:00","2024-05-13T05:00","2024-05-13T06:00","2024-05-13T07:00","2024-05-13T08:00","2024-05-13T09:00","2024-05-13T10:00","2024-05-13T11:00","2024-05-13T12:00","2024-05-13T13:00","2024-05-13T14:00","2024-05-13T15:00","2024-05-13T16:00","2024-05-13T17:00","2024-05-13T18:00","2024-05-13T19:00","2024-05-13T20:00","2024-05-13T21:00","2024-05-13T22:00","2024-05-13T23:00","2024-05-14T00:00","2024-05-14T01:00","2024-05-14T02:00","2024-05-14T03:00","2024-05-14T04:00","2024-05-14T05:00","2024-05-14T06:00","2024-05-14T07:00","2024-05-14T08:00","2024-05-14T09:00","2024-05-14T10:00","2024-05-14T11:00","2024-05-14T12:00","2024-05-14T13:00","2024-05-14T14:00","2024-05-14T15:00","2024-05-14T16:00","2024-05-14T17:00","2024-05-14T18:00","2024-05-14T19:00","2024-05-14T20:00","2024-05-14T21:00","2024-05-14T22:00","2024-05-14T23:00","2024-05-15T00:00","2024-05-15T01:00","2024-05-15T02:00","2024-05-15T03:00","2024-05-15T04:00","2024-05-15T05:00","2024-05-15T06:00","2024-05-15T07:00","2024-05-15T08:00","2024-05-15T09:00","2024-05-15T10:00","2024-05-15T11:00","2024-05-15T12:00","2024-05-15T13:00","2024-05-15T14:00","2024-05-15T15:00","2024-05-15T16:00","2024-05-15T17:00","2024-05-15T18:00","2024-05-15T19:00","2024-05-15T20:00","2024-05-15T21:00","2024-05-15T22:00","2024-05-15T23:00","2024-05-16T00:00","2024-05-16T01:00","2024-05-16T02:00","2024-05-16T03:00","2024-05-16T04:00","2024-05-16T05:00","2024-05-16T06:00","2024-05-16T07:00","2024-05-16T08:00","2024-05-16T09:00","2024-05-16T10:00","2024-05-16T11:00","2024-05-16T12:00","2024-05-16T13:00","2024-05-16T14:00","2024-05-16T15:00","2024-05-16T16:00","2024-05-16T17:00","2024-05-16T18:00","2024-05-16T19:00","2024-05-16T20:00","2024-05-16T21:00","2024-05-16T22:00","2024-05-16T23:00"],"temperature_2m":[13.2,12.7,12.3,11.8,11.3,11.1,11.2,11.8,13.1,14.5,16.5,18.5,19.9,20.8,21.2,21.1,21.6,21.2,21.2,21.0,20.0,18.4,17.0,16.1,14.3,13.4,12.8,12.3,11.8,11.5,11.5,12.1,13.3,15.0,16.7,18.0,19.0,19.9,20.5,20.2,20.4,19.9,19.9,19.5,18.3,16.6,15.1,14.2,14.8,14.0,13.3,12.5,11.6,11.0,10.3,10.4,11.4,12.5,13.7,15.1,16.9,18.5,19.3,20.0,20.5,20.5,20.2,19.6,18.7,17.2,15.6,14.3,13.3,12.5,11.6,10.6,9.6,9.1,9.0,9.5,10.5,12.4,15.0,17.3,19.0,20.4,21.4,22.1,22.5,22.5,22.1,21.4,20.3,18.8,17.0,15.4,14.2,13.2,12.4,11.4,10.6,10.1,10.2,10.7,11.8,14.1,17.0,19.4,20.9,22.0,22.8,23.4,23.8,23.8,23.2,22.3,21.7,19.9,18.2,16.7,15.6,14.8,14.0,13.0,12.1,11.7,11.9,12.5,13.8,16.0,18.7,21.1,22.7,24.0,24.8,25.3,25.4,25.3,24.8,24.1,23.1,21.8,20.1,18.7,17.5,16.6,15.7,14.7,13.8,13.3,13.3,13.6,14.5,16.5,19.1,21.4,23.3,24.9,25.9,26.1,25.8,25.4,25.2,25.0,24.4,23.0,21.3,19.8],"apparent_temperature":[11.7,11.3,11.0,10.3,10.2,9.9,10.0,10.5,11.8,13.4,15.0,16.8,19.1,20.1,20.0,19.1,19.2,19.6,19.6,19.5,19.1,17.4,16.1,16.0,13.6,12.7,12.2,11.6,11.3,10.9,11.0,11.3,12.4,14.2,15.7,17.0,18.2,18.7,19.4,18.6,19.0,18.2,18.3,17.5,16.4,14.8,13.9,13.0,13.8,13.1,12.1,9.8,8.4,7.6,7.1,7.4,8.3,9.3,10.5,12.1,14.6,16.4,17.1,17.7,18.0,17.5,17.0,16.5,15.6,14.3,12.7,11.2,10.0,9.0,8.1,7.1,5.9,5.4,5.2,5.6,6.6,8.7,11.6,14.7,16.9,18.4,19.3,19.6,19.5,18.8,18.2,17.6,16.6,15.2,13.5,11.9,10.7,9.6,8.8,7.8,7.0,6.5,6.6,7.1,8.2,10.3,13.0,15.8,17.8,19.2,20.0,20.3,20.2,19.6,19.0,18.5,18.1,16.5,14.9,13.5,12.5,11.7,10.9,10.0,9.2,8.8,8.9,9.5,10.7,13.0,15.7,18.6,20.6,21.9,22.6,22.8,22.4,21.7,21.1,20.7,20.0,18.8,17.2,15.7,14.4,13.2,12.1,11.3,10.5,10.1,10.1,10.4,11.4,13.3,16.0,18.6,21.3,23.4,24.5,24.4,23.3,22.8,22.8,22.7,22.4,21.4,20.0,18.5],"precipitation_probability":[0,0,0,0,0,0,0,0,0,1,2,3,13,22,32,26,19,13,16,20,23,16,10,3,2,1,0,0,0,0,0,0,0,1,2,3,15,27,39,39,39,39,37,34,32,22,13,3,2,1,0,0,0,0,0,0,0,1,2,3,4,5,6,6,6,6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,3,3,3,3,3,3,3,5,8,10,16,23,29,26,22,19,27,34,42,42,42,42,41,40,39,35,30,26,25,24,23,27,31,35,37,40,42,40,37,35,33,31,29,25,20,16,17,18,19,23,28,32,34,37,39,41,43,45,47,50,52,48,43,39,36,32,29],"precipitation":[0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.10,0.10,0.10],"weather_code":[3,3,3,3,3,3,3,2,3,3,2,2,1,2,3,3,3,3,3,3,3,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,2,3,3,3,2,3,2,2,3,2,2,3,2,2,2,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,2,2,2,3,3,3,3,3,3,2,2,2,1,1,1,3,3,3,3,3,3,3,3,3],"wind_speed_10m":[4.3,3.1,2.5,3.3,1.6,2.4,2.5,2.9,2.7,1.8,3.3,5.3,5.4,6.4,2.9,6.8,9.8,3.8,4.7,5.1,3.2,4.7,4.3,0.4,6.4,6.5,5.9,5.7,4.7,4.3,3.6,4.7,5.6,5.6,7.4,6.9,5.5,8.7,9.4,9.4,7.0,9.8,9.2,11.2,11.2,10.5,9.4,8.5,7.5,6.9,8.0,10.6,10.7,11.3,10.9,10.5,11.2,11.3,11.7,11.5,12.1,13.0,13.3,13.0,13.0,12.6,12.6,12.2,11.2,9.5,9.1,9.7,9.8,9.8,10.1,10.1,10.4,10.4,10.8,11.2,11.5,11.2,10.5,10.5,11.3,12.5,13.4,13.8,13.9,13.9,13.8,13.3,12.8,12.1,11.5,10.8,10.8,10.7,10.7,10.6,10.5,10.5,10.9,11.3,12.1,13.8,15.6,17.0,17.3,16.9,16.7,17.1,17.3,17.2,16.0,14.3,13.1,10.8,10.9,10.9,10.5,10.6,10.3,10.0,9.5,9.5,9.9,10.7,11.4,12.1,13.3,14.1,14.8,15.8,16.6,17.1,17.1,16.9,16.3,15.2,14.1,13.9,13.8,13.7,13.5,12.9,12.5,12.0,11.8,11.7,12.0,12.3,13.0,14.2,15.3,15.8,16.0,16.6,17.6,17.6,17.1,16.4,14.9,13.3,11.8,11.0,10.2,10.0],"is_day":[0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0]},"daily_units":{"time":"iso8601","weather_code":"wmo code","temperature_2m_max":"°C","temperature_2m_min":"°C","apparent_temperature_max":"°C","apparent_temperature_min":"°C","sunrise":"iso8601","sunset":"iso8601","daylight_duration":"s","sunshine_duration":"s","uv_index_max":"","precipitation_sum":"mm","precipitation_hours":"h","wind_speed_10m_max":"km/h"},"daily":{"time":["2024-05-10","2024-05-11","2024-05-12","2024-05-13","2024-05-14","2024-05-15","2024-05-16"],"weather_code":[3,3,3,0,0,1,3],"temperature_2m_max":[21.6,20.5,20.5,22.5,23.8,25.4,26.1],"temperature_2m_min":[11.1,11.5,10.3,9.0,10.1,11.7,13.3],"apparent_temperature_max":[20.1,19.4,18.0,19.6,20.3,22.8,24.5],"apparent_temperature_min":[9.9,10.9,7.1,5.2,6.5,8.8,10.1],"sunrise":["2024-05-10T05:17","2024-05-11T05:15","2024-05-12T05:13","2024-05-13T05:12","2024-05-14T05:10","2024-05-15T05:09","2024-05-16T05:07"],"sunset":["2024-05-10T20:48","2024-05-11T20:49","2024-05-12T20:51","2024-05-13T20:53","2024-05-14T20:54","2024-05-15T20:56","2024-05-16T20:57"],"daylight_duration":[55855.19,56051.30,56243.70,56433.89,56622.09,56808.11,56991.75],"sunshine_duration":[31010.11,35214.31,48237.02,51920.05,52104.48,52256.59,51818.46],"uv_index_max":[5.55,5.70,6.20,6.25,6.30,5.45,5.15],"precipitation_sum":[0.00,0.00,0.00,0.00,0.00,0.00,0.30],"precipitation_hours":[0.0,0.0,0.0,0.0,0.0,0.0,3.0],"wind_speed_10m_max":[9.8,11.2,13.3,13.9,17.3,17.1,17.6]}} |