deckgl = {
baseMap.innerHTML = '';
const stateLayer = new deck.GeoJsonLayer({
data: all_states_no_gc,
getFillColor: [255,0,0,120],
onClick: function(stuff){
const feature = stuff.object
mutable stateName = feature.properties.State
},
pickable: true
})
const mapLayer = new deck.GeoJsonLayer({
data:filteredCounties,
getFillColor: function(dataRow) {
return [0, 255*(dataRow.properties.UnEmplyPrc/10),0, 200]
}
})
return new deck.DeckGL({
container: baseMap,
map: mapboxgl,
mapboxApiAccessToken: 'pk.eyJ1IjoidWJlcmRhdGEiLCJhIjoiY2pudzRtaWloMDAzcTN2bzN1aXdxZHB5bSJ9.2bkj3IiRC8wj3jLThvDGdA',
mapStyle: 'mapbox://styles/mapbox/dark-v9',
longitude: -90.9712,
latitude: 40.7831,
zoom: 2,
pitch: 0,
bearing: -0,
layers: [
mapLayer,
stateLayer
]
});
}