GitXplorerGitXplorer
y

CS348-Group-Project

public
0 stars
3 forks
0 issues

Commits

List of commits on branch main.
Unverified
be8a7253ae28e87dd6bf6edc1fbbf4634679ac29

Merge branch 'main' of https://github.com/yuming-long/CS348-Group-Project into main

committed 2 years ago
Unverified
7bc51333c18797ed38a20e3d3f541197258a056e

update

committed 2 years ago
Unverified
f428ec65f3ff4c97df664439fe54452ae40bd880

comment print

KKkathyf committed 2 years ago
Unverified
5a277f1310ddbdaa1cf35743873e89559e6c5a7f

fix bug on updating comments

committed 2 years ago
Unverified
c19864497655a04a681fc27b496d4d45d570c53e

update

KKkathyf committed 2 years ago
Unverified
d09d61b8973ced883fa0b37c1d3db5e816619a41

top-n change to rank()

KKkathyf committed 2 years ago

README

The README file for this repository.

CS348 Group Project

This application is based on datasets of movies and TV shows and allows movie and TV show fans to search, view, rate and leave comments for each movie and TV show.

SQL

Create the database

SQL Database is created by sql/initial.sql, which is used for creating tables, constraints, and stored triggers.

  1. Go to the sql folder.
  2. In the MySQL server, run the initial.sql by source initial.sql;. This will create a new database called CS348_Movie_DB and all the tables needed and create a user with the name 'user1' and password 'Password0!'.

Load the sample database

Sample database sql/sample-data.sql is generated by scripts/scrapy_top10.py, you can recreate it by running python3 scripts/scrapy_top10.py. You need to install the python package cinemagoer by running pip install cinemagoer to scrape the data.

  1. Type source initial.sql; to initialize the database.
  2. Type source sample-data.sql; to load the sample dataset.
  3. Type source test-sample.sql; to test the 6 functionalities on the sample dataset.

Load the production database

Production database sql/production-data.sql is generated by scripts/scrapy_top250.py, you can recreate it by running python3 scripts/scrapy_top250.py. You need to install the python package cinemagoer by running pip install cinemagoer to scrape the data.

  1. Type source initial.sql; to initialize the database.
  2. Type source production-data.sql; to load the production dataset.
  3. Type source test-production.sql; to test the 6 functionalities on the production dataset.

Functionalities

  1. View information about the movie selected based on the name. (ex. The Lord of the Rings)
  2. Find all movies with ratings in a specific range. (ex. > 7.0/10.0)
  3. Order all movies by their rate order. (ex. High-to-Low or Low-to-High)
  4. Find movies with top-n ratings. (ex. n <= 10)
  5. Leave both a rating and a comment on a specific movie.
  6. Update the given rate and comments based on the user name.

Data-driven application

Before running the data-driven application, please be sure to load in databases (sample or production).

Installation

  1. Go to the back-end folder,
    1. type pip install -r requirements.txt to install all python packages,
    2. and type python3 main.py to start.
  2. Go to the front-end folder,
    1. type npm config set legacy-peer-deps true.
    2. type npm install to install dependencies.
    3. type npm install @material-ui/icons to install icons.
    4. In the same folder, type npm start, and this will display a webpage.

Functionalities

  1. View information about the movie selected based on the name. (ex. The Lord of the Rings)
  2. Find all movies with ratings in a specific range. (ex. > 7.0/10.0)
  3. Order all movies by their rate order. (ex. High-to-Low or Low-to-High)
  4. Find movies with top-n ratings. (ex. n <= 10)

Instruction For Running

  1. Initialize database
  2. Load Data
  3. run main.py in back-end folder
  4. npm install and npm start in front-end folder
  5. Go to website localhost:3000

Members

Claire Sheng

Ganlin Feng

Junyi Liu

Yuming Long