This project demonstrates a complete end-to-end data analytics workflow using Python, starting from web data extraction and ending with meaningful insights through visualization and sentiment analysis.
The project scrapes product information from the publicly available Books to Scrape website, transforms the raw HTML into structured datasets, performs data preprocessing, explores the data using statistical techniques, and visualizes trends through charts.
It serves as a practical introduction to Web Scraping, Data Cleaning, Exploratory Data Analysis (EDA), Data Visualization, and Basic Sentiment Analysis.
- Extract structured data from web pages using Python
- Automate web scraping using BeautifulSoup
- Clean and preprocess raw datasets
- Perform Exploratory Data Analysis (EDA)
- Generate meaningful visualizations
- Classify product sentiment based on ratings
- Build a reusable data analytics workflow
- π Automated Web Scraping
- π Exploratory Data Analysis (EDA)
- π§Ή Data Cleaning & Transformation
- π Data Visualization
- π Rating-Based Sentiment Analysis
- π CSV Dataset Generation
- π Statistical Insights
Web-Scraping-and-Data-Analysis-using-Python/
β
βββ Task_1.py # Web Scraping
βββ Task_2.py # Data Cleaning
βββ Task_3.py # Data Visualization
βββ Task_4.py # Sentiment Analysis
β
βββ data/
β βββ books_data.csv
β βββ books_with_sentiment.csv
β
βββ outputs/
β βββ rating_chart.png
β
βββ report.docx
βββ requirements.txt
βββ README.md
| Category | Technology |
|---|---|
| Programming Language | Python 3 |
| Web Scraping | BeautifulSoup4, Requests |
| Data Processing | Pandas |
| Visualization | Matplotlib |
| Dataset | CSV |
The project uses the publicly available practice website:
Books to Scrape
This website is specifically designed for learning and practicing web scraping techniques.
git clone https://github.com/Rohitkoli1096/Web-Scraping-and-Data-Analysis-using-Python.git
cd Web-Scraping-and-Data-Analysis-using-Pythonpip install -r requirements.txtIf the requirements file is unavailable:
pip install requests beautifulsoup4 pandas matplotlibpython Task_1.py
python Task_2.py
python Task_3.py
python Task_4.pyWebsite
β
βΌ
Web Scraping
β
βΌ
Raw Dataset
β
βΌ
Data Cleaning
β
βΌ
Processed Dataset
β
βΌ
Exploratory Data Analysis
β
βΌ
Visualization
β
βΌ
Sentiment Analysis
β
βΌ
Insights & Reports
| File | Description |
|---|---|
| books_data.csv | Raw scraped dataset |
| books_with_sentiment.csv | Dataset with sentiment labels |
| rating_chart.png | Rating distribution visualization |
| report.docx | Project report |
- Most books have ratings between 3 and 5 stars.
- Positive sentiment accounts for the majority of products.
- Product prices vary significantly across different categories.
- Cleaned datasets are ready for further machine learning or business analysis.
| Rating | Sentiment |
|---|---|
| βββββ | Positive |
| ββββ | Positive |
| βββ | Neutral |
| ββ | Negative |
| β | Negative |
During development, the following challenges were addressed:
- Understanding website HTML structure
- Extracting nested HTML elements
- Cleaning currency symbols and unwanted characters
- Handling missing values
- Organizing scraped data into structured CSV files
- Selenium-based scraping for dynamic websites
- Scraping multiple pages automatically
- Export data to SQL databases
- Interactive dashboards using Power BI or Tableau
- Machine Learning-based sentiment analysis
- Scheduled automated scraping
- Data pipeline automation
This project helped strengthen practical knowledge in:
- Python Programming
- Web Scraping
- Data Cleaning
- Data Analysis
- Exploratory Data Analysis (EDA)
- Data Visualization
- Working with CSV datasets
- Python libraries for analytics
Rohit Devidas Koli
Computer Engineering Student
Python β’ Data Analytics β’ Web Scraping β’ Data Visualization β’ Machine Learning Enthusiast
Contributions are welcome.
- Fork the repository
- Create a feature branch
- Commit your changes
- Push the branch
- Open a Pull Request
This project is licensed under the MIT License.
Special thanks to CodeAlpha for providing the internship opportunity and project guidance that contributed to the development of this project.