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


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.


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


▪ 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[1].value //Hong Kong Observatory[0].value //show the first one[13].max //Yau Tsim Mong[0].value //could be missing //show the first one WR.warningMessage[ ] //could be missing //show the all warning messages
WR.updateTime[0..N] //N could be changing from time to time[i].place,[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