Build a mini data app with streamlite package
generate a mini data app using xplain, streamlite and plotly package
add xplain, plotly, streamlit
to input field pip install
paste following code in code area
import streamlit as st
import xplain
import plotly.express as px
x = xplain.Xsession(url="https://xoebp.xplain-data.com")
x.run({
"method": "deleteRequest",
"requestName": "test"
})
df = x.open_attribute(object_name="PurchaseDocument",
dimension_name="SpendArea",
attribute_name="SpendArea",
request_name="test")
fig = px.bar(df, x='SpendArea', y='# PurchaseDocument')
st.title="This is a minimal streamlit app powerd by Xplain Data"
st.plotly_chart(fig)
if st.button('Say hello'):
st.write('hello world!')
click button run, a new app page will be generated

Last updated