Setting up the required data for a scalable recommendation engine in Spark 2.0
In this recipe, we examine downloading the MovieLens public dataset and take a first exploratory view of the data. We will use the explicit data based on customer ratings from the MovieLens dataset. The MovieLens dataset contains 1,000,000 ratings of 4,000 movies from 6,000 users.
You will need one of the following command line tools to retrieve the specified data: curl
(recommended for Mac) or wget
(recommended for Windows or Linux).
How to do it...
- You can start with downloading the dataset using either of the following commands:
wget http://files.grouplens.org/datasets/movielens/ml-1m.zip
You can also use the following command:
curl http://files.grouplens.org/datasets/movielens/ml-1m.zip -o ml-1m.zip
- Now you need to decompress the ZIP:
unzip ml-1m.zip creating: ml-1m/ inflating: ml-1m/movies.dat inflating: ml-1m/ratings.dat inflating: ml-1m/README inflating: ml-1m/users.dat
The command will create a directory named...