Inspiration

Originally, I was going to create an app specifically for the winter, and it told the user which body of water is closest to them and whether or not it's frozen and if it's safe for a person to walk on it. Being in Canada, I thought it would be a great idea, but once I started coding the logic, I couldn't figure out what to do. I lacked that knowledge, so I switched my idea to something that people can use as well. This web page would use the same API I was going to use in the original project, but this one takes in any location in the world and gives you the Air quality rating.

What it does

Takes in a city from the user, sends a request to a current weather API, and sends back an air quality report to the user.

How I built it

I started with my HTML and CSS code because that's what I'm most familiar with, and because of that with previous stuff that I have built, I added a lightweight JavaScript framework called particles.js (you can search that up and see the website I got the links from). After that, I started implementing the JavaScript to work with my frontend. Once that happened, I was done... easier said than done.

Challenges I ran into

THE API'S! I have tried using APIs before in the past to no avail, so I was scared signing up for this hackathon because I knew I would have to use one. But I bit the bullet and signed up. Once I had the front page set up, it was time to call the API, and this took me forever. I was having problems with it since I started on the frozen lake one, but after hours of reading the API documentation and following YouTube videos trying to find something that might help with my problems, I found some really good videos. Once that was solved, it was more CSS because that's my favorite thing to do, lol.

Accomplishments that am proud of:

  • Learning how to use APIs and then doing it myself.
  • Getting the whole page to work and then deploying a web page for the first time.

What I learned

  • How to structure HTML with semantics.
  • Learned how to better implement JavaScript with an HTML page.

What's next for air quality

After deployment, I paused the movie I was watching as I coded this project (The Batman) and opened it on my iPad. The page looked good on it. Then I opened it on my phone and realized that it's not as nicely adjusted to the screen size on my phone (iPhone 12) and also my friend's phones. So the next thing for this project would be to implement React to be more compatible on mobile.

Built With

Share this project:

Updates

Submission history