Open SimonCoulombe opened 6 years ago
The javascript dependency at Leaflet.glify does not support a vector of opacities at the moment. I don't think it would be overly complicated to implement this, though I am no expert in JS.
I suggest you open an issue in the original repo and link back to this one to document where the request originated.
Once we can pass a vector of opacities to the JS source, I am happy to implement it here.
will do - thanks :)
For example, in addPolygon you could specify fillOpacity to depend on the variable most_common_gender_percentage, like this:
addPolygons( fillColor = ~ mypal_bin(mydata$most_common_gender), # color shows most common gender fillOpacity = ~ most_common_gender_percentage, ## opacity proportionnal to the common gender percentage)