Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
699f023
starting our peer agreement
theLP100 Dec 5, 2022
a4ce73e
finished our team checkin
theLP100 Dec 5, 2022
3305a2f
Wave 1 skeleton
Jessicaenvisions Dec 7, 2022
8d6cf80
Modifed index.html connector
Jessicaenvisions Dec 7, 2022
d926711
added script tag
theLP100 Dec 7, 2022
fe687b1
trying stuff
theLP100 Dec 7, 2022
f290d63
fixed index
theLP100 Dec 7, 2022
fad83af
Modifed the HTML, CSS, and other connections working
Jessicaenvisions Dec 7, 2022
d86fb64
Modifed small errors in the HTML.
Jessicaenvisions Dec 7, 2022
f14298e
attaching axios , more debugging
theLP100 Dec 7, 2022
a738085
Fixed errors
Jessicaenvisions Dec 7, 2022
2e179be
added a .env file with my api key in it.tried to connect to that api …
theLP100 Dec 7, 2022
9680f9d
Merge branch 'main' of https://github.com/Jessicaenvisions/weather-re…
theLP100 Dec 7, 2022
9ea7643
Modifed packages
Jessicaenvisions Dec 7, 2022
e18e933
Merge branch 'main' of https://github.com/Jessicaenvisions/weather-re…
Jessicaenvisions Dec 7, 2022
263aca1
Modifed some of the HTML
Jessicaenvisions Dec 7, 2022
6527700
Modifed some HTML
Jessicaenvisions Dec 8, 2022
f98f8c6
sketching out the layout
theLP100 Dec 8, 2022
dd1b5b9
FInshed HTML presentation
Jessicaenvisions Dec 8, 2022
f893db6
adding some useful links
theLP100 Dec 8, 2022
dc93e48
got axios call to weather report working woooooo
theLP100 Dec 12, 2022
10ff7f0
got the temp returned woo
theLP100 Dec 12, 2022
bfaddcd
Got the tempature to show up
Jessicaenvisions Dec 12, 2022
d36da95
made the conversion to farenheit in the code. rounded the number down.
theLP100 Dec 12, 2022
d2e3a41
Worked on wave 2, stuck on making tempature increase
Jessicaenvisions Dec 12, 2022
44aadf2
trying to make await work, putting in our tries
theLP100 Dec 12, 2022
f8f5262
Modifed most of the waves
Jessicaenvisions Dec 12, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.vscode
.DS_Store
node_modules
.cache
.cache
.env
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# Weather Report

## Team Plan

* Access needs
* No working on the weekend!
* defined end times <3
* Let's aim for submission deadline of next Wednesday
* don't work on it on your own. let's work on it together.
* Your learning style
* if one person doesn't get it, the other person shouldn't move on without their partner.
* instead, we should work together until everyone understands before moving on.
* J: hands-on learning, speaking out loud the problem, diagrams are useful, knowing the why of why we're doing something
* L: hands-on learning, knowing the why, speaking out loud the problem, sometimes I need to be slow about understanding it and need to get it before moving on.
* How you prefer to receive feedback
* J: always constructive, don't take it personal, let me know if there's something I'm doing that's not working for you
* L: direct, timely, let me know if there's something I'm doing that's not working for you
* One team communication skill you want to improve with this experience
* making a plan up front for what works (which we're doing)
* put your seatbelt on
* time management!


## Skills Assessed

- Following directions and reading comprehension
Expand Down
3 changes: 3 additions & 0 deletions ada-project-docs/useful links we found
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
https://api.openweathermap.org/data/2.5/weather this is where to call the api

here is the documentation website for open weather: https://openweathermap.org/current
34 changes: 33 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,41 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="styles/index.css" rel="stylesheet">
<!-- <link href="./node_modules/axios/dist/axios.min.js" rel="axios"> -->
<title>Weather Report</title>
</head>
<body>
<main class="grid-container" >
<section class="grid-item" id = "blue section">
<h1> Weather App </h1>
<!-- Box for the garden-->
<!-- Photos for the weather change -->
</section>
<section class="grid-item" id = "pink section">
<p> Weather for the city of Seattle</p>
<!-- City text (part to change name)-->
<!--the temperature number-->
<button id="Up">⇧</button>

<p id="temperaturenumber">temp</p>
<button id="down">⇩</button>

</section>

</main>
<!-- Weather -->
<!-- Weather app /header -->


<!-- Add the grid -->
<!-- Add the buttons -->

<!-- -->


<script src="./node_modules/axios/dist/axios.min.js"></script>
<script src="src/index.js"></script>
</body>
</html>
</html>

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"dependencies": {
"axios": "^0.27.2"
"axios": "^1.2.1",
"dotenv": "^16.0.3",
"node": "^19.2.0"
}
}
62 changes: 62 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
//const axios = require('axios');
//const dotenv = require('dotenv').config();
//const API_KEY = process.env.API_KEY;

('use strict');
//call to the flask app to get weather
const lat = 47.6038321;
const lon = -122.330062;

//later, change
axios
.get('http://127.0.0.1:5000/weather' + '?lat=' + lat + '&lon=' + lon)
.then((response) => {
var temp = response.data.main.temp;
temp = Math.round(((temp - 273.15) * 9) / 5 + 32); //convert to Farenheit
console.log(temp);
const appearanceHeading = document.getElementById('temperaturenumber');
appearanceHeading.textContent = temp + ' °F';
});

const state = {
tempCount: temp,
};

// adding temperature number
// async function f() {
// let promise = new

// async function addTemp(event) {
// state.tempCount += 1;
// }

const addTemp = (event) => {
state.tempCount += 1;
};

const registerEventHandlers = (event) => {
// console.log('in registerEventHandelers:', event);
const upButton = document.querySelector('#Up');
upButton.addEventListener('click', addtemp);
};

async function get_temp(query) {
let response = await axios.get;
}

// const getPromise = (time) => {
// const timeoutTime = time * 1000;
// const myPromise = new Promise((resolve, reject) => {
// setTimeout(() => resolve("It's go time!"), timeoutTime);
// });
// return myPromise;
// };

// state.tempCount += 1;
// const bookCountContainer = document.querySelector("#bookCount");
// bookCountContainer.textContent = `Book Count: ${state.bookCount}`;
// };

//registering event handler

//if loading,
17 changes: 17 additions & 0 deletions styles/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.grid-container {
display: grid;
grid-template-columns: auto auto auto;
background-color: #2196F3;
padding: 10px;
}
.grid-item {
background-color: rgba(255, 255, 255, 0.8);
border: 1px solid rgba(0, 0, 0, 0.8);
padding: 20px;
font-size: 30px;
text-align: center;
}

button {
font-size: x-large;
}
1 change: 1 addition & 0 deletions weather-report-proxy-server
Submodule weather-report-proxy-server added at ea5dd1
41 changes: 32 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ asynckit@^0.4.0:
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==

axios@^0.27.2:
version "0.27.2"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.27.2.tgz#207658cc8621606e586c85db4b41a750e756d972"
integrity sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==
axios@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/axios/-/axios-1.2.1.tgz#44cf04a3c9f0c2252ebd85975361c026cb9f864a"
integrity sha512-I88cFiGu9ryt/tfVEi4kX2SITsvDddTajXTOFmt2uK1ZVA8LytjtdeyefdQWEf5PU8w+4SSJDoYnggflB5tW4A==
dependencies:
follow-redirects "^1.14.9"
follow-redirects "^1.15.0"
form-data "^4.0.0"
proxy-from-env "^1.1.0"

combined-stream@^1.0.8:
version "1.0.8"
Expand All @@ -27,10 +28,15 @@ delayed-stream@~1.0.0:
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk=

follow-redirects@^1.14.9:
version "1.15.0"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.0.tgz#06441868281c86d0dda4ad8bdaead2d02dca89d4"
integrity sha512-aExlJShTV4qOUOL7yF1U5tvLCB0xQuudbf6toyYA0E/acBNw71mvjFTnLaRp50aQaYocMR0a/RMMBIHeZnGyjQ==
dotenv@^16.0.3:
version "16.0.3"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.0.3.tgz#115aec42bac5053db3c456db30cc243a5a836a07"
integrity sha512-7GO6HghkA5fYG9TYnNxi14/7K9f5occMlp3zXAuSxn7CKCxt9xbNWG7yF8hTCSUchlfWSe3uLmlPfigevRItzQ==

follow-redirects@^1.15.0:
version "1.15.2"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13"
integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==

form-data@^4.0.0:
version "4.0.0"
Expand All @@ -52,3 +58,20 @@ mime-types@^2.1.12:
integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==
dependencies:
mime-db "1.52.0"

node-bin-setup@^1.0.0:
version "1.1.3"
resolved "https://registry.yarnpkg.com/node-bin-setup/-/node-bin-setup-1.1.3.tgz#d45d5220e3b2ecc3a94263a56116f727f6c1bb14"
integrity sha512-opgw9iSCAzT2+6wJOETCpeRYAQxSopqQ2z+N6BXwIMsQQ7Zj5M8MaafQY8JMlolRR6R1UXg2WmhKp0p9lSOivg==

node@^19.2.0:
version "19.2.0"
resolved "https://registry.yarnpkg.com/node/-/node-19.2.0.tgz#f377e046002065fd1a9a23dd7bffc8026be77847"
integrity sha512-ETicZqrcApHCufk8L7HCO6eUe6HmZFN3YmAklYdETyp8Gi10UZGFvVJ/AvihE9i5CueXsebEP/7DgFKjohHXHw==
dependencies:
node-bin-setup "^1.0.0"

proxy-from-env@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2"
integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==