import streamlit as st import pandas as pd import plotly.express as px import plotly.graph_objects as go import numpy as np # Set page config st.set_page_config(layout="wide", page_title="ERP Implementation Analytics", page_icon="📊") # Load and process data @st.cache_data def load_data(): df = pd.read_csv('ERP Priortization.csv', encoding='utf-8') df = df.dropna() # Remove any empty rows return df df = load_data() # Main header with styling st.markdown(""" """, unsafe_allow_html=True) st.markdown('

ERP Implementation Analytics Dashboard

', unsafe_allow_html=True) # Sidebar navigation analysis_type = st.sidebar.selectbox( "Select Analysis View", ["Requirements Analysis", "Integration & Risk", "Implementation Planning", "Technical & AI", "Cost & ROI"] ) if analysis_type == "Requirements Analysis": col1, col2 = st.columns(2) with col1: # Priority Distribution Chart moscow_counts = df['MoSCoW'].value_counts() fig_priority = px.pie( values=moscow_counts.values, names=moscow_counts.index, title="Requirements Priority Distribution", color_discrete_sequence=px.colors.qualitative.Set3 ) st.plotly_chart(fig_priority, use_container_width=True) with col2: # Departmental Requirements Breakdown dept_counts = df['Category'].value_counts() moscow_by_dept = pd.crosstab(df['Category'], df['MoSCoW']) fig_dept = px.bar( moscow_by_dept, title="Requirements by Department and Priority", barmode='stack' ) fig_dept.update_layout(xaxis_tickangle=-45) st.plotly_chart(fig_dept, use_container_width=True) elif analysis_type == "Integration & Risk": col1, col2 = st.columns(2) with col1: # Integration Complexity Heatmap integration_data = { 'System': ['ERP Core', 'Financial', 'Project Mgmt', 'ClickUp', 'SharePoint', 'Office 365', 'Reporting', 'Mobile Apps', 'Email'], 'Complexity': ['High', 'High', 'High', 'Medium', 'Medium', 'Medium', 'Low', 'Low', 'Low'], 'Value': [9, 8, 8, 5, 5, 5, 3, 3, 3] } df_integration = pd.DataFrame(integration_data) fig_integration = px.treemap( df_integration, path=['Complexity', 'System'], values='Value', color='Complexity', color_discrete_map={'High': 'red', 'Medium': 'yellow', 'Low': 'green'} ) st.plotly_chart(fig_integration, use_container_width=True) with col2: # Risk Assessment Matrix risk_data = { 'Risk': ['Technical', 'Operational', 'Integration', 'User Adoption', 'Data Migration'], 'Impact': [8, 7, 9, 6, 8], 'Probability': [7, 6, 8, 7, 7], 'Size': [50, 45, 55, 40, 45] } df_risk = pd.DataFrame(risk_data) fig_risk = px.scatter( df_risk, x='Probability', y='Impact', size='Size', text='Risk', title='Risk Assessment Matrix' ) st.plotly_chart(fig_risk, use_container_width=True) elif analysis_type == "Implementation Planning": col1, col2 = st.columns(2) with col1: # Timeline/Gantt Chart timeline_data = { 'Task': ['Requirements Gathering', 'System Design', 'Development', 'Testing', 'Deployment'], 'Start': ['2024-01-01', '2024-03-01', '2024-05-01', '2024-08-01', '2024-10-01'], 'End': ['2024-02-28', '2024-04-30', '2024-07-31', '2024-09-30', '2024-12-31'], 'Phase': ['Phase 1', 'Phase 1', 'Phase 2', 'Phase 2', 'Phase 3'] } df_timeline = pd.DataFrame(timeline_data) fig_timeline = px.timeline( df_timeline, x_start='Start', x_end='End', y='Task', color='Phase', title='Implementation Timeline' ) st.plotly_chart(fig_timeline, use_container_width=True) with col2: # Resource Allocation resource_data = { 'Department': ['IT', 'Finance', 'Operations', 'Training', 'Support'], 'Allocation': [80, 60, 40, 30, 50] } fig_resource = px.bar( resource_data, x='Department', y='Allocation', title='Resource Allocation (%)', color='Department' ) st.plotly_chart(fig_resource, use_container_width=True) elif analysis_type == "Technical & AI": col1, col2 = st.columns(2) with col1: # Technical Architecture Components tech_data = { 'Component': ['Cloud Infrastructure', 'Security', 'Integration', 'Data Management', 'User Access'], 'Complexity': [8, 9, 7, 6, 5], 'Priority': ['High', 'High', 'Medium', 'Medium', 'Low'] } fig_tech = px.scatter( tech_data, x='Complexity', y='Component', color='Priority', size=[40]*5, title='Technical Components Analysis' ) st.plotly_chart(fig_tech, use_container_width=True) with col2: # AI Capabilities ai_data = { 'Capability': ['Process Automation', 'Predictive Analytics', 'NLP', 'Security', 'Reporting'], 'Readiness': [90, 70, 50, 80, 85] } fig_ai = px.bar( ai_data, x='Capability', y='Readiness', title='AI Capabilities Readiness (%)', color='Capability' ) st.plotly_chart(fig_ai, use_container_width=True) elif analysis_type == "Cost & ROI": col1, col2 = st.columns(2) with col1: # Cost-Benefit Matrix cost_benefit_data = { 'Initiative': ['Core ERP', 'AI Features', 'Mobile App', 'Integration', 'Training'], 'Cost': [90, 70, 40, 60, 30], 'Benefit': [95, 75, 45, 70, 40], 'Category': ['High-High', 'High-High', 'Low-Low', 'High-Low', 'Low-High'] } fig_cost = px.scatter( cost_benefit_data, x='Cost', y='Benefit', text='Initiative', color='Category', title='Cost-Benefit Analysis' ) st.plotly_chart(fig_cost, use_container_width=True) with col2: # ROI Projection roi_data = { 'Month': list(range(1, 13)), 'Investment': [100, 150, 180, 200, 210, 220, 225, 230, 235, 240, 245, 250], 'Returns': [0, 20, 50, 90, 140, 200, 270, 350, 440, 540, 650, 770] } df_roi = pd.DataFrame(roi_data) fig_roi = px.line( df_roi, x='Month', y=['Investment', 'Returns'], title='ROI Projection (12 Months)', labels={'value': 'Amount (₦M)', 'variable': 'Type'} ) st.plotly_chart(fig_roi, use_container_width=True) # Footer st.markdown("---") st.markdown("Dashboard created for Enikkom ERP Implementation")