elixir-europe-training / Training-Metrics-Database

TMD - a database for aggregation of training metrics in ELIXIR
https://tmd.elixir-europe.org
MIT License
6 stars 1 forks source link

World map plus tweaks #23

Closed mblue9 closed 1 year ago

mblue9 commented 1 year ago

This adds a couple of things I'd been thinking about how to do before my laptop died on Friday

mihai-sysbio commented 1 year ago

Wow that's super nice @mblue9! I've self-requested a review, and took the liberty to add a few minor UI tweaks. Here's a screenshot of the end result:

image

Please feel free to further adjust as you see fit. I was hesitating about the color scale, if a single color gradient would be easier.

mihai-sysbio commented 1 year ago

Also, I believe this PR resolves #18 . Although that issue mentions "dashboard", only a map view is explicitly listed as a checkbox item.

unode commented 1 year ago

One comment about the data, and how it's summed up by country. Should the overlay be adjusted for UK to differentiate between ELIXIR-UK and EMBL-EBI?

EMBL-EBI being a "non-country" (the only of its kind?) . Call-out, inset, legend... ? Doesn't look straightforward to do.

Would it be feasible to add an option (or even make it default) to color in log scale. Current scale disproportionately highlights two countries.

mblue9 commented 1 year ago

Thanks for the comments and edits!

  1. Please feel free to further adjust as you see fit. I was hesitating about the color scale, if a single color gradient would be easier.

Yes I was also thinking of changing it to single colour instead, maybe ELIXIR orange like current TMD map?

  1. One comment about the data, and how it's summed up by country. Should the overlay be adjusted for UK to differentiate between ELIXIR-UK and EMBL-EBI?

    EMBL-EBI being a "non-country" (the only of its kind?) . Call-out, inset, legend... ? Doesn't look straightforward to do.

    Are you both thinking what I was originally thinking -that the map shows events by organiser? I copied the current TMD map which shows the country in which the event is held (location_country field) which would be UK for EMBL- EBI? (and I haven't checked but assume this means virtual events are excluded)

    I was wondering if we should -leave as is, showing location, as then it includes events outside ELIXIR countries (e.g. there are some in US) -change to mapping by organiser, which would exclude events held outside ELIXIR countries -let user choose to view by location or organiser e.g. dropdown (I think I like this one)

  2. Would it be feasible to add an option (or even make it default) to color in log scale. Current scale disproportionately highlights two countries.

Agree, I was debating whether it would be good to "normalise" by population to be fairer to small countries but logging is easier 😄

unode commented 1 year ago

:+1: for single color but would still consider the log scale (or equivalent solution) Normalise by population sounds appealing but may need upkeep in the future.

  1. leave as is, showing location, as then it includes events outside ELIXIR countries (e.g. there are some in US)
  2. change to mapping by organiser, which would exclude events held outside ELIXIR countries
  3. let user choose to view by location or organiser e.g. dropdown (I think I like this one)

Under 1., would online still show up as the location of the primary/main organizer? Curious about those US events. Are they still co-organized by a node? How/Why did they end up in TMD? (:see_no_evil: do we now also need to consider CCPA because of this?)

I see ELIXIR network mostly interested in 2. but then it's also unclear how to plot and count co-organized events.

Our intention of making Tango generalisable may benefit from 3.

Forward looking, wondering only if 3. requires additional information which may not be available. Having some server-side setting to control which variants are enabled/available could be useful then.

mihai-sysbio commented 1 year ago

The previous commits introduces a detailed contribution when hovering over a country:

image

In the case of US, it looks like ELIXIR-DE is the node_main for 6 events:

image
mihai-sysbio commented 1 year ago

Another 👍🏻 for the single color, orange could work but if it's too bright/intense perhaps an ELIXIR blue could also work, up to you @mblue9 .

For normalisation, I think arguments can be made for taking into account Node size as well (which is even more dynamic than country population). So rather than finding the best strategy it might be easier for now to apply a log as @unode suggested.

Under 1., would online still show up as the location of the primary/main organizer?

I think Online is considered as a "country" so it doesn't show up - can be verified by printing the dataframe. I guess we could clarify that online events are reported separately.

My interpretation of the role of this chart is to show how far-reaching the training events are, so I believe it's easier to merge it as is and ask for feedback after this gets deployed.

mihai-sysbio commented 1 year ago

Very good idea to merge this in, and we should remember the above points that are still unresolved:

mblue9 commented 1 year ago

I was on holiday last week so just getting back to this now, the edits look great @mihai-sysbio.

Very good idea to merge this in, and we should remember the above points that are still unresolved:

single color gradient apply log to dataframe

I've made a PR for that now here https://github.com/elixir-europe-training/ELIXIR-TrP-Training-Metrics-Database-Tango/pull/27