Skip to content

Commit

Permalink
replaced profiling with sweetviz
Browse files Browse the repository at this point in the history
  • Loading branch information
soft-nougat committed Feb 27, 2021
1 parent e9e508d commit 7bf919c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
17 changes: 12 additions & 5 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@
import pandas as pd
import base64
import SessionState
# Load the LDA model from gensim
import preprocessor as pp
from pandas_profiling import ProfileReport
import sweetviz as sv
import streamlit.components.v1 as components

# ----------------------------------------------
Expand Down Expand Up @@ -204,7 +205,7 @@ def structured_data_app():
"Structured data analysis is an important step ",
"in AI model development or Data Analysis. This app ",
"offers visualisation of descriptive statistics of a ",
"csv input file by using the pandas profiling package.")
"csv input file by using the sweetviz package.")

# Side panel setup
# Step 1 includes Uploading
Expand All @@ -219,13 +220,19 @@ def structured_data_app():
st.subheader('Choose data to analyse :alembic:')
data,txt = check_input_method(data_input_mthd)

st.subheader('A preview of input data is below, please select plot to start analysis :bar_chart:')
st.subheader('A preview of input data is below, please wait for data to be analyzed :bar_chart:')
st.write(data.head(5))

profile = ProfileReport(data, title='Your input data profile report').to_html()
my_report = sv.analyze(data)

my_report.show_html(layout='vertical',
open_browser=False)

#profile = ProfileReport(data, title='Your input data profile report').to_html()
display = open("SWEETVIZ_REPORT.html", 'r', encoding='utf-8')
source_code = display.read()
# display html page in streamlit
components.html(profile, height = 800, scrolling=True)
components.html(source_code, height = 600, scrolling=True)

def text_data_app():

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ numexpr==2.7.1
numpy==1.20.0rc1
packaging==20.8
pandas==1.1.5
pandas-profiling
pandocfilters==1.4.3
parso==0.7.1
pickleshare==0.7.5
Expand Down Expand Up @@ -115,6 +114,7 @@ smmap==3.0.4
spacy==2.3.5
srsly==1.0.5
streamlit==0.73.1
sweetviz
terminado==0.9.1
testpath==0.4.4
textblob==0.15.3
Expand Down

0 comments on commit 7bf919c

Please sign in to comment.