Spaces:
Runtime error
Runtime error
bug fix
Browse files
app.py
CHANGED
|
@@ -98,9 +98,23 @@ temperature = st.slider('Change in Temperature', min_value=-10.0, max_value=10.0
|
|
| 98 |
|
| 99 |
datepicker = st.date_input("Start of Forecast", datetime.date(2022, 12, 24), min_value=datetime.date(2022, 6, 26) + datetime.timedelta(days = 35), max_value=datetime.date(2023, 6, 26) - datetime.timedelta(days = 30))
|
| 100 |
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 104 |
|
| 105 |
st.pyplot(fig)
|
| 106 |
|
|
|
|
| 98 |
|
| 99 |
datepicker = st.date_input("Start of Forecast", datetime.date(2022, 12, 24), min_value=datetime.date(2022, 6, 26) + datetime.timedelta(days = 35), max_value=datetime.date(2023, 6, 26) - datetime.timedelta(days = 30))
|
| 100 |
|
| 101 |
+
fig, axs = plt.subplots(2, 2, figsize=(8, 6))
|
| 102 |
+
|
| 103 |
+
# Plot scatter plots for each group
|
| 104 |
+
axs[0, 0].scatter(df.loc[df['Group'] == '4', 'Date'], df.loc[df['Group'] == '4', 'Sales'], color='red', marker='o')
|
| 105 |
+
axs[0, 0].set_title('Article Group 1')
|
| 106 |
+
|
| 107 |
+
axs[0, 1].scatter(df.loc[df['Group'] == '7', 'Date'], df.loc[df['Group'] == '7', 'Sales'], color='blue', marker='o')
|
| 108 |
+
axs[0, 1].set_title('Article Group 2')
|
| 109 |
+
|
| 110 |
+
axs[1, 0].scatter(df.loc[df['Group'] == '1', 'Date'], df.loc[df['Group'] == '1', 'Sales'], color='green', marker='o')
|
| 111 |
+
axs[1, 0].set_title('Article Group 3')
|
| 112 |
+
|
| 113 |
+
axs[1, 1].scatter(df.loc[df['Group'] == '6', 'Date'], df.loc[df['Group'] == '6', 'Sales'], color='yellow', marker='o')
|
| 114 |
+
axs[1, 1].set_title('Article Group 4')
|
| 115 |
+
|
| 116 |
+
# Adjust spacing between subplots
|
| 117 |
+
plt.tight_layout()
|
| 118 |
|
| 119 |
st.pyplot(fig)
|
| 120 |
|