Closed Wallen-Ribeiro closed 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!
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 variable
stats
, then matplotlib functions are used in the created python functionpie_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 successfullyand the charts were well built.