SiRumCz / CSC501

CSC501 assignments
0 stars 1 forks source link

Add API for plotting top 5 most rated movies of each genre #29

Closed superliuxz closed 5 years ago

superliuxz commented 5 years ago

What I am thinking is to have a bar chart, with the horizontal axis being the 18 different genres, and in each genre we plot the top 5 most rated movies of all time. The bar hight is the scale key of each movie, the name of the bar can be the movie - year, and the numRatings and avgRating can be used as tooltips to display more data. The plot will be very similar to the existing plot # 3.

@soroushysfi , is this possible?

SiRumCz commented 5 years ago

could you explain what scale key is?

superliuxz commented 5 years ago

could you explain what scale key is?

Yes. scale ~= height == the # of ratings (numRatings key).

So why don't I just use the # of ratings as the height of each bar?

Say we have two genres, Action and Drama, Action is a much more popular genre than Drama. What could end up happening is that: under Drama, we have two movies (d1 and d2), with 10000 and 20000 ratings, and under Action, we have two movies (a1 and a2) with 100 and 200 ratings.

Imagine that we plot the grouped bar chart on d1, d2, a1 and a2. The height of d1 and d2 would be 100 times higher than a1 and a2.

Hence I provide the normalized height - scale, each bar height is normalized with respect to the total number of ratings within the belong genre. By doing so, when plotted, all the bars on the graph will have more or less the same height.

What I would want to plot is that, on the vertical axis there is no units. Instead, when the mouse hovers over the bar, we can use a tooltip to display the numRatings key.

I hope this makes sense.

soroushysfi commented 5 years ago

What I am thinking is to have a bar chart, with the horizontal axis being the 18 different genres, and in each genre we plot the top 5 most rated movies of all time. The bar hight is the scale key of each movie, the name of the bar can be the movie - year, and the numRatings and avgRating can be used as tooltips to display more data. The plot will be very similar to the existing plot # 3.

@soroushysfi , is this possible?

Can you elaborate more? I didn't get what exactly you mean. can you show it in a sample bar chart?(a simple sketch would be fine). and I'm getting this error when I call the API: Error: no such table: rating_stats Is it running on 27m dataset?

superliuxz commented 5 years ago

What I am thinking is to have a bar chart, with the horizontal axis being the 18 different genres, and in each genre we plot the top 5 most rated movies of all time. The bar hight is the scale key of each movie, the name of the bar can be the movie - year, and the numRatings and avgRating can be used as tooltips to display more data. The plot will be very similar to the existing plot # 3. @soroushysfi , is this possible?

Can you elaborate more? I didn't get what exactly you mean. can you show it in a sample bar chart?(a simple sketch would be fine). and I'm getting this error when I call the API: Error: no such table: rating_stats Is it running on 27m dataset?

Error: no such table: rating_stats: checkout latest master, then remove assignment1.db, then python3 preproc.py.

Please see the following:

IMG_1573

soroushysfi commented 5 years ago

What I am thinking is to have a bar chart, with the horizontal axis being the 18 different genres, and in each genre we plot the top 5 most rated movies of all time. The bar hight is the scale key of each movie, the name of the bar can be the movie - year, and the numRatings and avgRating can be used as tooltips to display more data. The plot will be very similar to the existing plot # 3. @soroushysfi , is this possible?

Can you elaborate more? I didn't get what exactly you mean. can you show it in a sample bar chart?(a simple sketch would be fine). and I'm getting this error when I call the API: Error: no such table: rating_stats Is it running on 27m dataset?

Error: no such table: rating_stats: checkout latest master, then remove assignment1.db, then python3 preproc.py.

Please see the following:

IMG_1573

Sure! it will be easy.

soroushysfi commented 5 years ago

It sais here that this branch has some conflicts on the app.py file. Is it ok to merge?

superliuxz commented 5 years ago

It sais here that this branch has some conflicts on the app.py file. Is it ok to merge?

I will have to resolve the conflicts first. Will let you know when I resolve them, then you can merge. Thanks.

superliuxz commented 5 years ago

It sais here that this branch has some conflicts on the app.py file. Is it ok to merge?

Done.