[ ] Use titlecase library for de-Capitalising names. Inspect output and customise to include any missed "small_words" (example below)
[ ] Parse places.csv into FeatureCollection object
geometry
descriptions
names
citations
types
properties.title
[ ] Augment features by parsing place_links.csv
links
[ ] Augment features by parsing place_names.csv
citations
[ ] Augment features by parsing place_travellers.csv
citations
[ ] Aggregate whens ?
[ ] Save as .lpf.json.
Customise titlecase
from titlecase import titlecase
def custom_titlecase(word, **kwargs):
small_words = "a an and as at but by for if in nor of on or so the to up yet".split()
return titlecase(word, callback=lambda w, **_: w.lower() if w.lower() in small_words else w.title())
converted_place_names = [custom_titlecase(name) for name in place_names]
whgdata
repo; talk to @kgeographer first; cc any comms with HumphreyAlternative Strategy
Write Python script:
titlecase
library for de-Capitalising names. Inspect output and customise to include any missed "small_words" (example below)places.csv
into FeatureCollection objectplace_links.csv
place_names.csv
place_travellers.csv
when
s ?.lpf.json
.Customise
titlecase