I am using the following Python code to produce a sunburst plot:-
import plotly
import plotly.express as px
import plotly.graph_objects as go
import pandas as pd
df = pd.read_csv('CellUsageStats.csv',dtype={'Population':int},keep_default_na=False)
print(df.head(50))
fig = px.sunburst(df, path=['LibPrefix', 'MasterPrefixAbrHead', 'MasterPrefixAbrTail', 'Drive'], values='Population', color='Population', color_continuous_scale=px.colors.sequential.Inferno)
fig.update_traces(hovertemplate='Pattern: %{currentPath}%{label}<br>Matches: %{value}<br>Percent of <b>%{parent}</b>: %{percentParent:0.2%f}<br>Percent of <b>%{entry}</b>: %{percentEntry:0.2%f}<br>Percent of <b>%{root}</b>: %{percentRoot:0.2%f}')
fig.show()
plotly.offline.plot(fig, filename='sunburst.html')
I have a second csv file that I use to produce another sunburst, using the same code above. How do I combine them to create side-by-side plots in the same html output? I found...
https://plotly.com/python/sunburst-charts/
However, I really need px.sunburst attributes, and the examples in the above link use go.Sunburst, not px.sunburst. Is there a straightforward way to produce side-by-side plots from two different sets of data?
Thanks!