hi,
Looking for a ScatterPlot -Bubble- map example please. I need to colour code the points using a column in the data set [log, lat, amount, product-type ], and aggregate coordinates [SUM(amount) ] in larger bubble size.
Many thanks
hi,
Looking for a ScatterPlot -Bubble- map example please. I need to colour code the points using a column in the data set [log, lat, amount, product-type ], and aggregate coordinates [SUM(amount) ] in larger bubble size.
Many thanks
Hey Zanco! Welcome to our forum
So, st.map
is very limited (intentionally) and will not be able to get you to the chart you are trying to achieve. But you can use other charting commands!
For map + scatter chart capabilities, I’ve used Plotly Express scatter_geo
command a while ago! It won’t automatically cluster points, but it is still a reasonable solution. See documentation and some straightforward examples.
Mock code:
fig = px.scatter_geo(
data_frame=df,
color="color_column",
lon="lon",
lat="lat",
projection="natural earth",
hover_name="hover_column",
size="size_column", # <-- Set the column name for size
height=800,
)
st.plotly_chart(fig, use_container_width=True)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.