noi-techpark / bdp-commons

GNU Affero General Public License v3.0
2 stars 12 forks source link

meteorology-eurac: Existing stations inside the ODH should be reused if possible #548

Open Piiit opened 2 years ago

Piiit commented 2 years ago

Is there a guideline for Station IDs? Open Data Hub does not return station IDs so I don't see any examples. Right now I'm using a string "EURAC_(station id)" where station id is a simple integer that I get from Eurac API.

We need to find a matching point, where we understand that some stations are really the same.

@SaimonasFOS wrote:

One thing to note - you asked to not import stations that are already in Open Data Hub. However, it is not so simple to filter out existing stations. When comparing data from Open Data Hub and Eurac API Station names are inconsistent. The only thing that matches are coordinates of the station. So I'm planning to do comparisons based on coordinates, unless there is another way, right now I cannot see it. This would also apply to measurement sync, because I would have to find appropriate station in ODH based on Eurac station data.

@rcavaliere Any ideas?

Piiit commented 2 years ago

@SaimonasFOS I will in the meantime check how you could get some station IDs. I would just need some information...

Could you please show me the call or Java code you use to retrieve data for stations? Do you mean the writer API? Or do you want to use the ODH mobility API directly for that?

rcavaliere commented 2 years ago

@Piiit also here we should make some analysis before. Can we get an export of all stations made available by EURAC and then match them with the one we already have from the Province of BZ? I hoped that the through the station names we could be able to do the matching. It will be difficult to make the matching if we don't have common keys, I fear that we have to consider this a separate dataset with different stations... coordinates as key is in my opinion not the right way to go

Piiit commented 2 years ago

@SaimonasFOS Could you please provide such a list of stations from EURAC?

Piiit commented 2 years ago

First analysis done: I wanted to know if stations are the same inside climatologies and climate_daily and metadata. The result is the following:

We have 343 "climatologies" stations
We have 358 "metadata" stations...

Stations in climatologies, but not inside climate_daily
- Seiser_Alm_Zallinger: Not found
- St_Walburg_Zoggler_Stausee: Not found

Stations in metadata, but not inside climatologies
- Obergurgl: Not found
- SWISS_Buffalora: Not found
- SWISS_Scuol: Not found
- SWISS_Sterzing: Not found
- St_Maria: Not found
- ZAMG_BRENNER: Not found
- ZAMG_BRUNNENKOGEL: Not found
- ZAMG_GALTUER: Not found
- ZAMG_GERLOS_DURLASSBODEN: Not found
- ZAMG_ISCHGL_IDALPE: Not found
- ZAMG_NAUDERS: Not found
- ZAMG_OBERGURGL: Not found
- ZAMG_PITZTALER_GLETSCHER: Not found
- ZAMG_SILLIAN: Not found
- ZAMG_STEINACH_AM_BRENNER: Not found
Not found = 15...

I used this call https://edp-portal.eurac.edu/envdb/climatologies?select=station to get all stations inside climatologies, and then https://edp-portal.eurac.edu/envdb/climate_daily?station=eq.{station}&limit=1 for each {station} to see if I can find a corresponding record inside climate_daily. In addition I check also metadata stations: https://edp-portal.eurac.edu/envdb/metadata?select=name

Piiit commented 2 years ago

The whole list of stations inside climatologies is this:

Ala: Found
Ala_Ronchi: Found
Aldeno: Found
Allitz_Strimmhof: Found
Altrei: Found
Antholz_Obertal: Found
Arco: Found
Arzkersee: Found
Auer: Found
Ausserrojen: Found
Bezzecca_Spessa: Found
Bieno: Found
Borgo_Valsugana: Found
Bozen: Found
Branzoll: Found
Brenner: Found
Brennerbad: Found
Brentonico: Found
Brentonico_Diga_Stua: Found
Bresimo: Found
Brixen: Found
Brixen_Vahrn: Found
Bruneck: Found
Buffalora: Found
Campestrin: Found
Campill: Found
Campitello: Found
Campodenno: Found
Canal_San_Bovo: Found
Canazei: Found
Canazei_Coi_de_Paussa: Found
Caoria: Found
Capriana: Found
Careser_Diga: Found
Careser_alla_Baia: Found
Castelfondo: Found
Castello_Tesino_Le_Parti: Found
Cavalese: Found
Cembra: Found
Centa_San_Nicolo: Found
Cermis: Found
Cima_Cavaion: Found
Cima_Paganella: Found
Cima_Presena: Found
Cima_Rosetta: Found
Cimego: Found
Cles: Found
Clozner_Loch: Found
Cogolo_Pont: Found
Corvara_im_Gadertal: Found
Costabrunella: Found
Dannelspitz: Found
Daone_Malga_Bissina: Found
Daone_Malga_Boazzo: Found
Daone_Ponte_Morandin: Found
Daone_Pracul: Found
Dare: Found
Denno: Found
Deutschnofen: Found
Dos_Del_Sabion_Monte: Found
Dresdner_Hütte: Found
Dro_Marocche: Found
Eisack_Sterzing: Found
Elferspitze: Found
Etsch_Sigmundskron (M): Found
Eyrs_Laas: Found
Flitz-Villnöss: Found
Folgaria: Found
Fondo: Found
Fontanazzo_Di_Mazzin: Found
Forte_Buso: Found
Forte_D_Ampola: Found
Ghiacciaio_Del_Careser: Found
Ghiacciaio_Presena: Found
Ghiacciaio_Presena_(Passo_Paradiso): Found
Ghiacciaio_di_Fradusta: Found
Giustino: Found
Giustino_Dos_Del_Sabion: Found
Grasstein: Found
Graun-Kurtatsch: Found
Grawand: Found
Grigno: Found
Grigno_Barricata: Found
Grumes: Found
Grünboden: Found
Grünsee: Found
HISTALP_Galtür: Found
HISTALP_Innsbruck_Flughafen: Found
HISTALP_Innsbruck_Universität: Found
HISTALP_Landeck: Found
HISTALP_Mayrhofen: Found
HISTALP_Obergurgl_Vent: Found
HISTALP_Patscherkofel: Found
HISTALP_St_Jakob_im_Def: Found
Hintermartell: Found
Hochebenkofel: Found
Innerratschings: Found
Jaufenkamm: Found
Jenesien: Found
Jenesien_auto: Found
Karerpass: Found
Kollmann-Barbian: Found
La_Rocca: Found
Ladurns: Found
Lago_Delle_Piazze: Found
Lago_Di_Calaita: Found
Lago_Di_Cavedine: Found
Laimburg: Found
Lases: Found
Latzfons: Found
Lavarone: Found
Lavis: Found
Lengspitze: Found
Levico: Found
Lisignago: Found
Lodrone: Found
Lüsen: Found
Madritsch: Found
Male: Found
Male_Bivacco_Marinelli: Found
Malga_Mare: Found
Marienberg: Found
Marmolada_Pian_Dei_Fiacconi: Found
Marmolada_Sas_Del_Mul: Found
Matsch: Found
Mazzin: Found
Melag: Found
Meran_Gratsch: Found
Merbalm: Found
Mezzana: Found
Mezzano: Found
Mezzolombardo: Found
Moena: Found
Molveno: Found
Montagne_Larzana: Found
Monte_Bondone: Found
Monte_Groste: Found
Monte_Ruioch: Found
Mori_Loppio: Found
Mühlen: Found
Mühlwald: Found
Naturns: Found
Nauders: Found
Nembia: Found
Obereggen_Absam: Found
Obermais: Found
Obernberg_am_Brenner: Found
Oberplanitzing_Kaltern: Found
Obertilliach: Found
Paganella_Dosso_Larici: Found
Paganella_Malga_Terlago: Found
Paneveggio_Bellamonte: Found
Paneveggio_campo_neve: Found
Passo_Brocon: Found
Passo_Campo_Carlo_Magno: Found
Passo_Cereda: Found
Passo_Costalunga: Found
Passo_Manghen: Found
Passo_Mendola: Found
Passo_Pian_Delle_Fugazze: Found
Passo_Rolle: Found
Passo_Sommo: Found
Passo_Tonale: Found
Passo_Valles: Found
Pawigl: Found
Peio: Found
Peio_Crozzi_Taviela: Found
Pens: Found
Pergine_Valsugana: Found
Pfelders: Found
Pfinnalm: Found
Pflersch: Found
Pfunders: Found
Pian_Fedaia: Found
Pian_Palu_Diga: Found
Pian_Palu_Malga_Giumella: Found
Piazze_Di_Pine: Found
Pieve_Di_Bono: Found
Pieve_Tesino_Malga_Sorgazza: Found
Pinzolo: Found
Pinzolo_Malga_Zeledria: Found
Pinzolo_Ponte_Plaza: Found
Piz_Piscadu: Found
Piz_la_Ila: Found
Platt: Found
Plose: Found
Povo: Found
Prad: Found
Pradalago: Found
Predazzo: Found
Prettau: Found
Prezzo: Found
Rabbi: Found
Radein: Found
Ragoli: Found
Rauhjoch: Found
Regelspitze: Found
Rein_in_Taufers: Found
Ridnaun: Found
Riffian: Found
Rittnerhorn: Found
Riva: Found
Romeno: Found
Ronchi_Valsugana: Found
Ronzo: Found
Rossbänke: Found
Rotwandwiesen: Found
Rovereto: Found
Rovereto_Malga_Zugna: Found
Rumo_Lanza: Found
SWISS_Abtei_Piz_Pisciadu: Found
SWISS_Abtei_Piz_la_Ila: Found
SWISS_Brusio: Found
SWISS_Campocologno: Found
SWISS_Cavaglia: Found
SWISS_Martina: Found
SWISS_Mustair: Found
SWISS_Naluns_Schlivera: Found
SWISS_Naluns_Schlivera_2: Found
SWISS_Obervintl: Found
SWISS_Ofenpass_Murtarol: Found
SWISS_Ofenpass_Piz_Dora: Found
SWISS_Poschiavo_Robbia: Found
SWISS_Punt_la_Drossa: Found
SWISS_Samnaun_Ravaischer_Salaas: Found
SWISS_Sta_Maria_Val_Mustair: Found
SWISS_Sulden_Madritsch: Found
SWISS_Susch: Found
SWISS_Timmelsalm: Found
SWISS_Vinadi_Alpetta: Found
SWISS_Vinadi_Piz_Alpetta: Found
SWISS_Zernez: Found
SWISS_Zernez_Pulschezza: Found
SWISS_Zernez_Sarsura_Pitschen: Found
Salurn: Found
San_Lorenzo_In_Banale: Found
San_Lorenzo_In_Banale_Pergoletti: Found
San_Martino_Di_Castrozza: Found
San_Michele_Adige: Found
San_Silvestro: Found
Sant_Antonio_Di_Mavignola: Found
Sant_Orsola_Terme: Found
Santa_Giustina: Found
Santa_Massenza: Found
Sarca_di_Val_Genova_al_Ghiacciaio_del_Mandrone: Found
Sarnthein: Found
Schenna: Found
Schlanders: Found
Schlinig: Found
Schöneben: Found
Schöntaufspitze: Found
Scuol: Found
Segonzano_Gresta: Found
Segonzano_Scancio: Found
Seiser_Alm_Zallinger: Not found
Sexten: Found
Signalgipfel_Wilder_Freiger: Found
Sillian: Found
Somrabbi: Found
Spormaggiore: Found
St_Jakob_in_Pfitsch: Found
St_Kassian: Found
St_Leonhard_in_Passeier: Found
St_Magdalena_in_Gsies: Found
St_Martin_in_Passeier: Found
St_Martin_in_Thurn: Found
St_Peter_Villnöss-Bahnhof: Found
St_Ulrich: Found
St_Valentin_auf_der_Haide: Found
St_Veit_in_Prags: Found
St_Vigil_in_Enneberg: Found
St_Walburg_Zoggler_Stausee: Not found
Stausee_Neves: Found
Stausee_Olang: Found
Stausee_St_Pankraz: Found
Stausee_Zufritt: Found
Steinach_am_Brenner: Found
Steinhaus: Found
Stenico: Found
Stern_im_Gadertal: Found
Sternigo: Found
Sterzing: Found
Sterzing_Flughafen: Found
Stilfserjoch: Found
Stilfserjoch_Messfeld: Found
Storo: Found
Stramentizzo: Found
Stutzenalm: Found
Sulden: Found
Taufers: Found
Telve: Found
Telve_Pontarso: Found
Tenna: Found
Tenno: Found
Terenten: Found
Terragnolo: Found
Tesero_Pala_De_Santa: Found
Teufelsegg: Found
Tione: Found
Toblach: Found
Tonadico: Found
Tonadico_Castelpietra: Found
Torbole_(Belvedere): Found
Traminalm: Found
Tremalzo: Found
Trento_Aeroporto: Found
Trento_Laste: Found
Trento_Liceo: Found
Trento_Roncafort: Found
Tres: Found
Unterfennberg: Found
Val_Cadino: Found
Val_D_Ambiez: Found
Val_Di_Genova_Enel: Found
Val_Genova_Malga_Caret: Found
Val_Noana: Found
Val_Sella: Found
Val_di_Breguzzo: Found
Valda: Found
Vallarsa: Found
Vallarsa_Diga_Di_Speccheri: Found
Vallarsa_Malga_Boffetal: Found
Vals: Found
Vermiglio_Capanna_Presena: Found
Vermiglio_Masi_di_Palu: Found
Vernagt: Found
Vernagt_Finail: Found
Vetriolo: Found
Vigo_Di_Fassa: Found
Vigolo_Vattaro: Found
Villa_Rendena_Rifugio_Gork: Found
Villa_Rendena_frana: Found
Vorderkaser: Found
Völs_am_Schlern: Found
Weissbrunn: Found
Weissee: Found
Welsberg: Found
Welschnofen: Found
Wolkenstein: Found
Zambana: Found
Zaufenkofel: Found
Ziano_Di_Fiemme: Found
Zuclo_Malga_Casinot: Found
SaimonasFOS commented 2 years ago

@SaimonasFOS I will in the meantime check how you could get some station IDs. I would just need some information...

Could you please show me the call or Java code you use to retrieve data for stations? Do you mean the writer API? Or do you want to use the ODH mobility API directly for that?

@Piiit For now I used this API call to see existing stations in ODH: https://mobility.api.opendatahub.testingmachine.eu/v2/flat,node/MeteoStation?limit=-1

I see that there is a possibility to retrieve stations with Java code (with fetchStations method in OdhClient) and from there you can get station ID. However, I do not have any stations other that Eurac ones in my local database. An example of station IDs in production database would be nice.

Piiit commented 2 years ago

@SaimonasFOS

On production these are some station ids: https://mobility.api.opendatahub.com/v2/flat,node/MeteoStation?select=scode,sname

Look at the scode field

ID columns inside the DB are not meant to be openly available, are just internal primary keys.