author: mssm
2026-06-14
author: mssm
This application is a simple weather prediction App based on temperature (°C), humidity (%) and cloud cover (%).
The result depends on the variation of each variable.
To generate a weather prediction, three steps are followed:
Adjust the sliders to set the temperature, humidity and cloud cover values.
The selected conditions are evaluated according to predefined weather rules.
Finally, a weather prediction is displayed instantly and updates automatically whenever a value changes.
The weather prediction is determined according to the following rules:
Considering the following input values: - Humidity = 90% - Cloud cover = 50% - Temperature = 20°C
if (input$humidity > 80) {
"Rainy 🌧️"
} else if (input$cloud > 70) {
"Cloudy ☁️"
} else if (input$temp > 25) {
"Sunny ☀️"
} else {
"Partly Cloudy ⛅"
}
Since the humidity exceeds 80%, he first condition in the code is satisfiedand the condition is classified as “Rainy 🌧”.
Therefore, the output generated by the application would be: “Rainy🌧”.
The Weather Prediction App illustrates the core feature of Shiny, including user input widgets, server calculations, and reactive outputs.
Based on the selected weather conditions, the application generates an instant forecast in a simple and interactive way.