Simple Weather Application using PyQT6 and API calls (from NWS and Geocode-xyz) with Python, supporting a few utility pages to display warnings and detailed weather information.
Simple Weather Application using PyQT6 and API calls (from NWS and Geocode-xyz) with Python, supporting a few utility pages to display warnings and detailed weather information.
simple project done! although i should’ve planned this better, taught me about how i should plan the methods to develop its system despite the low complexity of a weather application. i learned and got a little touch on SQL/relational database which is nice, and although i planned on designing this, i feel like QT is really weird with designing (with pure programming; i learned i really need to use QT designer next time.) and i gave in.
to use this, download the release in demos and UNZIP the file. then run the executable, and it should work off rip. you may have with providing a location.
if so, the location must be in the US, if you receive an error about “please wait one more second”, then just try again, one api i use has strict calling and it’s quite random.
next time i’m just gonna learn to make web apps using REACT/HTML/CSS since it’ll be more useful for later.
all the functionality is done! (i scrapped the encryption idea since it’s open source ;-;) history page takes snapshots once per day, the location you input in the welcome page is saved so you don’t have to reenter it all over again, (you can change in settings), and all the display’s good! really happy how it turned out, but now i’ve gotta decorate this and make it look neat :p i don’t know how QT is with designing, but i hope this last stretch will be fun to do!
Log in to leave a comment
finished reformatting my code for readability which made it way more organized! feeling pretty good. at the same time, i finished making the data save so that you don’t have to enter a new location anytime after the first time and loading times should be shorter. i also got started with sql databases to store a historical set of weather data based on snapshots (no machine learning unfortunately). although i’ve definitely gotta start encrypting some stuff.. lol
Log in to leave a comment
made the final scene (basically its layout) i needed to make for this weather app: a history of (30 snapshots) past weather data using SQL! in the background i have made most of the program to interpret SQL data and write to the database as well but i haven’t got that functionality working yet.
unfortunately though i think my code’s really clogged and needs an optimization (which’ll help with readability as well) so i’m going to start focusing on that and my next devlog should be a full fix of all bad code writing i’ve done :^)
Log in to leave a comment
added a new page to allow you to change your location if requested, or update the weather data (if outdated by a bit..). it’ll give you a message if successful or if there was an error.
Log in to leave a comment
you can now see weather alerts in the area you choose.
Log in to leave a comment
you can now see the detailed information/forecast for the next 7 days. the blue represents the precipitation chance, (if it fills the entire screen then it’s a 100% chance). i’ve also added cheeky messages to add some personality to the home page.
Log in to leave a comment
(no i do not live in this place.)
i’ve managed to get a part of visualizing the weather data to work! you can now see the weather at the current time (based hourly)! i’ll eventually add to update this page each time the user navigates to this page so that data can be updated accurately.
Log in to leave a comment
made the details scene which doesn’t really provide much detail ;-; but it’s something! time to work on the functionality by providing the real weather data. also made the menu buttons work
Log in to leave a comment
i changed which APIs to call: now using geocode & api.weather.gov from NOAA (i believe). i also created the home page with buttons that does show up on the left side of the screen if you click the menu button on the top left corner. i learned about QStackedLayout; a class that lets me stack widgets on top of each other consecutively and used it here to have multiple sets of widgets (i guess) go on at once. pyqt is hard
Log in to leave a comment
starting out the project was a lot of struggles, even though i had planned out a part of the project on paper by describing the layout/design. this was all caused by my need for a configuration file since i wanted to improve my readability with programs and create organization which caused me to get stuck for a while due to PyQT6’s limits (for ex. you can not call a QFontDatabase method until after QApplication is called else the program shuts down upon launch), but i have a config and a convention of programming that i will try to follow now! hope to do more.
Log in to leave a comment