This Streamlit project is a dashboard for visualizing data related to Mississippi Steel Processing's quality management system. It provides insights into various aspects of steel production, including lead times, shipping, on-time delivery, production metrics, downtime analysis, and customer surveys.
- Data Visualization: Utilizes interactive charts and graphs to display key performance indicators (KPIs) and metrics.
- Data Analysis: Allows users to explore and analyze steel production data, including quality metrics, lead times, and customer feedback.
- Dashboard Components: Includes separate sections for different data categories such as production, shipping, work orders, and customer surveys.
- Downloadable Data: Provides options for users to download raw data files for further analysis.
The project utilizes data from various sources, including:
- Office 365 SharePoint REST API: Integrates with SharePoint to access live data on lead times, shipping, work order on-time delivery, and customer survey responses.
- CSV Files: Additional data sources include CSV files containing production metrics, downtime, and safety incidents.
To run the Streamlit application locally, follow these steps:
- Clone the repository to your local machine.
- Install the required dependencies using
pip install -r requirements.txt
. - Create a
secrets.toml
file inside the.streamlit
folder in the project root directory. -
Setting up App-Only Principal: To generate a client ID and client secret, navigate to a SharePoint site within your tenant. Access the
appregnew.aspx
page by appending/_layouts/15/appregnew.aspx
to the site URL. On this page, use the "Generate" button to create a client ID and client secret. Fill out the rest of the form as required for your application's configuration. - Granting Permissions: Grant permissions to the app-only principal through the SharePoint admin center. Navigate to the tenant admin appinv page. On this page, add your client ID and look up the created principal to set the permissions needed for accessing SharePoint data at the tenant level.
- In the
secrets.toml
file, replace theclient_id
andclient_secret
with your own SharePoint credentials. Also, create your own keys for the SharePoint site URLs and list names. - Navigate to the project directory and run
streamlit run Home.py
in your terminal.
[sharepoint]
client_id = "YOUR_CLIENT_ID"
client_secret = "YOUR_CLIENT_SECRET"
main_site_url = "YOUR_HOME_SITE_URL"
plant_operations_subsite_url = "YOUR_SUBSITE_URL"
loading_times_list_name = "YOUR_LOADING_TIMES_LIST_NAME"
lead_times_list_name = "YOUR_LEAD_TIMES_LIST_NAME"
customer_surveys_list_name = "YOUR_CUSTOMER_SURVEYS_LIST_NAME"
otd_list_name = "YOUR_OTD_LIST_NAME"