Skip to content

This Progressive Web App (PWA) started as my final project for CEIS110 Intro to Programming where I used Python to pull NOAA weather data based on zipcode and date inputs. Instead of keeping it as just a command line program, I decided to turn it into something I could use on my phone. Since I don't know how to make phone apps I made it a PWA.

License

Notifications You must be signed in to change notification settings

jlahire/weather-pwa-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lahire Weather PWA v2.0 Project Ended

Table of Contents

Description

This Progressive Web App(PWA) is a revamp of a extension of my final project for CEIS110 Intro to Programming. The project involved using noaa_sdk and matplotlib to create a simple Python program that takes zipcode, country, and start/end date as parameters to pull weather data from NOAA sensors. After completing that project I attempted to take it a step further by making a app version of it for my phone. Because I do not know or have the time to learn how to create iOS/Android apps I opted for creating a PWA knowing it can be 'added to the home screen' as a sudo app.

My first attempt at this project got really complicated and I made the mistake of making changes to code without really keeping track of changes or documenting in the code. I think the part that really messed up the first attempt was that I took bits and pieces of code from suggestions online and just threw them into my code to try and resolve build issues.

For this attempt I spent about 8 hours reading/watching all the recources in Documents and Web Resources The plan this time is to build the PWA according to the recomended set up. I will attempt to use python where I can but wont compromise the project for it.

See the Wiki for the development process. I will make note all challenges and solutions found as well as all the people, documents and resources that helped me get this project started and running.

Code

  • Frontend:

    • HTML
    • CSS
    • JavaScript
    • Chart.js
  • Backend:

    • Python
    • NOAA SDK
  • Deployment:

    • Netlify
    • Netlify Functions
  • Configuration:

    • JSON
    • TOML
  • Documentation:

    • Markdown

API

Talks to NOAA sensors. It is really simple since this is just a personal project..

How?

Usage Status

/api/weather

Takes 3 inputs (zipcode, country, period) and returns weather stuff from NOAA.

input

// Basic fetch example
const response = await fetch(`/api/weather`, {
    method: 'POST',
    headers: {'Content-Type': 'application/json',},
    body: JSON.stringify({weatherStuff: {zipcode,country,period}})
});

return

Response Status

{resultsDiv.textContent = data.weatherData;
console.log('Temperature data:', data.temperatureData);
console.log('Humidity data:', data.humidityData);} 

errors

Error Handling

  • If you forget something: "Missing input"
  • If period isn't a number: "Period must be integer"
  • If something breaks: You'll get the specific error

Check out the Wiki if you want to see how I built and tested this.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

License: MIT

About

This Progressive Web App (PWA) started as my final project for CEIS110 Intro to Programming where I used Python to pull NOAA weather data based on zipcode and date inputs. Instead of keeping it as just a command line program, I decided to turn it into something I could use on my phone. Since I don't know how to make phone apps I made it a PWA.

Resources

License

Stars

Watchers

Forks