-
Notifications
You must be signed in to change notification settings - Fork 0
Weather Data
Sebastian OIafsson edited this page May 11, 2018
·
4 revisions
Weather is now entered through the Weather endpoint in the API /api/weather/. The user or administrator have to enter weather with the necessary parameters. Must be a list containing one or more weather elements.
Weather is mapped to the corresponding road segments by municipality ID. There are several reasons for this:
- It was the fastest mapping available and suitable at the moment.
- MET only supports a few weather stations for measuring precipitation. In Trondheim there is only two available so the accuracy would still be a problem.
- We were not sure the FROST API would contain historical precipitation data for all municipalities in Norway.
Possible improvements:
- Instead of municipality mapping, we could use a linestring to determine a geographical area were all data points inside are mapped to. This would enable the weather provider to specify the mapping area.
- Optimalization. Speed etc
We did not go for the solution below. May be used for inspiration at a later date.
Weather data is collected from Frost, an API made my the The Norwegian Meteorological Institute. This allows us to collect weather data from weather stations around Norway and match them to our road segments. The process is as follows:
- Have a database of road segments
- Have a database of weather data
- Search Frost API, with parameters selecting data from the past day, with the municipality ID from the road segment, and "met.no" as weather station provider
- Go through the weather stations, calculating the differences between the segment and the station
- Save the result from the closest weather station to the "weather data" table with a reference to the road segment
- Repeat steps 3 - 5 over a specified time interval
-
Product related
-
Development process and guidelines
-
Sprints
-
Testing
-
-
Old notes