Git Product home page Git Product logo

movies-etl's Introduction

Movies-ETL

This project was an introduction tp performing an Extract, Transform, Load (ETL). The data set Movie data originates from Wikipedia, Kaggle and implement a rating systsem on order to create a movie database from a clean dataset. The cleaning set incorporates cleaning rows and formating datatypes, preforming joins, and loading the cleaned dataset into a SQL database.

Overview

Our intention is to create an automated pipline that can ETL proccess we previously did manually. A synopsisv of the movie dataset comes from 1990 to 2018 and combining the information from 3 different resources.

Results

ETL_function_test.ipynb

  • Data is extracted from the website in JSON and CSV formats. -Data is transformed into Pandas data frames. -JSON file requires extra step โ€“ loading file first and then transforming into data frame. image image

ETL_clean_wiki_movies.ipynb

  • Function clean_movie combines scattered data of alternative languages into one column alt_titles.
  • Its subfunction change_column_name organizes column names into consistent pattern.
  • In the function extract_transform_load the transformation process of wiki movies data begins and includes:
    • Python list comprehensions.
    • apply() and map() methods in combination with lambda functions.
    • regular expressions or RegEx. image image

ETL_clean_kaggle_data.ipynb

  • Function extract_transform_load gets new tasks for cleaning Kaggle data and includes:
  • Changing datatypes, using methods pd.to_numeric, astype() and python comparison operators for Boolean types.
  • Filling missing values and filtering unwanted columns.
  • Merging data frames using pd_merge method. image image

ETL_create_database.ipynb

  • The function in its final step connects to the database by sqlalchemy library and to_sql method.
  • Complete ETL process can be executed with a single function extract_transform_load call.

The final results created a movies table with 6,052 rows. We see a reduction by 17% from the original of 7,311 and a ratings table with 26,024,289 rows.

Resources

  • Software: Python 3.7.9, Anaconda 4.9.2, Jupyter Notebooks 6.1.4, PostgreSQL 4.28
  • Libraries: Pandas, SQLAlchemy, NumPy
  • Files: Wikipedia Json, Movie Database Metadata, and MovieLens Ratings

movies-etl's People

Contributors

hthrower avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.