Reference no: EM132900551
CSYM019 Internet Programming - University of Northampton
Outline:
You will create two small-scale UK weather information applications. For the first application, you will start by creating a JSON data file capable of holding UK weather summary data.
You will then use javascript to extract data from your JSON data file, and to process and display the data in HTML format. For the second weather application, you will use javascript to access and query current UK weather conditions from a weather data API. You will then display the resultant data in HTML format.
Assignment Specifications:
Task 1 - Create a Current Weather Application
A) JSON:
Create a JSON file (weather.json) with a structure capable of holding current weather data for cities across the UK. The file should be capable of holding the following data:
city id city name
current conditions temperature
wind speed wind direction wind chill factor
B) JSON Schema:
Create a JSON schema (weatherschema.json) against which weather data from the file (weather.json) can be validated. The schema should enforce realistic data types and restrictions for each data element.
Add dummy weather data for several UK cities to the file (weather.json). The data you add should validate against the schema provided in the file (weatherschema.json).
C) Javascript and HTML:
Create a script (weather.js) that will extract data from the file (weather.json), and insert it in a HTML page (weather.html) in table format. The data should automatically update at a realistic pre-set interval. This should be achieved using a setTimeout method. The produced HTML should be formatted to professional standard using CSS.
Also, include a weather icon (provided) for each city weather report.
D) Code Explanation:
Copy your code to a Word document. Annotate each line of the code with a full explanation of what the code does. This includes variables, methods, structural constructs (e.g. conditionals), etc.
Task 2 - Create a Weather Application based on API Data
A) The API:
To build the UK weather application for this part of the assignment, you will use the OpenWeatherMap API. To use this API you will first need to register and get yourself an API key. There are detailed instructions on the OpenWeatherMap API help page on how to work with the API (e.g. how to create a request URL).
B) The Application:
In this application, users should be able to choose a UK country (England, Scotland, Wales, or Northern Ireland) from a menu on a HTML page. Depending on which country the user chooses, corresponding city name data for the chosen country should be dynamically loaded into a second menu. The user should then be able to select a city name from the second menu. Upon selection, the weather for the selected city should be retrieved from the API, and displayed as HTML.
UK city data for the menus is provided in the resources folder in on NILE. The following weather data items should be displayed for a selected city:
City name Date
Weather conditions Temperature
Wind speed Wind direction Weather icon.
The following display requirements should apply:
1) Temperature must be displayed in Celsius and Fahrenheit. If the temperature is above 35°C or below -5°C, a severe weather warning must be issued.
2) Wind speed must be displayed in miles-per-hour and kilometres per hour. If the wind speed is greater than 50mph (80.47kph), a severe weather warning must be issued.
3) Wind direction must be displayed as a degree (e.g. 90°) and as a textual description (e.g. Southerly, South Westerly, Westerly, etc.).
4) The date must be displayed in standard date format (e.g. DD-MM-YYYY). Presentation of the application must be to professional standard.
C) Code Explanation:
Copy your code to a Word document. Annotate each line of the code with a full explanation of what the code does. This includes variables, methods, structural constructs (e.g. conditionals), etc.
D) Source Code:
Your finished application should contain the following files:
apiweather.html apiweather.js styles.css
england-cities.html scotland-cities.html wales-cities.html nireland-cities.html
Copy your application files into a one folder. Name the folder (Task2). Submit the folder along with task2-code-explanation.docx to the assignment point in the NILE page (see the section Submission Procedure). Failure to submit your files in NILE will mean that your assignment may be awarded 0% for Task2.
F) Version Control:
Create a folder/directory named (Task2). Save/copy all the source code files
(.html, .css, .js, .json) created for the this task (Task2) into the folder. Add the folder, and all the files in it, to the local git repository (csym2019_assignment), which you created in Task1. Push the files in local repository (csym2019_assignment) to the same Github private repository (csym2019_assignment) that you created in Task1.
You must regularly push the files to your PRIVATE repository throughout the development. You must include meaningful commit messages every time you commit to your local repository.
You MUST NOT push the assignment files to a public repository.
E) Video Demonstration:
In addition to the source code and the explanation of the code, you must submit a video demo (URL) of your assignment. The demo should be about 15 minutes long (maximum:20 minutes) and should cover all of your work in a logical way. You should explain the implementation of the two tasks covering the main fragments of your code. Your voice needs to be clear for the marker to hear. It should also include a walk through of using the two applications and must demonstrate the key features. The module tutor reserves the right to invite you for an online viva-voce. Poor demo/viva could negatively influence other sections in the marking criteria.
Attachment:- Internet Programming.rar