When I save from notebook to insights, the diagram does not show up on the insights screen.
Hi, community.
I would like to save the static insights and add them to the dashboard.
However, when I run the following command to save it to an insight, it does not show up when I go to the Insights screen.
Can someone please help me with this?
Below is the python code.
---------
import dataiku
from dataiku import pandasutils as pdu
from dataiku import insights
import pandas as pd
import datetime
import plotly.express as px
mydataset = dataiku.Dataset("Result_data_prepared")
df = mydataset.get_dataframe()
df_colors = df.drop_duplicates(['商品カテゴリ'])['商品カテゴリ']
colors = ['#5799c7','ff9f4a', '#61b861']
colors_dict = dict(zip(df_colors, colors))
df_prepared = df.groupby(by=["商品カテゴリ", "商品"]).count()[["salesTotal"]]
df_prepared = df_prepared.reset_index()
fig = px.sunburst(df,
path=["商品カテゴリ", "商品"],
color='商品カテゴリ',
values='salesTotal',
color_discrete_map=colors_dict)
fig.show()
insights.save_plotly("my-plotly-plot", fig)
Doc:
https://knowledge.dataiku.com/latest/data-viz/static-insights/tutorial-static-insights.html
Operating system used: design node
Operating system used: design node
Operating system used: design node