openownership / openownership.org-wagtail

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

Fix French Guiana issue on Open Ownership Map #251

Open StephenAbbott opened 1 year ago

StephenAbbott commented 1 year ago

Have realised on the Open Ownership map that French Guiana (just above Brazil in Latin America) is labelled as France. My knowledge of this is sketchy but it seems that it is an overseas territory of France rather than a full country?

image

In terms of fixing it so that it is labelled French Guiana, how do we do that? Would I create a new French Guiana entry in the Country tracker database, use the GF ISO2 code and then we update the country mapping?

drcongo commented 1 year ago

This one is baffling so far. There's 2 data sets that go toward generating the map...

  1. The geojson that describes the polygons of the map - this holds two entries marked as "France", actual France and something in New Caledonia.
  2. mapData - this one is generated by us from data in Notion and contains entries like this...
    {
        "name": "France",
        "iso2": "FR",
        "url": "/en/map/country/france/",
        "lat": "48.86666",
        "lon": "2.333333",
        "oo_support": "No engagement",
        "committed_central": true,
        "committed_public": true,
        "implementation_central": true,
        "implementation_public": true
    }

and this one only contains the one France entry. I'm going to drag Heather into this one with me tomorrow.

drcongo commented 1 year ago

Actually, your suggestion...

In terms of fixing it so that it is labelled French Guiana, how do we do that? Would I create a new French Guiana entry in the Country tracker database, use the GF ISO2 code and then we update the country mapping?

...might work. Maybe I'm heading down the wrong path trying to find an erroneous France.

amybalmforth commented 1 year ago

Hi @StephenAbbott, I’ve been looking into this issue so just wanted to update you on where we are. It looks like French Guiana is getting labelled as France, because the geoJSON library we are using to map the geography of the countries, has mapped it to appear as part of France. You would eventually need to create a new country entry for French Guiana, but this wouldn’t solve the issue, as we don’t currently have a way to represent this location geographically on the map. I’ve tried searching for geoJSON we could use for this location but it’s proving tricky so far. It seems that this territory is usually considered as part of France and Europe.

StephenAbbott commented 1 year ago

Thanks for checking into this issue, @amybalmforth. We'll leave for now as we are planning on doing some work on the Open Ownership Map soon and could bear this in mind then in case we can find an alternative solution

amybalmforth commented 1 year ago

OK great - thanks for letting me know!

philgyford commented 11 months ago

I've just re-jigged the map so it now uses TopoJSON but the ultimate source of the data is still the Natural Earth site.

There's also now a script that processes the downloaded and simplified map to create the even smaller version we use for the map on the site (and fixes one issue with a few missing ISO2 codes, including France's, for some reason).

This does mean there is a place where custom tweaking of the map data could happen. I'm not saying it's a good idea – every customisation makes the whole process more complicated, but for if I/we come back to this in future, we would:

  1. Remove the [[-163, 585, 586]] arc from France's polygons
  2. Create a new country in the data like:
    {
      "arcs": [[-163, 585, 586]],
      "type": "Polygon",
      "properties": { "ISO_A2": "GF", "NAME": "French Guiana" }
    },

That successfully draws the country on the map, without France's striped shading, but doesn't give it a name, presumably because French Guiana is missing from the Notion-derived data.