Reference no: EM132847709
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.
E) Source Code:
Your finished application should contain the following files:
weather.html weather.js weather.jsonweatherschema.json styles.css
Copy your application files into a one folder. Name the folder (Task1). Submit the folder along with task1-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 Task1.
F) Version Control:
Version control, using GitHub, is a part of the overall mark for this assignment. This is a ‘core' web development skill. You will demonstrate that you have a working knowledge and consistent ability using a version control system.
Create a new PRIVATE repository on your Github account. Name this new repository (csym2019_assignment). Clone the repository to a suitable location on your computer.
Create a folder/directory named (Task1). Save/copy all the source code files (.html, .css, .js, .json) created for the this task (Task1) into the folder. Add the folder, and all the files in it, to the local git repository (csym2019_assignment). Push the files in local repository (csym2019_assignment) to the private repository on Github.
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.
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.
Save your Word document as task2-code-explanation.docx.
Sources of all code and code snippets must be cited in comments in the javascript code. Failure to do so will result in the element being awarded 0% mark.
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.
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.
Completing The Assignment:
This assignment must be completed and submitted electronically in the assignment point in NILE - BEFORE the course deadline for your class.
Begin your work early, as the assignment is a substantial task that requires planning and effort to complete satisfactorily.
Attachment:- Internet Programming Assignment.rar