Hello,
from a while, i am trying to create a “map chart”, where (in some locations) i would have a kind of pie charts.
i found that the “px.scatter_geo” allows displaying a world map where we can display different kind of distributions.
i want to know if it’s possible to display “pie charts” instead if a simple “dot”.
here is the df i am trying to display :
data = {'country': ['United States', 'France', 'Turkey'],
'iso_alpha': ['USA', 'FRA', 'TUR'],
'%S': [50, 50, 50],
'%P': [30, 30, 30],
f'%G': [20, 20, 20]}
df = pd.DataFrame(data)
to display these data within a worlmap, i used this code :
import plotly.express as px
df = px.data.gapminder()
fig = px.scatter_geo(df, locations="iso_alpha",
color="country",
hover_name="country",
size="%S",
projection="orthographic",
hover_data=[%S],)
fig.show()
But as you can see i anly display %S, is there a way to have (instead of dots), a pie chart (%S+%P+%G) by country.
Can anyone help me about this.
Thank you all !