RobJN / regional-fes

Other
0 stars 3 forks source link

Explore the ability to do comparisons #29

Open jrgwhiteford opened 2 years ago

jrgwhiteford commented 2 years ago

ability to do side-by-side comparisons has been discussed - this could be scenarios / parameters / region v region / region v GB wide

slowe commented 2 years ago

@jrgwhiteford Is there a primary priority for the visualisation e.g. a comparison between geographies, time, scenarios, or parameters? Are you imagining two drop down boxes that let a user compare, say, "London" with "Leading The Way"? Wouldn't it need further specification for both options? How do you imagine the comparison being shown?

jrgwhiteford commented 2 years ago

The priority would be scenarios i think. having a side by side map view to visualise the comparison. does that make sense?

slowe commented 2 years ago

I'm imagining some kind of side-by-side selectors like this: Screenshot 2022-05-11 at 18-52-16 FES 2021 Compare With the comparisons below.

jrgwhiteford commented 2 years ago

so would this open up two instances of the map? I like the idea!

slowe commented 2 years ago

@jrgwhiteford Yes. It would be on a separate visualisation page. The two selections (each consisting of scenario+parameter+area) would be in side-by-side columns. Is requiring scenario+parameter+area OK?

Below the dropdown boxes, in each column, would be the maps. I think the maps will help people know where a region is but will probably be of limited use to understand the data because, if the user selects "East of England", they'd just get the East of England polygon coloured in (using the colour scale for that scenario+parameter across the full year range?). Given that a heat map can only show one year at a time, we would probably then want year sliders for each map so that specific years could be chosen. As in my example dropdowns above, we could let the area selector include multiple regions e.g. "GB (regions)" which would then show the polygons for each of the GB regions for the chosen year (also with a colour scale set to the full year range).

Below the maps could be line charts with time along the x-axis. We could potentially highlight the year that is selected in the year sliders (above). If that column includes multiple regions (e.g. "GB (regions)") we could plot multiple series on the graph.

To make it easier to compare when things happen in the data, we could potentially also have a column-spanning line chart with both selections plotted together.

I think this lets a user:

Does this give the flexibility that you want in comparing things?

slowe commented 2 years ago

This is where I've got to with the comparison tool. There are maps and charts (individual and a combined one). I've given an example where the selected area is actually multiple areas so there are multiple data series on the charts. Screenshot 2022-05-18 at 14-02-49 FES 2021 Compare

jrgwhiteford commented 2 years ago

This looks great thanks Stuart - is there a chance to host this through your github so i can play with the feature?

slowe commented 2 years ago

@jrgwhiteford At the moment I have an open pull request about style changes and a download button for the main visualisation see #36. Our Github pages branch is currently showing that so that you can review it before accepting that pull request. Once you've had chance to look at that I can switch over the Github pages to show the branch I'm working on for this issue.

jrgwhiteford commented 2 years ago

Hi Stuart i have merged the most recent changes

slowe commented 2 years ago

@jrgwhiteford Thanks. I've switched the Open Innovations GitHub pages branch so you can play with the comparison tool as it is now.

slowe commented 2 years ago

@jrgwhiteford There's a question around colour choices for the charts. At the moment I've set colours by region (e.g. Yorkshire and the Humber is yellow) because that makes it easier to tell them apart if you select multiple regions. However the colours could be set to match the chosen scenario. Either way, there may be colour clashes given so many different things can be plotted.

Charts A & B both highlight the selected years and clicking on a point in those charts will set the year to that year for the map too.

I implemented the mapping myself (rather than using Leaflet, as we do for the main visualisation) so that I could render the maps entirely as SVG. That gives us more control over the colours/style for the map and means that downloading the maps as vector images is very easy.

jrgwhiteford commented 2 years ago

Thanks @slowe I think having the colours matching the different regions makes sense. I like the ability to download as SVG. Is this feature possible on the main visualisation? is there an option on the main visualisation to remove place names (as a layer?)

slowe commented 2 years ago

The maps on the main vis have pixel-based map tile backgrounds which don't lend themselves to SVG. The polygons would be doable. Would it be confusing for people to only get part of the view?

Yes, we could make the label layer togglable.

jrgwhiteford commented 2 years ago

Yes i think you are right that this would be confusing for people