From d225ac5160bc5d9e7e89a98a1624bf49c96525ea Mon Sep 17 00:00:00 2001 From: Lily Date: Tue, 14 May 2024 14:51:18 -0700 Subject: [PATCH 01/22] Update home.html --- templates/home.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/templates/home.html b/templates/home.html index 263097a..59a52f5 100644 --- a/templates/home.html +++ b/templates/home.html @@ -6,6 +6,13 @@ Weather + +

Otter Weather

From de4559c5ee47eb0668fda779e56f1780c909695c Mon Sep 17 00:00:00 2001 From: Lily Date: Tue, 14 May 2024 14:52:18 -0700 Subject: [PATCH 02/22] Update home.html --- templates/home.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/home.html b/templates/home.html index 59a52f5..8aac638 100644 --- a/templates/home.html +++ b/templates/home.html @@ -22,4 +22,4 @@

Otter Weather

- + \ No newline at end of file From dc6210f28da2bd04c2102bdba34648bebd1e8d4a Mon Sep 17 00:00:00 2001 From: Lily Date: Wed, 15 May 2024 12:54:56 -0700 Subject: [PATCH 03/22] finalized --- __pycache__/weather.cpython-312.pyc | Bin 2316 -> 2316 bytes templates/Weather_Details.html | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/__pycache__/weather.cpython-312.pyc b/__pycache__/weather.cpython-312.pyc index 4fb88ae0d28a2d242fb000e2480ff8d283d719c7..5b5bc91a6ef32881ae14a49da5af95597ff3fbc3 100644 GIT binary patch delta 19 ZcmeAX>Jj2P&CAQh00dTdH*zs?0st%~1QP%N delta 19 YcmeAX>Jj2P&CAQh00ffV8@ZS`0V&1 diff --git a/templates/Weather_Details.html b/templates/Weather_Details.html index 6f068ab..bd3a3a6 100644 --- a/templates/Weather_Details.html +++ b/templates/Weather_Details.html @@ -64,9 +64,9 @@

Weather in {{city_name}}

Wind Speed:

{{weatherdata['wind']['speed'] | round(2)}}m/s or {{((weatherdata['wind']['speed']) * 2.23694) | round(2)}}mpH

+

Weather Condition: {weather_condition}

--> - + {% endif %} From 2c5162cbf28ce6bf03967013d295f15335ba598a Mon Sep 17 00:00:00 2001 From: Lily Date: Wed, 15 May 2024 12:55:40 -0700 Subject: [PATCH 04/22] Finalized --- __pycache__/weather.cpython-312.pyc | Bin 2316 -> 2316 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/__pycache__/weather.cpython-312.pyc b/__pycache__/weather.cpython-312.pyc index 5b5bc91a6ef32881ae14a49da5af95597ff3fbc3..301cc9e5b0bfa2b95b7c47cdc5a9e6eaf366a15b 100644 GIT binary patch delta 20 ZcmeAX>Jj2T&CAQh00g?it{b@-IRPui1A+hm delta 20 acmeAX>Jj2T&CAQh00dTdoi}nbasmJ_(*#!l From 426d3ef7aab1f145ed6bd592b7f9818ccfb7ddaa Mon Sep 17 00:00:00 2001 From: Lily Date: Wed, 15 May 2024 13:01:38 -0700 Subject: [PATCH 05/22] Update weather.cpython-312.pyc --- __pycache__/weather.cpython-312.pyc | Bin 2316 -> 2376 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/__pycache__/weather.cpython-312.pyc b/__pycache__/weather.cpython-312.pyc index 301cc9e5b0bfa2b95b7c47cdc5a9e6eaf366a15b..e12ed72c746f520c83a29228532965ea1cc34944 100644 GIT binary patch delta 117 zcmeAXIw8b+nwOW00SML!yQaO}$jigX*g9E?(bL)%0=V20lTsBD^HLNXi*kWfzCvz( zaY;_4LV12sc4~@3ex5=}MrN@>L1jq>ke!y9ld7;eiE$+(qr_$&=6TGF@|#z)J!E8M NXJq*h)FZ@unwOW00SI)3UDMWXz~*0GQGbU;qFB From d9b7d16cc2a3a2a094a7f55173cc7cae8462590c Mon Sep 17 00:00:00 2001 From: Lily Date: Wed, 15 May 2024 13:17:39 -0700 Subject: [PATCH 06/22] final update gabe helped --- static/images/weather_icon.png | Bin 837 -> 1869 bytes templates/Weather_Details.html | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/static/images/weather_icon.png b/static/images/weather_icon.png index ef2e9f7f955fe1b8da7f30e9ae15b2f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nSS@&D)_%NIk|4T4_J+*#M6StR z3XkW!-hOm`)w-jc2O^)>u}wXt_&S@(ww}j=d5uoi2PNj2A*FZzg(b*u&C$+!ut!|{ z@TQ-73ET$ybqc>4;}2x?$4Pw=p21qP?)$e*dU}1Ve#e|I8zwkjz2V#0D%c~Lvg(aq z|KzG2J4^PrtX{9{%JWLrgX6KN!PQC`{`XxHSBxhVsNM;^WMFqB`pCn3Uiu%5=7ry> zWZP8F9x>y%o5c(co6hG#kM16iKH&Ob( zQ=DS@ai_-T_q(3HVc&53F;}g_J$}oU* Weather in {{city_name}}

Wind Speed:

{{weatherdata['wind']['speed'] | round(2)}}m/s or {{((weatherdata['wind']['speed']) * 2.23694) | round(2)}}mpH

-

Humidity{humidity}

-

Weather Condition: {weather_condition}

+

Humidity: {{weatherdata['main']['humidity']}}g/kg^-1

+

Weather Condition: {{weatherdata['weather'][0]['description']}}

{% if temp_celsius < 0 %} +
diff --git a/templates/detailStyle.css b/templates/detailStyle.css index c2e3fd3..bf36f0a 100644 --- a/templates/detailStyle.css +++ b/templates/detailStyle.css @@ -1,5 +1,7 @@ /* CSS file created 05/13/2024 - Liliana R. Saavedra credits: Codehal on YouTube +This CSS file was meant to be an extension to the current details page, and +would add functionality to the Parallax effect we wanted to add. */ @import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); /* { @@ -10,7 +12,7 @@ credits: Codehal on YouTube } */ body{ - background: #b40a0a; + background: #02ff24; } .parallax-1{ background-image: url('/templates/hot.jpg'); diff --git a/templates/home.html b/templates/home.html index 0064be1..b5b0868 100644 --- a/templates/home.html +++ b/templates/home.html @@ -7,12 +7,10 @@ Weather From 0562c8632b970097eb0a78169b0806b0e423ccf5 Mon Sep 17 00:00:00 2001 From: gabe-tommi <54484570+gabe-tommi@users.noreply.github.com> Date: Wed, 15 May 2024 13:36:11 -0700 Subject: [PATCH 15/22] Update weather.py --- weather.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/weather.py b/weather.py index 5b4630b..579cc50 100644 --- a/weather.py +++ b/weather.py @@ -28,6 +28,8 @@ def homepage(): global city_name city_name = request.form.get('citytxtbox') return render_template('home.html', city_name = city_name) + # Defines the route to homepage, intakes city name via form in html named citytxtbox - Gabe + @app.route('/details') @@ -40,7 +42,7 @@ def link(): # route to details page # geo test endpoint: # https://api.openweathermap.org/geo/1.0/direct?q=Monterey&limit=1&appid=77b4df041ddc47e427d8799ea237cb80 - # retrieves longitude and latitude from GeoEncoder API + # retrieves longitude and latitude from GeoEncoder API - Gabe try: greq = requests.get(geo_endpoint) geodata = greq.json() @@ -54,7 +56,7 @@ def link(): # route to details page weather_endpoint = f"https://api.openweathermap.org/data/2.5/weather?lat={lat}&lon={lon}&appid={my_key}" # weather test endpoint # https://api.openweathermap.org/data/2.5/weather?lat=36.600256&lon=-121.8946388&appid=77b4df041ddc47e427d8799ea237cb80 - # retrieves the weather data to be displayed on details page + # retrieves the weather data to be displayed on details page - Gabe try: wreq = requests.get(weather_endpoint) weatherdata = wreq.json() From e64b9f4f3e113c08e978a26567f4b82a04e45c2f Mon Sep 17 00:00:00 2001 From: gabe-tommi <54484570+gabe-tommi@users.noreply.github.com> Date: Wed, 15 May 2024 13:36:52 -0700 Subject: [PATCH 16/22] Update weather.py --- weather.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/weather.py b/weather.py index 579cc50..f415f77 100644 --- a/weather.py +++ b/weather.py @@ -28,7 +28,7 @@ def homepage(): global city_name city_name = request.form.get('citytxtbox') return render_template('home.html', city_name = city_name) - # Defines the route to homepage, intakes city name via form in html named citytxtbox - Gabe + # Defines the route to homepage, intakes city name via form in html named citytxtbox @@ -42,7 +42,7 @@ def link(): # route to details page # geo test endpoint: # https://api.openweathermap.org/geo/1.0/direct?q=Monterey&limit=1&appid=77b4df041ddc47e427d8799ea237cb80 - # retrieves longitude and latitude from GeoEncoder API - Gabe + # retrieves longitude and latitude from GeoEncoder API try: greq = requests.get(geo_endpoint) geodata = greq.json() @@ -56,7 +56,7 @@ def link(): # route to details page weather_endpoint = f"https://api.openweathermap.org/data/2.5/weather?lat={lat}&lon={lon}&appid={my_key}" # weather test endpoint # https://api.openweathermap.org/data/2.5/weather?lat=36.600256&lon=-121.8946388&appid=77b4df041ddc47e427d8799ea237cb80 - # retrieves the weather data to be displayed on details page - Gabe + # retrieves the weather data to be displayed on details page try: wreq = requests.get(weather_endpoint) weatherdata = wreq.json() From 1fd0007f7d4f2ce52f6085ee4fb990001eb4a23d Mon Sep 17 00:00:00 2001 From: Wei-HaiMing <152235816+Wei-HaiMing@users.noreply.github.com> Date: Wed, 15 May 2024 13:41:32 -0700 Subject: [PATCH 17/22] Update weather.py --- weather.py | 1 + 1 file changed, 1 insertion(+) diff --git a/weather.py b/weather.py index f415f77..9ae630c 100644 --- a/weather.py +++ b/weather.py @@ -4,6 +4,7 @@ Date: 05/14/2024 Summary: Runs a flask app that allows for the user to enter in a city name and brings a second page with some weather information of that city currently. +GitHub Link: https://github.com/Wei-HaiMing/WeatherProject ======= Gabe and Armando mostly worked on this python file """ From 2a4d5a78792d212c99cffb482a7b10da91f90927 Mon Sep 17 00:00:00 2001 From: Wei-HaiMing <152235816+Wei-HaiMing@users.noreply.github.com> Date: Wed, 15 May 2024 13:45:28 -0700 Subject: [PATCH 18/22] Update weather.py --- weather.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/weather.py b/weather.py index 9ae630c..75f6138 100644 --- a/weather.py +++ b/weather.py @@ -7,6 +7,11 @@ GitHub Link: https://github.com/Wei-HaiMing/WeatherProject ======= Gabe and Armando mostly worked on this python file +Armando: I worked on understanding the parameters that the API we used +and how to retrieve the correct information in order for city name +searches to function properly. Also retrieved and displayed weather +icon on the weather details page. I attempted to retrieve a map from the +API, but was unsuccessful. """ from flask import Flask, render_template, request, redirect from PIL import Image From 6a4d87301fedcd3ff81ecbce5789685c1556736e Mon Sep 17 00:00:00 2001 From: Lily <166453858+Liliana-Saavedra@users.noreply.github.com> Date: Wed, 15 May 2024 13:46:39 -0700 Subject: [PATCH 19/22] Update Weather_Details.html --- templates/Weather_Details.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/Weather_Details.html b/templates/Weather_Details.html index 180a910..bfbda21 100644 --- a/templates/Weather_Details.html +++ b/templates/Weather_Details.html @@ -1,4 +1,4 @@ - + From ea6deba5207f6f9be777b2b2e5603cd9b35bf658 Mon Sep 17 00:00:00 2001 From: gabe-tommi <54484570+gabe-tommi@users.noreply.github.com> Date: Wed, 15 May 2024 13:47:34 -0700 Subject: [PATCH 20/22] Update weather.py --- weather.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/weather.py b/weather.py index 75f6138..7a333f5 100644 --- a/weather.py +++ b/weather.py @@ -12,6 +12,11 @@ searches to function properly. Also retrieved and displayed weather icon on the weather details page. I attempted to retrieve a map from the API, but was unsuccessful. + +Gabe: Coded app routes to each individual page. Took Armando's initial json and request code, and added functionality and test endpoints +for each individual data dump. Coded the form in home route such that it returned a string that was the user city search input. +Keying, API access and research in these aspects were done by Armando, and I built upon them by looking into json dumps and coding HTML +to display data from the requests. Added longitude and latitude data access directly for convenience. """ from flask import Flask, render_template, request, redirect from PIL import Image From 82465b2361ff6b414aa81873ea19a3cb591f5648 Mon Sep 17 00:00:00 2001 From: gabe-tommi <54484570+gabe-tommi@users.noreply.github.com> Date: Wed, 15 May 2024 13:50:46 -0700 Subject: [PATCH 21/22] Update Weather_Details.html --- templates/Weather_Details.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/templates/Weather_Details.html b/templates/Weather_Details.html index bfbda21..3e3c148 100644 --- a/templates/Weather_Details.html +++ b/templates/Weather_Details.html @@ -1,4 +1,6 @@ + From 71bbce4707f722e6b46200b05175199b77046bb0 Mon Sep 17 00:00:00 2001 From: gabe-tommi <54484570+gabe-tommi@users.noreply.github.com> Date: Wed, 15 May 2024 13:51:38 -0700 Subject: [PATCH 22/22] Update home.html --- templates/home.html | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/home.html b/templates/home.html index 33cd610..8f404de 100644 --- a/templates/home.html +++ b/templates/home.html @@ -1,4 +1,5 @@ +