pelias / wof

WhosOnFirst tools
3 stars 2 forks source link

Placetype local using English fallback and non-latin (latin) names #48

Closed nvkelso closed 1 year ago

nvkelso commented 1 year ago

:wave: I did some awesome work for the Pelias project and would love for everyone to have a look at it and provide feedback.

Here's the reason for this change :rocket:

Connected to WOF issue https://github.com/whosonfirst-data/whosonfirst-data/issues/2154, I'm fleshing out some more edge cases, namely 2 cases:

  1. Sometimes the official language for a place is not in a latin character set, but WOF has (yet another) property that we can use to add a parenthetical so locales and non-locals can still read the value.
  2. Sometimes there is no official language placetype translation, but there is an English preferred placetype. When that's available then backfill the exported property with the English value.
    • NOTE: For the ~50k coarse admin places (country, dependency, macroregion, region, macrocounty, county) there is nearly 100% fill rate for label:eng_x_preferred_placetype because of recent WOF data work.

Here's what actually got changed :clap:

The code to calculate getPlacetypeLocal Shapefile property is extended with several new cases.

Here's how others can test the changes :eyes:

Example features:

missinglink commented 1 year ago

The test suite is failing, looks like a typo and an easy fix. You can run the tests locally using the command npm test.

nvkelso commented 1 year ago

All tests (including new tests) pass. Ready for final review and merge :)