GIScience / ohsome-now-stats-frontend

This is the frontend application for the ohsomeNow stats.
https://stats.now.ohsome.org/
GNU General Public License v3.0
5 stars 3 forks source link

Adjust interval limiter to look for anything smaller 1 Day instead of only for 1 Hour #91

Closed ElJocho closed 9 months ago

ElJocho commented 9 months ago

Currently people can adjust the url manually to still query durations > 1 year with sub daily interval if they use anything other than PT1H, this can lead to a crashing webpage

rtroilo commented 9 months ago

I would suggest, not to hard code certain duration/period combination but just to calculate the number of intervals based on those two parameters and if this exceeds a certain reasonably limit (lets say 2000) than just return an error message describing the problem.

With that you can have a day duration with minutely period (1440 intervals) just fine. Just an suggestion.

ElJocho commented 9 months ago

I adjusted the client here: dd3e725 to a max interval bin size of 10.000 -> this easily fits all time; daily interval (total bins: ~5397), a day ; minutely interval (total bins: 1440) and a year; hourly interval (total bins: ~8760).