NIAEFEUP / tts-be

A platform where students can experiment with the possible combination of schedule options they can pick at the start of the semester
https://tts.niaefeup.pt
5 stars 1 forks source link

46 analysis tool visuals #54

Closed Wallen-Ribeiro closed 1 year ago

Wallen-Ribeiro commented 1 year ago

Why was this necessary

To create a more effective and appealing visualization of the JSON output generated by the different courses usage of TTS tool.

How was it done

The statistics api is fetched and kept in variablestats, then matplotlib functions are used in the created python function pie_chart, bar_chart, line_chart, to create visually appealing and readable charts that represent the key (course_name):value(usage) pair effectively. After being generated, the chart figures are saved in the ./django/university directory. PS: the images reference were added to .gitignore.

How was it tested

This was tested in two ways, the 1st one by retrieving the stats information directly from the endpoint https://ni.fe.up.pt/tts/api/statistics/ and the 2nd by way of previously generated JSON files during the beginning of the UP’s Second Semester (usually one of the peak seasons in terms of TTS usage). In both of those cases the program ran successfully
and the charts were well built.

image

SergioEstevao11 commented 1 year ago

I fixed some small problems with your PR, you probably mistakenly had a submodule to the tts-be, the constants weren't declared using the regular Python way (all caps at the beginning of the file), you didn't include a valid example for the statistics, and I just added a folder so that the graphs would be saved in a specific place. Further from that the script worked as accordingly, gj!