D3 choropleth mapping and sizes

Hi everyone
first of all, I would like to thank you for your efforts.

https://vizhub.com/Ali-Hmeedan/d21cf86f581c4906b683cdeaf5af6bbe?edit=files&file=index.html

After I forked the choropleth map tutorial I also used the circle tutorial to have a map with a view to 3 different data, the data I have should represent different dates and I should create functions change the map view by moving between these dates using the change in a slider value, but the problem now is: I couldn’t create these functions while my code is mixed

so I need to connect the change of columns names in my CSV file with the change of the slider number and I have two parts that I should change first, index.js and the second is loadAndProcessData.js (this part for circles),

whereas the colour range also I was not able to create change function based on its column names, which are :
int_2020_4
int_2020_5
int_2020_6

Welcome! Congrats for getting it to work as much as it is working already! It looks great.

Firstly I would suggest to use that colorful “P” icon, Prettier, to auto-format your code. The indentation is a bit off, which makes it difficult to comprehend.

To clarify, you are looking to make it so that interacting with the slider changes the column of the data that is used to drive color?

To do that, it is necessary to extract the logic that renders the choropleth into a function that you can call multiple times, passing different accessors each time for the color value. When the slider value changes, you can set the value of the color accessor, and pass that into the function that renders the choropleth.

Good luck!