varshitha22 commited on
Commit
3df5946
·
verified ·
1 Parent(s): 47a18c1

Update pages/EDA.py

Browse files
Files changed (1) hide show
  1. pages/EDA.py +2 -2
pages/EDA.py CHANGED
@@ -151,7 +151,7 @@ ax.set_title("Proportion of Crops", fontsize=3)
151
  st.pyplot(fig)
152
 
153
  # Above-Average Nutrient Requirement Crops
154
- st.markdown("<h2 style='text-align: left; color: #2E86C1;font-size: 24px;'>Crops that require above-average soil nutrients</h2>", unsafe_allow_html=True)
155
 
156
  # Calculate average nutrient levels
157
  avg_nitrogen = df['Nitrogen'].mean()
@@ -161,7 +161,7 @@ avg_potassium = df['Potassium'].mean()
161
  # Function to plot bar charts
162
  def plot_nutrient_crops(data, title):
163
  crop_counts = data.value_counts()
164
- fig, ax = plt.subplots(figsize=(4, 2)) # Adjusted plot size for better display
165
  crop_counts.plot(kind='bar', color='skyblue', ax=ax)
166
  ax.set_xlabel('Crops', fontsize=5)
167
  ax.set_ylabel('Count', fontsize=5)
 
151
  st.pyplot(fig)
152
 
153
  # Above-Average Nutrient Requirement Crops
154
+ st.markdown("<h2 style='text-align: left; color: #D35400;font-size: 24px;'>Crops that require above-average soil nutrients</h2>", unsafe_allow_html=True)
155
 
156
  # Calculate average nutrient levels
157
  avg_nitrogen = df['Nitrogen'].mean()
 
161
  # Function to plot bar charts
162
  def plot_nutrient_crops(data, title):
163
  crop_counts = data.value_counts()
164
+ fig, ax = plt.subplots(figsize=(10, 4)) # Adjusted plot size for better display
165
  crop_counts.plot(kind='bar', color='skyblue', ax=ax)
166
  ax.set_xlabel('Crops', fontsize=5)
167
  ax.set_ylabel('Count', fontsize=5)