Im trying to adjust the text size accoridng to country size, so the text will be inside the boardes of the copuntry.
import pandas as pd
import plotly.express as px
df=pd.read_csv('regional-be-daily-latest.csv', header = 1)
fig = px.choropleth(df, locations='Code', color='Track Name')
fig.update_layout(margin={"r":0,"t":0,"l":0,"b":0})
fig.add_scattergeo(
locations = df['Code'],
text = df['Track Name'],
mode = 'text',
)
fig.show()
For the visualiztion:
The text for orange country is inside the boardes of the country but the text to label the blue countrry is bigger.
Best would be to adjust the size so it will not exceed the boardes of the country
