wordToReport = geoData.features
.map(d => {
if ( d.properties.description == null ) {
return []
} else {
return d.properties.description.toLowerCase().replace(/[^a-z0-9 ]/gi, ' ').split(' ')
}
})
.map((d, i) => d.map(w => {
const withSynonyms = Object.keys(synonyms);
return ({index: i, word: withSynonyms.includes(w) ? synonyms[w] : w});
})
)
.flat()
.filter(d => !ignoredWords.includes(d.word) && isNaN(d.word));