Hello, I'm new to the world of programming and would greatly appreciate any guidance and assistance. 😊
Currently, we are working on sorting some data by buckets (in this case, days of the month) to create smaller datasets like the example below:
export const Weather = [
{
city: "STL",
month: "july",
daysbucket: "1 to 10",
percentages: {
sunny: "45.5",
rainy: "20.5",
cloudy: "10.8",
partlycloudy: "23.2",
},
},
I am wondering if there is a more efficient method than using strings like daysbucket: "1 to 10"
.
The goal is to conduct forecast simulations using a probability function based on past weather data for specific days without needing to list out percentages for each day of the month. My current plan involves determining the day of the month and utilizing conditional statements to categorize it into ranges such as 1-10, 11-20, etc. However, before proceeding further, I wanted to explore potential better approaches. I have multiple datasets with various bucket categories stored as strings, but I also have the flexibility to alter them if required. All the data is stored in MongoDB. Thank you in advance for your help! 🙏