Version 1.0 approved
Prepared by Frank Vanris, Conrad Nark, Stefana Ciustea
Bellevue College
Instructor: Gordon Gul
Course: CS410
4/16/2024
The goal for this software is to provide efficient and reliable data to the user for a given day in whether if it is going to snow or not in snoqualmie pass and how much possible snow accumulation for that given day could there be.
The main gist of this document is to explain and express how the design for this software will be handled and to explain how the user will be able to use our software efficiently and reliably.
Here are the given sources that were used to rely information for this document:
- https://nwac.us/data-portal/location/snoqualmie-pass/
- https://api.weather.gov/points/47.3923,-121.4001
- https://www.weather.gov/documentation/services-web-api
- https://www.weather.gov/wrh/timeseries?site=SNO30
- https://depts.washington.edu/mtnhydr/Pages/NewDataPages/Snoqualmie.html
- https://www.ibm.com/topics/knn#:~:text=The%20k%2Dnearest%20neighbors%20(KNN)%20algorithm%20is%20a%20non,used%20in%20machine%20learning%20today.
- https://randomresearchai.medium.com/how-to-make-a-knn-model-in-python-5f7625bc1ab
- KNN (K Nearest Neighbor: Machine learning algorithm)
- NN (Neural Networks: Machine learning algorithm)
- PD: Prediction Determinations
- DF: DataFrames (part of the pandas python library)
The goal of this software is to predict reliable data and information on a given day to the user when the user would like to know how snowy it could be on a given day. (For our time complexity a given day within 2-3 days ahead or a week).
We will be using a learning model known as KNN to predict on a given day how much snow will fall or whether if it is going to snow at all. We will only be sending the user the average of snow fall for that given day. Not snowfall during certain hourly time intervals.
As for where the user will be able to retrieve and see these predictions. They will find it within a website found on the web that we will be creating. A web server that will retrieve the data and our predictions, and present the information to the user.
Given architecture in how this will be designed is presented here in this image:
- Backend Developers:Conrad Nark, Frank Vanris
- Frontend Developers: Stefana Ciustea
We chose this architecture because it was easy to visualize it in a streamline scenario. We want to obtain the data then go through predictions then send the information to the user when they use the web server.
Some issues that could occur is that certain design paradigms within this structure could be removed. For example certain issues within data analysis for our software could contain discrepensies so the software structure could change to obtaining different data or to immediatly removing the complete set of data to something reliable and usable.
Functional Description
Description:
The system predicts snowfall using historical data and K-Nearest Neighbors (KNN) algorithm.
Description: Obtain a CSV file containing historical weather data (including snowfall records).
Description: Train a KNN model using the historical data to predict snowfall.
Description: Create a Python script that:- Takes input (e.g., date) from the user.
- Uses the trained KNN model to predict snowfall for the specified date.
- Sends the prediction to the React web server.
Description: A web server built with React that:
- Displays data to the user.
- Provides a search bar for querying specific information.
- Allows users to click a button to retrieve snowfall predictions.
Users can:
- Search for specific information (e.g., by date).
- Click a button to get snowfall predictions for the next day.
- View possible snow accumulation amounts.
- Function: LoadData()
Description: Loads historical weather data from a CSV file.
Input: Path to CSV file.
Output: Data structure containing the loaded data.
Local Data: CSV file path, data structure for storing weather data.
-
Function: TrainModel()
- Description: Trains the KNN model using historical weather data.
- Input: Historical weather data structure.
- Output: Trained KNN model.
- Local Data: KNN model parameters, training dataset.
- Description: Trains the KNN model using historical weather data.
-
Function: PredictSnowfall()
- Description: Predicts snowfall using the trained KNN model.
- Input: Date for prediction, trained KNN model.
- Output: Snowfall prediction result.
- Local Data: Date, prediction result.
- Description: Predicts snowfall using the trained KNN model.
-
Function: GetUserInput()
- Description: Takes date input from the user.
- Input: None.
- Output: User-specified date.
- Local Data: User input date.
- Description: Takes date input from the user.
-
Function: SendPrediction()
- Description: Sends the snowfall prediction to the React web server.
- Input: Snowfall prediction result.
- Output: None.
- Local Data: Web server endpoint, prediction data.
- Description: Sends the snowfall prediction to the React web server.
-
Function: DisplayData()
- Description: Displays data to the user on the web interface.
- Input: Data to be displayed.
- Output: None.
- Local Data: Data to display.
- Description: Displays data to the user on the web interface.
-
Function: SearchData()
- Description: Provides a search bar for querying specific information.
- Input: Search query.
- Output: Search results.
- Local Data: Search query, search results.
- Description: Provides a search bar for querying specific information.
-
Function: RetrievePrediction()
- Description: Allows users to click a button to retrieve snowfall predictions.
- Input: None.
- Output: Snowfall prediction for the next day.
- Local Data: Prediction result.
- Description: Allows users to click a button to retrieve snowfall predictions.
-
Function: SearchInformation()
- Description: Enables users to search for specific information by date.
- Input: Date query.
- Output: Information for the specified date.
- Local Data: Date query, search results.
- Description: Enables users to search for specific information by date.
-
Function: GetNextDayPrediction()
- Description: Allows users to get snowfall predictions for the next day.
- Input: None.
- Output: Snowfall prediction for the next day.
- Local Data: Prediction result.
- Description: Allows users to get snowfall predictions for the next day.
-
Function: ViewAccumulation()
- Description: Displays possible snow accumulation amounts to the user.
- Input: None.
- Output: Snow accumulation data.
- Local Data: Accumulation data.
- Description: Displays possible snow accumulation amounts to the user.
When a user opens the site, they will see a screen with a search bar and the logo to the left of it. The main focus for the user will be the central button labeled "Get Forecast." Clicking this button will open a new screen displaying the forecast for the upcoming days in a given week (with a range of 2-3 days for prediction). Each day's forecast will include predictions for whether it will snow or not. An icon on the screen will indicate if snow is expected or if another type of weather event is forecasted. If snow is predicted, the screen will also display information on how much snow is expected to accumulate over a 24-hour period.
In the search tab, users can look up information specific to Snoqualmie Pass. All search queries in the search bar will be limited to Snoqualmie Pass. The primary focus of the site is to predict snowfall at the Snoqualmie Pass summit. Users can search for information such as temperature, humidity, and more within the search bar.
Table shows which system components satisfy each of the functional requirements from the SRS. In order to refer to the functional requirements, we assign them some numbers/codes in the SRS.
Requirement-ID | Requirement Description | Design Development | Data Design Component | Interface Design Component |
---|---|---|---|---|
R1 | The system should be able to load historical weather data from Snoqualmie Pass | Component: Data Collection | LoadData() function | N/A |
R2 | The system should train a KNN model using historical weather data from Snoqualmie Pass | Component: Prediction Model | TrainModel() function, PredictSnowfall() function | N/A |
R3 | The system should provide a web interface for users | N/A | GetUserInput() function, SendPrediction() function, SearchData() function, SearchInformation() function | Component: React Web Server, Component: Python Script |
R4 | The system should display snowfall predictions for the next day when users click the Get Forecast button | N/A | PredictSnowfall() function, DisplayData() function, RetrievePrediction() function, GetNextDayPrediction() function, ViewAccumulation() function | Component: User Interaction |