ituethoslab / make_a_data_object

Make a data object
GNU General Public License v3.0
2 stars 1 forks source link

Constrain z scale in some meaningful way #17

Closed xmacex closed 6 years ago

xmacex commented 6 years ago

Especially precipitation data can range quite dramatically, whereas the abstract function as it is now is something like 𝛘² with k = 3, a skewed gaussian or something. Anyway the precipitation is zero or close to zero for many days, but e.g. 2017-09-06, exactly one month before Lucy Suchman was at IT University of Copenhagen, a daily precipitation value was > 20 mm.

Precipitation history for Copenhagen on 2017-10-06

So this might happen, as seen in preview of OpenSCAD. The left one is unconstrained with the above data and an arbitrary z scaling, middle one uses a cropping function, and the one on the right uses a local z maximization (local in the space of all potential data objects) so that maximum value is brought to the available range, and then other points are scaled linearly. Maximizing z range hinders comparability across objects.

for_lucy-overflow-clip-zmax

One idea is simply to exploit smoothing to bring these sorts of values down. Here, with alpha 25 the extreme peaks are almost under control, there is still a little bit of clipping.

overflow-clip-zmax-alpha25

Here's midsummer 2015, with > 30mm daily precipitation.

I think we agreed to have 4 precipitation measurements per day, available from some data source... was it AccuWeather? That shouldn't cause issues, but there had better be a disciplined approach anyway.

xmacex commented 6 years ago

On 2018-08-28 we agreed with Baki to go for clipping.

xmacex commented 6 years ago

Commits with clipping https://github.com/xmacex/make_a_data_object/commit/2582af70744394d20cfe83ef9f6db5281db98df8 and introduction of additive surface function https://github.com/xmacex/make_a_data_object/commit/4bcde1b2c6eaa24f90f824b6a291abe1f9daf7a4 conjunctively solve this sufficiently well.