I have a dataframe with the top 10 Google search results for certain requests.
I display this data on a graph. According to the axis X, I have domains, according to the axcis Y, their position.
The problem is that several pages of the same domain can be simultaneously in the top 10, which is why a duplicate appears on the axis X, which is not displayed on the chart.
Question: is it possible to somehow bypass this and still display all domains, even if they are duplicated?
What does the graph look like:
Code of chart:
serp_csv2 = pd.read_csv('all.csv')
rent_serp = serp_csv2[serp_csv2['searchTerms'].str.contains("аренда", regex=True, case=False)]
rent_serp['bubble_size'] = 35
rent_serp.set_index("queryTime", inplace=True)
fig = px.scatter(rent_serp, x="displayLink", y="rank", animation_frame=rent_serp.index, animation_group="displayLink",
color="displayLink", hover_name="link", hover_data=["title"],
log_y=False,
height=710, width=900, range_x=[-1,11], range_y=[1,11], size="bubble_size", text="displayLink", template="plotly_dark", title="Heartbeat of SERP for 'аренда квартир киев'", labels={"rank":"Rankings","displayLink":"Domain Names"})
fig.layout.updatemenus[0].buttons[0].args[1]["frame"]["duration"] = 450
fig.layout.updatemenus[0].buttons[0].args[1]["transition"]["duration"] = 1500
fig.update_xaxes(
title_font = {"size": 20},
title_standoff = 45)
fig.update_yaxes(
title_font = {"size": 20},
title_standoff = 45)
fig.show(renderer='notebook')