erictapen / mapping-migration

How European States Decide on Asylum
https://uclab.fh-potsdam.de/mapping/asylum/
2 stars 0 forks source link

Implement animation #36

Closed herbertblb closed 2 years ago

herbertblb commented 2 years ago

make sketches for ways to animate the footprints and include missing migrants

herbertblb commented 2 years ago

see also #7

herbertblb commented 2 years ago

see our drafts on Miro

erictapen commented 2 years ago

We want to separate relative data and absolute data/missing migrants by using an animation that adds the latter to the graphic after some time.

Before the animation:

Country title, bar chart, categories are visible. After a short amount of time (~3s) and if there are no open tooltips, the animation starts.

At the start of the animation

The categories might blend out, to not overload the situation. To be decided.

During the animation

The footprints wander in from the right side. How exactly the footprints are animated is not clear yet, but we want them to

One special pair of footprints attracts attention by e.g. moving different than the others. The special pair is replaced by an infobox about missing migrants (see #7). The infobox appears in the blank space between the graphics during the movement of the others. Maybe it can then be closed by hand?

The persons/500k sentence blends in. If the categories were blended out, they blend back in.

erictapen commented 2 years ago

We want to play the animation (after the waiting time) on any change of input, which means COO, COA1/2 and year.

herbertblb commented 2 years ago

Ist noch weitere Arbeit an der animation der Fußstapfen geplant? Auf KAthi und Séra wirkt es wie große Vogelschwärme, die reinfliegen, ein Eindruck, den wir ja nicht unbedingt erwecken wollen

herbertblb commented 2 years ago

und wie sieht es aus mit den Missing migrants? müssen wir darauf verzichten aus Zeitgründen?

erictapen commented 2 years ago

Ne, weder noch. Der aktuelle Stand ist nach wie vor work in progress. Ich versuche morgen vormittag das so umzusetzen wie in https://github.com/erictapen/mapping-migration/issues/36#issuecomment-1027029452 beschrieben.

erictapen commented 2 years ago

I finally got to implement the animation as described in https://github.com/erictapen/mapping-migration/issues/36#issuecomment-1027029452.

It took a lot of glue code to achieve this and I'm still not really satisfied with the implementation. It has quite a few shortcomings:

Still there are some knobs to turn: For every movement of a footstep it carries a state of (direction, length, dt), where

These three variables have a fixed starting value and are adapted during each step by adding a random number. By adapting the starting value and the characteristics of the random numbers it's possible to easily adapt the animation.

erictapen commented 2 years ago

Snaaap, completely forgot about missing migrants! Will implement that first thing tomorrow today!

erictapen commented 2 years ago

Implemented the missing migrants footprint in de3e84f98ad16902921807c588e64a5a5194b804.

It got even more of a hack than the animation logic.

Currently the behaviour is like this: The MM animation is shown at the very first display of animation, not after that. The footprint wanders to a predefined position with a predefined movement. If the user clicks on the info button, it opens the box. If the user clicks on the button again, the box vanishes irrevocably.

Edit: For the colors I oriented myself on their site. I think the color is important for visual distingtion, maybe we should even color the "i" icon? The color gradient is defined here: https://github.com/erictapen/mapping-migration/blob/55de79dadf1d54795a6096c6643828dfea332c11/src/Main.elm#L1382