JavaScript代写 | COMP3322B Modern Technologies on World Wide Web Assignment Two

本次JavaScript代写的主要内容是JS完成WEB端的数据分析报表展现

You are going to design and develop a Web app that displays the current weather condition of Hong Kong together with (1) temperature, rainfall, and air quality data of your current location, (2) temperature data of various districts in Hong Kong, and (3) 9-day weather forecast of Hong Kong. Your program retrieves data from various Open Data sources via the corresponding APIs. The Web app should be nicely rendered on mobile platforms and desktop computers.

Objectives

communication for retrieving Open Data, and (3) create dynamic contents.

Requirements

▪ Retrieve all Open Data datasets using AJAX XHR object or fetch().
▪ Extract required data from the Current Weather Report and 9-day Weather Forecast report

Current weather

Current weather icon Current temperature Current humidity Current rainfall Current UV index Current warning

Last update
District Temperatures Temp. of each district

Weather forecast

9-Day Forecast Forecast icon
Forecast date Forecast week Forecast temperatures

Forecast humidity

Current Weather Report API (WR)

WR.icon[0] //show the first one
WR.temperature.data[1].value //Hong Kong Observatory WR.humidity.data[0].value //show the first one WR.rainfall.data[13].max //Yau Tsim Mong WR.uvindex.data[0].value //could be missing //show the first one WR.warningMessage[ ] //could be missing //show the all warning messages
WR.updateTime
WR.temperature.data[0..N] //N could be changing from time to time WR.temperature.data[i].place, WR.temperature.data[i].value

9-day Weather Forecast API (WF)

WF.weatherForecast[0..8] WF.weatherForecast[i].ForecastIcon WF.weatherForecast[i].forecastDate WF.weatherForecast[i].week WF.weatherForecast[i].forecastMintemp, WF.weatherForecast[i].forecastMaxtemp WF.weatherForecast[i].forecastminrh, WF.weatherForecast[i].forecastmaxrh