Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider pros/cons of moving the Open Ownership map to higher resolution map images to make smaller islands visible #143

Closed
StephenAbbott opened this issue Mar 24, 2022 · 7 comments
Assignees
Labels
Investigate Sometimes we need to spend time on something even to estimate how long it will take. Status: Needs Defining Type: Change Request

Comments

@StephenAbbott
Copy link
Member

Smaller islands like Mauritius and other locations that Open Ownership works with are not visible on the Open Ownership Map as we are using a lower resolution GeoJSON file.

Need to consider the right balance here to see if it is more important to consider page speed or for users to be able to zoom in and click on these small islands.

@StephenAbbott StephenAbbott changed the title Consider pros/cons of moving the Open Ownership map to higher resolution map images to Consider pros/cons of moving the Open Ownership map to higher resolution map images to make smaller islands visible Mar 24, 2022
@philgyford
Copy link
Collaborator

Using the current source of data, our current map data file is 577KB, the next one up is 3.9MB. There are some things we could do to reduce that:

  • Remove fields from the data that we don't use
  • Reduce the resolution a bit so it's better than what we have now but only as high as necessary
  • Convert to TopoJSON from GeoJSON, which is a smaller format, which would also require a bit of a code change to handle it.

I say all this being far from an expert on this stuff, but have read things like https://blog.mastermaps.com/2012/11/how-to-minify-geojson-files.html (which I've just realised is 10 years old, so there may be newer better ideas around)

@StephenAbbott
Copy link
Member Author

Thanks @philgyford. Am going to leave this issue here to come back to after launch. Will be good to do more investigation

@drcongo drcongo added the Investigate Sometimes we need to spend time on something even to estimate how long it will take. label Oct 4, 2022
@philgyford
Copy link
Collaborator

@StephenAbbott I can look into this again – just checking whether you've had any further thoughts on this since, or if there are any newer requirements I should bear in mind?

@StephenAbbott
Copy link
Member Author

@philgyford There is a newer issue - #232 - which came up in reference to the current resolution of the map as there is interesting activity happening in jurisdictions which are not countries. But I fear our team doesn't have the resources to track all these jurisdictions as well as national level changes. I'm discussing this at present with my team but the issue is still closed for now.

There is also still currently the same issue as before where small island countries like Mauritius or Barbados are doing interesting work relating to beneficial ownership reforms but cannot be found/clicked through to from the map.

@philgyford philgyford self-assigned this Aug 15, 2023
philgyford added a commit that referenced this issue Aug 16, 2023
- Add management command for converting a downloaded topoJSON world map
  into a smaller version that we can use. With instructions for how to
  download and convert the input file.
- Update the map to use d3.js v5 and topoJSON

This means we can use a more detailed map (e.g. Mauritius is now visible)
but the map file is much smaller (115KB vs 577KB).

For #143
@philgyford
Copy link
Collaborator

I've done some work on the map now which means the smaller islands show up and the map file is much smaller.

So you can now zoom in click on Mauritius and Barbados (we could allow zooming in further if that helps?) and the size of the map file has been reduced from 577KB to 115KB.

@StephenAbbott
Copy link
Member Author

Fantastic work, @philgyford! Changes sound great all round. I'll get this a test on staging 👏 👏 👏

@StephenAbbott
Copy link
Member Author

Signed off ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Investigate Sometimes we need to spend time on something even to estimate how long it will take. Status: Needs Defining Type: Change Request
Projects
Archived in project
Development

No branches or pull requests

3 participants