Covid-19 project to learn d3: Force update of array map when values change (observable beginner)

Hello,

I am working on this project Covid-19 in Canada / quackas / Observable for a University course, and I am having difficulty and was hoping for some guidance.

I have the boolean array map Psmap that maps true/false values to each Canadian Province and switches to true when the Province is selected in a geomap of Canada in another cell below. Unfortunately the value in the array map only switches when I rerun the cell with the array map after clicking on the province and not when I select a province.

How can I force the array map to update when a true/false value is changed?

Any direction on this would be greatly appreciated,

Figured it out, I was using two viewof instead of one. Code didnt like thatā€¦ still open to any suggestions on improving performance as my haphazard coding leaves a lot to be desired.