weatherstation's Introduction
Weather Station App Instructions This test is to create a simple application that can pull data from a web service and display it to the user, it should take no more than a couple of hours. API Using the Open Weather Map API (http://www.openweathermap.org/API) you can fetch data for cities around the world. Everything you need to know about how to call the service and what the data means is on that site. (API Key: feba8c4d24e095aa1ac915580a1b1c40) The problem Create a simple application that can show the user a selection of UK cities (London, Luton, Manchester and Birmingham). Allow the user to select a city, show the weather information for that city (using the API). You must display: Name of the city Location (longitude and latitude) The current weather conditions Icon for the weather conditions The temperate and temperature range The current atmospheric pressure The current humidity Implement the following features: Ability to sort the cities by temperature in ascending & descending order Ability to select any city and display the details as described above Once the data has been displayed the user should be able to pick another city if they choose. Design considerations Application of OO design best practises Demonstrate separation of concerns Well refactored code Code should be performant if scaled ===== Notes 1) Create an HTML framework. When the page is loaded the cities from which data can be viewed (London, Luton, Manchester and Birmingham) are displayed, together with an explanation to the user of how to proceed. These should be dynamically loaded so that they could potentially be changed in future. 2) Set up event listener for cities in list to display that city's weather when requested by user. Display the data in a new section appended to the city name so that all other cities are still visible and can be selected without the user needing to return to the home screen. 3) The display section will expand to deisplay the data. A second click on the city name will close the section, otherwisse it will remain open. An alternative would be to close other sections whnen one is activated. All of this is CSS driven. The data as to whether to open or close the section will come from a DOM query - not necessarily the best wy to do it, but acceptable in this instance. 4) Set up event listener for the sort functionality. This will need to make a fresh API call each time it is activated so that the data is fresh, particularly if we are dealing with values such as the current temperature. Also there needs to be a separate API call for each of the cities - maybe that suggests the call should be made at the start and the data held for when it is needed. 5) TODO: Put loading feedback to the user when an ajax request is in progress.
weatherstation's People
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.