templates2/danube.scala
changeset 333 24bc76d97db2
parent 284 9a04eb6a2291
equal deleted inserted replaced
332:703c7e42bf46 333:24bc76d97db2
    23 val ratings_url = """https://nms.kcl.ac.uk/christian.urban/ratings.csv"""
    23 val ratings_url = """https://nms.kcl.ac.uk/christian.urban/ratings.csv"""
    24 val movies_url = """https://nms.kcl.ac.uk/christian.urban/movies.csv"""
    24 val movies_url = """https://nms.kcl.ac.uk/christian.urban/movies.csv"""
    25 
    25 
    26 // testcases
    26 // testcases
    27 //-----------
    27 //-----------
    28 //val ratings = get_csv_url(ratings_url)
    28 //:
    29 //val movies = get_csv_url(movies_url)
    29 //val movies = get_csv_url(movies_url)
    30 
    30 
    31 //ratings.length  // 87313
    31 //ratings.length  // 87313
    32 //movies.length   // 9742
    32 //movies.length   // 9742
    33 
    33 
    34 
    34 
    35 
    35 
    36 // (2) Implement two functions that process the CSV-files from (1). The ratings
    36 // (2) Implement two functions that process the CSV-files from (1). The ratings
    37 //     function filters out all ratings below 4 and ReTurns a list of 
    37 //     function filters out all ratings below 4 and ReTurns a list of 
    38 //     (userID, movieID) pairs. The movies function just ReTurns a list 
    38 //     (userID, movieID) pairs. The movies function just ReTurns a list 
    39 //     of (movieID, title) pairs.
    39 //     of (movieID, title) pairs. Note the input to these functions, that is
       
    40 //     the argument lines, will be the output of the function get_csv_url.
    40 
    41 
    41 
    42 
    42 //def process_ratings(lines: List[String]) : List[(String, String)] = ...
    43 //def process_ratings(lines: List[String]) : List[(String, String)] = ...
    43 
    44 
    44 //def process_movies(lines: List[String]) : List[(String, String)] = ...
    45 //def process_movies(lines: List[String]) : List[(String, String)] = ...