I have been trying to create a clustered bubble with different information about countries using cluster bubbles in Observable Notebook. The bubbles are clustered according to the continent name. Everything is working fine, except the bubbles are only reading the value from one single parameter and the size remains the same, although another parameter is chosen with different value. I have all my parameter name inside a button but while assigning values i am unable to assign it to more than one parameter and that is why the bubbles size are not changing. This section is for radio buttons and the bubbles should change size respective to button click beacause of data change):
`viewof parameter = Inputs.radio(new Map([
["Area (Sq. Km)", "areasqkm"],["Population", "population"], ["Airports", "airports"], ["Median Age", "medianage"],["Gdp Growthrate", "gdpgrowthrate"],["Inflation Rate", "inflationrate"], ["Unemployment Rate", "unemploymentrate"],["PopnBelow Poverty", "popnbelowpoverty"] ]), { value: "areasqkm", label: "Parameter to show:" })`
This is where the parameter is defined:
`
var p = parameter//.toLowerCase().replace(" ", "");
` Here the value is assigned, but if i try to assign the value directly to the parameter , it does not work :
countrieslatest = countrieslatestfile.map(({ ContinentCode, CountryName,CountryCode, population,areasqkm,airports,gdpgrowthrate,inflationrate,unemploymentrate,popnbelowpoverty,medianage, ...data }) => ({ // ...data, group: ContinentCode, value: Math.sqrt(airports),
Here is a link to my Notebook :Cluster Bubbles
I think I am almost done with making it work if I can manage to define the radius of bubbles or make it read the values as per button click on different parameters. I would appreciate any kind of help.