Spaces:
Sleeping
Sleeping
Upload 5 files
Browse files- .gitignore +11 -0
- README.md +25 -13
- Spaces.yml +8 -0
- app.py +68 -0
- requirements.txt +0 -0
.gitignore
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
__pycache__/
|
| 2 |
+
*.py[cod]
|
| 3 |
+
*$py.class
|
| 4 |
+
.env
|
| 5 |
+
.venv
|
| 6 |
+
env/
|
| 7 |
+
venv/
|
| 8 |
+
ENV/
|
| 9 |
+
.streamlit/
|
| 10 |
+
.idea/
|
| 11 |
+
.ipynb_checkpoints/
|
README.md
CHANGED
|
@@ -1,13 +1,25 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
-
|
| 12 |
-
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Data Analytics Portal
|
| 2 |
+
|
| 3 |
+
A simple and interactive web application built with Streamlit for data analysis and visualization.
|
| 4 |
+
|
| 5 |
+
## Features
|
| 6 |
+
|
| 7 |
+
- Upload CSV or Excel files
|
| 8 |
+
- View data summary statistics
|
| 9 |
+
- Explore top and bottom rows
|
| 10 |
+
- Check data types
|
| 11 |
+
- Value counting with visualizations (bar chart, line chart, pie chart)
|
| 12 |
+
|
| 13 |
+
## How to Use
|
| 14 |
+
|
| 15 |
+
1. Upload a CSV or Excel file using the file uploader
|
| 16 |
+
2. Explore the basic information about your dataset
|
| 17 |
+
3. Navigate through the tabs to view different aspects of your data
|
| 18 |
+
4. Use the Value Count expander to visualize frequency distributions
|
| 19 |
+
|
| 20 |
+
## Technologies Used
|
| 21 |
+
|
| 22 |
+
- Python
|
| 23 |
+
- Streamlit
|
| 24 |
+
- Pandas
|
| 25 |
+
- Plotly Express
|
Spaces.yml
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
title: Data Analytics Portal
|
| 2 |
+
emoji: π
|
| 3 |
+
colorFrom: blue
|
| 4 |
+
colorTo: green
|
| 5 |
+
sdk: streamlit
|
| 6 |
+
sdk_version: 1.29.0
|
| 7 |
+
app_file: app.py
|
| 8 |
+
pinned: false
|
app.py
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import pandas as pd
|
| 2 |
+
import plotly.express as px
|
| 3 |
+
import streamlit as st
|
| 4 |
+
|
| 5 |
+
st.set_page_config(
|
| 6 |
+
page_title='Data Analytics Portal',
|
| 7 |
+
page_icon='π'
|
| 8 |
+
)
|
| 9 |
+
|
| 10 |
+
st.title(':blue[π Data Analytics Portal]')
|
| 11 |
+
st.subheader(':grey[ An easy way to Analyse Data!!]', divider='green')
|
| 12 |
+
|
| 13 |
+
file = st.file_uploader('Drop csv or excel file', type=['csv', 'xlsx'])
|
| 14 |
+
if file:
|
| 15 |
+
if file.name.endswith('csv'):
|
| 16 |
+
data = pd.read_csv(file)
|
| 17 |
+
else:
|
| 18 |
+
data = pd.read_excel(file)
|
| 19 |
+
st.dataframe(data)
|
| 20 |
+
st.info('File is successfully Uploaded', icon='π¨')
|
| 21 |
+
|
| 22 |
+
st.subheader(':blue[Basic information of the dataset]', divider='green')
|
| 23 |
+
|
| 24 |
+
tab1, tab2, tab3, tab4 = st.tabs(['Summary', 'Top and Bottom Rows', 'Data Types', 'Columns'])
|
| 25 |
+
|
| 26 |
+
with tab1:
|
| 27 |
+
st.write(f'There are {data.shape[0]} rows in dataset and {data.shape[1]} columns in the dataset')
|
| 28 |
+
st.subheader(':gray[Statistical summary of the dataset]')
|
| 29 |
+
st.dataframe(data.describe())
|
| 30 |
+
|
| 31 |
+
with tab2:
|
| 32 |
+
st.subheader(':gray[Top Rows]')
|
| 33 |
+
toprows = st.slider('Number of rows you want', 1, data.shape[0], key='topslider')
|
| 34 |
+
st.dataframe(data.head(toprows))
|
| 35 |
+
st.subheader(':gray[Bottom Rows]')
|
| 36 |
+
bottomrows = st.slider('Number of rows you want', 1, data.shape[0], key='bottomslider')
|
| 37 |
+
st.dataframe(data.tail(bottomrows))
|
| 38 |
+
|
| 39 |
+
with tab3:
|
| 40 |
+
st.subheader(':grey[Data types of column]')
|
| 41 |
+
st.dataframe(data.dtypes)
|
| 42 |
+
|
| 43 |
+
with tab4:
|
| 44 |
+
st.subheader('Column Names in Dataset')
|
| 45 |
+
st.write(list(data.columns))
|
| 46 |
+
|
| 47 |
+
st.subheader(':blue[Column Values To Count]', divider='green')
|
| 48 |
+
|
| 49 |
+
with st.expander('Value Count'):
|
| 50 |
+
col1, col2 = st.columns(2)
|
| 51 |
+
with col1:
|
| 52 |
+
column = st.selectbox('Choose Column name', options=list(data.columns))
|
| 53 |
+
with col2:
|
| 54 |
+
toprows = st.number_input('Top rows', min_value=1, step=1)
|
| 55 |
+
|
| 56 |
+
count = st.button('Count')
|
| 57 |
+
if count:
|
| 58 |
+
result = data[column].value_counts().reset_index().head(toprows)
|
| 59 |
+
st.dataframe(result)
|
| 60 |
+
st.subheader('Visualization', divider='gray')
|
| 61 |
+
fig = px.bar(data_frame=result, x=column, y='count', text='count', template='plotly_white')
|
| 62 |
+
st.plotly_chart(fig)
|
| 63 |
+
fig = px.line(data_frame=result, x=column, y='count', text='count', template='plotly_white')
|
| 64 |
+
st.plotly_chart(fig)
|
| 65 |
+
fig = px.pie(data_frame=result, names=column, values='count')
|
| 66 |
+
st.plotly_chart(fig)
|
| 67 |
+
else:
|
| 68 |
+
st.warning('Please upload a CSV or Excel file to get started', icon='β οΈ')
|
requirements.txt
ADDED
|
Binary file (102 Bytes). View file
|
|
|