Skip to content

TUI per controllare lo stato del livello idrometrico dei fiumi in emilia romagna

License

Notifications You must be signed in to change notification settings

FrancescoLuzzi/fiumi_emilia_romagna

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Allerta Meteo

API calls

Get all stations and levels:

https://allertameteo.regione.emilia-romagna.it/o/api/allerta/get-sensor-values?variabile=254,0,0/1,-,-,-/B13215&time=1719649800000

...
{
    "idstazione": "-/987258,4485120/simnpr",
    "ordinamento": 9999,
    "nomestaz": "Castell'Arquato Canale",
    "lon": "987258",
    "soglia1": 0,
    "value": 0.06,
    "soglia2": 0,
    "lat": "4485120",
    "soglia3": 0
},
...

for the DB we could drop value and ordinamento

Get station time series:

https://allertameteo.regione.emilia-romagna.it/o/api/allerta/get-time-series/?stazione=-/1129579,4472121/simnbo&variabile=254,0,0/1,-,-,-/B13215

[{"t":1719439200000,"v":3.58},...]

timestamps are unix timestamp in milliseconds, by dropping the last 3 digits we can read it as an u32 value is a f32

~27.5GB of data per year (he thick)

TODO

Use QuestDB timeseries DB with a background worker that every 60 minutes scraps all the stations for their infos Then the TUI can have a 2 mode logic:

  • load data from the internet in real time
  • load data from stored data in DB

About

TUI per controllare lo stato del livello idrometrico dei fiumi in emilia romagna

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages