Abstract
Sweetviz is an open-source Data Science project. Visualize and compare datasets, target values and associations, with one line of code. Sweetviz is an open-source Python library that generates beautiful, high-density visualizations to kickstart EDA (Exploratory Data Analysis) with just two lines of code. Output is a fully self-contained HTML application. It is built using Python, Pandas, Machine Learning. Key capabilities include: Target analysis; Shows how a target value (e.g. "Survived" in the Titanic dataset) relates to other features; Visualize and compare. The complete source code is publicly available on GitHub under the MIT License, making it a useful reference for students building a Data Science mini project or final-year project.
1. Introduction
Sweetviz is an open-source Python library that generates beautiful, high-density visualizations to kickstart EDA (Exploratory Data Analysis) with just two lines of code. Output is a fully self-contained HTML application.
The system is built around quickly visualizing target values and comparing datasets. Its goal is to help quick analysis of target characteristics, training vs testing data, and other such data characterization tasks.
Usage and parameters are described below, you can also find an article describing its features in depth and see examples in action HERE.
2. Objective
Visualize and compare datasets, target values and associations, with one line of code.
This project demonstrates how Python, Pandas, Machine Learning can be applied to a real-world Data Science problem.
3. Key Features / Modules
- Target analysis
- Shows how a target value (e.g. "Survived" in the Titanic dataset) relates to other features
- Visualize and compare
- Distinct datasets (e.g. training vs test data)
- Intra-set characteristics (e.g. male versus female)
- Mixed-type associations
- Type inference
- Automatically detects numerical, categorical and text features, with optional manual overrides
- Summary information
- Type, unique values, missing values, duplicate rows, most frequent values
4. Technology Stack
5. System Requirements
General requirements for this technology stack — check the README for exact versions.
- Python 3.8 or later
- pip / virtualenv for dependencies
- VS Code, PyCharm or Jupyter Notebook
- Git (to clone the repository)
6. Installation & Setup
git clone https://github.com/fbdesignpro/sweetviz.git
cd sweetviz- Make sure none of your scripts are named sweetviz.py, as that interferes with the library itself. Delete or rename that script (and any associated .pyc files), and try again.
- Try uninstalling the library using pip uninstall sweetviz, then reinstalling
- The issue may stem from using multiple versions of Python, or from OS permissions. The following Stack Overflow articles have resolved many of these issues reported: Article 1, Article 2, Article 3
- If all else fails, post a bug issue here on github. Thank you for taking the time, it may help resolve the issue for you and everyone else!
- Create a DataframeReport object using one of: analyze(), compare() or compare_intra()
- Use a show_xxx() function to render the report. You can now use either html or notebook report options, as well as scaling: (more info on these options below)
Full setup instructions are in the project README.
7. Future Enhancements
Suggested extensions you can add to make this your own project.
- Turn the analysis into an interactive dashboard
- Automate data refresh with a scheduled job
- Add a predictive model on top of the analysis
8. Viva / Review Questions
Common questions examiners ask for projects in this domain.
- What is the source of the dataset and how was missing data handled?
- Which exploratory analysis steps revealed the most useful insight?
- Why were these particular charts chosen to present the data?
- Which statistical or ML technique supports the conclusions?
- How could the analysis be automated or refreshed with new data?
9. Source Code & License
This project is developed by fbdesignpro and published on GitHub under the MIT License. Please follow the license terms and credit the original author when you use or modify this code.
Want to build this as your internship project?
Work on a Data Science project like this with mentor guidance, weekly reviews and an internship certificate from Training Trains, Erode — online or offline.
Apply for Data Science Internship