Your code has one long loop that handles everything. I would consider splitting it into smaller functions that the main loop calls. For example, there could be a function for dealing with the request, parsing the data, building the graph, and sending the chart back to the main program. Your code works, this would just help clean it up a little.
Your code has one long loop that handles everything. I would consider splitting it into smaller functions that the main loop calls. For example, there could be a function for dealing with the request, parsing the data, building the graph, and sending the chart back to the main program. Your code works, this would just help clean it up a little.