Skip to content

Transformation of scraped html to organized pandas dataframe

License

Notifications You must be signed in to change notification settings

SamuelAdamsMcGuire/wine_data_clean

Repository files navigation

Python application

Wine Data Cleaning


Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact

About The Project

The goal was to parse over 320k wine review pages into a clean pandas dataframe. The pages were downloaded locally from a google bucket using the following command:

gsutil -m cp -r gs://name-of-bucket

Once the data was stored locally I developed a module to parse the pages for the data found relevant for use in a ML prediction model that will make wine recommendation base on the users taste.

The following features were scraped:

  • Wine name
  • Winery name
  • Category: type of wine, i.e. red, white, sparkling
  • Designation
  • Varietal: type of grape
  • Appellation: the region the wine comes from
  • Alcohol content
  • Price
  • Rating
  • Reviewer name
  • Review

Here is a link to the complete csv file since it was too large to push to github:

Wine Data

The next step is to preform some NLP preprocessing and train a model. The final goal is to deploy the model as a web application.

(back to top)

Built With

(back to top)

Getting Started

To properly get started see samssimplescraper and wine data collection for instructions on how to scrape the entire dataset.

Otherwise clone this repository and us the example html files in this repo to experiment with.

Prerequisites

  • See requirements for need python libraries

Installation

Clone repository

git clone [email protected]:SamuelAdamsMcGuire/wine_data_clean.git

Install requirements_

pip install -r /path/to/requirements.txt

(back to top)

Usage

Code can be used as is for learning purposes. Or it can be adapted to user's goal. Follow the Roadmap and feel free to get in touch with any and all questions or comments.

(back to top)

Roadmap

  1. Clone this repository.

  2. Adjust script for the one example file (feel free to ask for my assistance). Or use on a larger dataset that is scraped using the aforementioned tools.

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Contact

Samuel Adams McGuire - [email protected]

Linkedin: LinkedIn

Project Link: https://github.com/SamuelAdamsMcGuire/wine_data_clean

(back to top)

About

Transformation of scraped html to organized pandas dataframe

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published