openownership / openownership.org-wagtail

Open Ownership Wagtail site.
Other
1 stars 1 forks source link

Update Notion logic/filtering options for the Open Ownership Map #396

Closed StephenAbbott closed 10 months ago

StephenAbbott commented 11 months ago

As of August 2023, the Open Ownership Map (OO Map) is focused on communicating which countries have committed to a central beneficial ownership register or a public register alongside details about whether those countries have gone on to actually implement said central or public registers.

When you land on the OO Map, you see a colour-coded view of all countries showing whether they have made commitments to have a central and/or a public register. Once a user clicks on the Implementation of BOT box below the OO Map, the view then changes to showing whether countries have implemented central and/or public registers:

image

The focus of the Open Ownership/Hactar tech sprint taking place in September 2023 is to move away from this central/public binary but to still use data from our integrated Notion databases to categorise countries on the OO Map.

The future categories we would like to move to are:

Our initial thoughts about how to use Notion fields to categorise all countries are below:

Countries should only ever appear in one category (or in no category at all if they do not fulfil any of the requirements set out above).

Underneath the OO Map, we plan to remove the Commitment to BOT and Implementation of BOT boxes but would like to retain the ability to count the number of countries in each of the three categories - Planned / Implementing / Live register.

We would like to display the titles of these categories below the OO Map with a count next to each category title setting out the number of countries which currently belong in that category.

Clicking on a category name should filter the OO Map to just show countries in that category but when the OO Map page first loads, it should show colour code the categories so that all countries which are in either one of the Planned / Implementing / Live register categories are marked as such.

Once this Notion work is completed, we'd like to request work to 'Update design for the Open Ownership Map' (see https://github.com/openownership/openownership.org-wagtail/issues/397) and also to 'Update download country data functionality for OO Map and country pages' (see https://github.com/openownership/openownership.org-wagtail/issues/399).

philgyford commented 11 months ago

@StephenAbbott I've only had a brief look at the code that gets the Notion data into the website, but I'm not 100% clear which of these is true of the changes you describe:

  1. There will be new data in Notion at your end, which will need to be fetched into the website, in order to display the new categories.
  2. The data in Notion at your end remains the same, but how we use it on the website will be different. i.e. the new categories are different ways of interpreting the existing Notion data.
StephenAbbott commented 11 months ago

@philgyford It should be option 2. I think everything is already there in the Notion data but we just want to interpret it into different categories

philgyford commented 11 months ago

@StephenAbbott Excellent, thanks! That wasn't what I understood at first, but after reading your description above that seemed like it might be the case, which makes things easier!

philgyford commented 11 months ago

@StephenAbbott Do you have any thoughts on what the initial state of the map should be, once we remove the Commitment/Implementation boxes? The current map's initial state is as if you'd just pressed the "Commitment to BOT" box.

I think the options are to default to one of the three new categories being selected, or else none of them, which would leave all the countries pale blue with no shading.

StephenAbbott commented 11 months ago

@philgyford If countries can only be in one of the three categories or blank, then it would be good if design allows for the initial state of map to colour each country in line with its category.

Then users could click the category names below the map to highlight just countries in that particular category

philgyford commented 11 months ago

@StephenAbbott Oh, the other option of course is that all three are selected!

philgyford commented 11 months ago

@StephenAbbott Sorry, missed your comment. Yes, so initially all categories are selected.

Then clicking a category will disable the other two and leave only that one category selected.

StephenAbbott commented 11 months ago

Yup exactly

philgyford commented 11 months ago

I've made a first pass at this on the 396-map-filtering map-countries-regions branch. I've done no HTML/CSS for the page itself, aside from the gaudy temporary map colours:

Screenshot 2023-09-07 at 16 53 04

Clicking the three category "buttons" switches each colour on (and the others off).

I think I've got the logic for assigning a country to a category correct but we'll need to check I've got it right.

StephenAbbott commented 11 months ago

@philgyford Flagging that we are shortly planning to make some changes to the internal databases/trackers which Notion pulls information from for the website.

There's a chance that this will affect some of the fields being used here and so we should set aside some testing after those changes are made.

I will liaise with my colleagues on this and keep you posted by sharing additional info ASAP.

StephenAbbott commented 10 months ago

Signed off ✅