Open an account from openweathermap.org. Save the file bottle_weather_H00_Kam.py Make sure to change it to your name. Change the apikey to your own API KEY from openweathermap.org (My API KEY IS...

Open an account from openweathermap.org.

Save the file bottle_weather_H00_Kam.py Make sure to change it to your name.


Change the apikey to your own API KEY from openweathermap.org (My API KEY IS b0906263b97835f4e5422443cc5606eb )


Run the script. You should see a Json (as a Python dictionary) of the weather of Dover. Temperatures are in Kelvin.


Google and learn how to extract the temperature and humidity field, if necessary.


The Json is for you to have the first-hand experience of data returned from openweathermap.org. There are many online Json viewer. Example: http://jsonviewer.stack.hu/


Modify the Python program so that it displays (NOTE: Do not display the Json)


current time and date


current temperature (round to 1 decimal places in Fahrenheit), and


humidity (round to 1 decimal places in percentage)






Suggestions of features of your web sites:






IMPORTANT: Include your name at the top of your web site!


Use Python, Javascript, Bottle and D3js. Avoid using any module unless it is a very popular standard module. Your project should be self-contained! If you need to use extra modules, see if you can incoporate the features on your own.


Have graphics, for examples: raining, suny, windy, snow, sunrise, sunset, feels like, .... Example: the info above each city is encloded in a bordered graphics element, the background changes depend on the weather


Select several cities in a large georgraphical area so you will be able to test the graphics for a variety of weather conditions.


Maps, charts, animations and other SVG elements


Buttons, dropboxes, links, UI etc.


Use of template files:






You MUST have the main bottle file: bottle_weather_H01_Jayson.py inside BottleWebApp. It should have none or very little Python code. See the Very Important First Step below.


You MUST have a template file: H01_Jayson_xxxxx.tpl inside BottleWebApp/views. It should be a mix of HTML tags and embedded Python codes. See the Very Important First Step below


You MUST have some image files (such as rain, snow, wind,...): H01_Jayson_xxxxx.jpg inside BottleWebApp/images. They may be jpg or png.


You MUST have one CSS file: H01_Jayson_xxxxx.css inside BottleWebApp/css.


You MAY have additional files: H01_Jayson_xxxxx.yyy inside appropriate folders of BottleWebApp


The description xxxxx in the filename is optional, make sure NOT to include spaces.


VERY IMPORTANT FIRST STEP!






Move all the Python code from your main bottle source code to to the template file. See Hands-on C1 to C4 and S2 in the tutorial!!!!!






File Submission:






You should have one single main file such as:


bottle_weather_H01_Jayson.py


inside


BottleWebApp folder


and additional files, make sure they should be named:


H01_Jayson_xxxxx.yyy


inside


BottleWebApp/views


BottleWebApp/images


BottleWebApp/css






etc.






H00_Xyz_main.py the main bottle python file (consists mainly of routes, no real python code!)






H00_Xyz_core.tpl the template (mix of HTML and Python, javascript) inside folder 'views'






H00_Xyz_abcde.jpg different images (PNG or JPG) inside folder 'images'






H00_Xyz_abcde.css optional XXXXXXXXXXinside folder 'css'






Any additional files should be names H00_Xyz_abcde.pqr if necessary.






You can freely name your files AS LONG AS they start with H00_Xyz_






OK to use buttons, forms, textfield, dropdown box, other UI elemens and associated javascripts for UI event handling in your web page.






OK to use d3.js for charts/graphs/svg






Avoid using other javascript






Your web site must have some pictures.






Try to have additional features: maps, charts,/histograms, forecasts, animations, search, links to useful sites, etc.




May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here