I have a dataset of beer consumption and democratic quality by country, with the columns as years and countries as the index of the dataframe.
The final graph is a scatterplot of just one year, so say 2017, with beer consumption on the x axis and democratic quality on the yaxis. With size as population, the graph in px.scatter turns out beautifully:
However, when I turn the code to go.Scatter for Dash, I am lost as to how to assign colors by country. both the arguments for color
, as well as marker={'color": countries}
do not work. I could map it as shown here but I feel like I am missing something.
Does anyone have a quick 'n easy fix for discrete colors here?