merge = (dataCleaned, geojson) => {
const features = geojson.features
features.forEach(feature => {
const match = dataCleaned.find(d => d.county === feature.properties.NAMELABEL)
feature.properties = {
...feature.properties,
...match,
}
})
return {
type: geojson.type,
crs: geojson.crs,
features: features.sort((a,b) => b.properties.count - a.properties.count),
}
}