程序代写案例-CSE115

欢迎使用51辅导,51作业君孵化低价透明的学长辅导平台,服务保持优质,平均费用压低50%以上! 51fudao.top
CSE115 Project - Part 4
Front-end and Web server requirements
Submit a ZIP file of your repl in AutoLab as Project Part 4 by Fri. Dec. 3 at 5:00 PM. >This submission is worth 48 out of the project's 60 total points.
NOTE: You have a limited number (5) of AutoLab submissions. Use them wisely. Your
LAST submission counts.
Languages: JavaScript and Python
Topics: lists, dictionaries, loops, conditionals, reading CSV files, writing CSV files, HTML,
JavaScript front end, Bottle web server, JSON, AJAX (lectures up to and including April 9)
Overview
In this last part of the project you will put the pieces from earlier parts of the project to create a
fully functional web application. There are several pieces you need to complete; each is
relatively small, but you need to work incrementally to ensure that all the pieces work together in
the finished product.
If you did not quite complete the functions for parts 1, 2, and/or 3 keep working on them.
Remember that the bulk of the points come from your final project submission.
Your finished web application must be able to create three graphs. Two of these graphs will be
shown when loading the page; the third graph is created on demand. Because the CDC's
vaccine data is updated daily, the data your program downloads (and is then shown in your
graph) will change with time. Because I need to prepare this assignment well ahead of time,
your graphs will not be identical to those shown here (but should be similar). You can use
AutoLab to check your code for the first 3 parts. Downloading the CSV file your program saves
and then opening it in a spreadsheet application can help you verify your results.
The first graph you will need is a bar chart showing the most up-to-date results for the
percentage of a location's population that has been fully vaccinated:
The second graph is a pie chart showing the number of administered vaccines based upon the
vaccines manufacturer. As with the first graph, this should use the most recent data available.
While the data will be different, the graph should look something like this:
The third graph is a line graph showing the percentage of a location's population that has been
fully vaccinated (e.g., the values associated with 'series_complete_pop_pct') over time.
Unlike the first two graphs, this graph's data will be limited to a specific location and so will not
be generated when the page starts up, but is instead generated whenever the user clicks a
button. Use the strings associated with the 'date' key for your x values; as the image
below shows, Plot.ly is able to interpret them as dates:
Web server (Python)
Define your Bottle web server so it has five routes:
(1) The "/" must serve up the HTML file as a static file.
You may use any name you want for the remaining routes. Best practices encourage selecting
route names that are meaningful and descriptive within the context of the application.
(2) A route to serve up the JavaScript code file as a static file
(3) A route to serve up the bar chart data as a JSON blob
(4) A route to serve up the line graph data as a JSON blob
(5) A route to serve up the pie chart data a JSON blob
HTML file
You will need to write an HTML file for your application. Inside your HTML file's element,
it will need at least 2