sourize commited on
Commit
04d7395
Β·
verified Β·
1 Parent(s): f18e8a2

Upload 5 files

Browse files
Files changed (5) hide show
  1. .gitignore +11 -0
  2. README.md +25 -13
  3. Spaces.yml +8 -0
  4. app.py +68 -0
  5. 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
- title: DataAnalyticsPortal
3
- emoji: 😻
4
- colorFrom: purple
5
- colorTo: red
6
- sdk: streamlit
7
- sdk_version: 1.44.1
8
- app_file: app.py
9
- pinned: false
10
- short_description: An app to analyze your csv or xlsx file
11
- ---
12
-
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
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