# Proportion of Irrigation versus Actual Irrigation

Published: 25 April 2024| Version 1 | DOI: 10.17632/f8jpv7mcdw.1
Contributor:
Sunil Maria Benedict

## Description

This dataset and visualizations provide insights into irrigation potential and actual irrigation levels across different districts. Bar Chart - Irrigation Potential vs. Actual Irrigation: The bar chart illustrates the comparison between irrigation potential and actual irrigation for each district. The x-axis represents the districts, while the y-axis represents the irrigation levels. Two bars are displayed for each district, one representing the irrigation potential and the other representing the actual irrigation. The chart allows for easy comparison between the two variables across districts. Statistical Summary: Statistical summaries are provided for both irrigation potential and actual irrigation. These summaries include count, mean, standard deviation, minimum, 25th percentile (Q1), median (50th percentile or Q2), 75th percentile (Q3), and maximum values. These descriptive statistics offer a comprehensive understanding of the central tendency, variability, and distribution of irrigation potential and actual irrigation levels across the dataset. Scatter Plot - Proportion of Irrigation vs. Actual Irrigation: The scatter plot visualizes the relationship between the proportion of irrigation initiatives and actual irrigation levels. Each data point represents a district, with the x-axis representing the proportion of irrigation initiatives and the y-axis representing actual irrigation levels. Additionally, a regression line is plotted to depict the linear relationship between these variables. The line equation, along with the correlation coefficient (r) and p-value, provides insights into the strength and significance of the relationship. Correlation Coefficient and p-value: The correlation coefficient (r) quantifies the strength and direction of the linear relationship between the proportion of irrigation initiatives and actual irrigation levels. A value close to 1 indicates a strong positive linear relationship, while a value close to -1 indicates a strong negative linear relationship. The p-value indicates the significance of the correlation coefficient. A small p-value suggests that the observed correlation is unlikely to be due to random chance. Overall, this analysis allows for a comprehensive exploration of the relationship between irrigation potential, actual irrigation, and the proportion of irrigation initiatives, providing valuable insights for decision-making and planning in the context of irrigation management.

## Steps to reproduce

import numpy as np import matplotlib.pyplot as plt from scipy.stats import linregress # Bar chart for Irrigation Potential and Actual Irrigation plt.figure(figsize=(10, 6)) plt.bar(irrigation_data['District'] - 0.2, irrigation_data['Irrigation_Potential'], width=0.4, label='Irrigation Potential') plt.bar(irrigation_data['District'] + 0.2, irrigation_data['Actual_Irrigation'], width=0.4, label='Actual Irrigation') plt.xlabel('District') plt.ylabel('Irrigation') plt.title('Irrigation Potential vs. Actual Irrigation by District') plt.xticks(irrigation_data['District']) plt.legend() plt.grid(True) plt.tight_layout() plt.show() # Calculate statistical summary for Irrigation Potential and Actual Irrigation print("Statistical Summary for Irrigation Potential:") print(irrigation_data['Irrigation_Potential'].describe()) print("\nStatistical Summary for Actual Irrigation:") print(irrigation_data['Actual_Irrigation'].describe()) # Scatter plot for Proportion of Irrigation vs. Actual Irrigation plt.figure(figsize=(8, 6)) plt.scatter(irrigation_data['Proportion_of_Irrigation'], irrigation_data['Actual_Irrigation'], color='blue', label='Data Points') # Calculate regression line slope, intercept, r_value, p_value, std_err = linregress(irrigation_data['Proportion_of_Irrigation'], irrigation_data['Actual_Irrigation']) x_values = np.linspace(irrigation_data['Proportion_of_Irrigation'].min(), irrigation_data['Proportion_of_Irrigation'].max(), 100) y_values = slope * x_values + intercept # Plot regression line plt.plot(x_values, y_values, color='red', label=f'Regression Line: Y = {slope:.2f}X + {intercept:.2f}') plt.xlabel('Proportion of Irrigation Initiatives') plt.ylabel('Actual Irrigation') plt.title('Proportion of Irrigation vs. Actual Irrigation') plt.legend() plt.grid(True) plt.tight_layout() plt.show() # Calculate correlation coefficient and p-value print("\nCorrelation Coefficient (r):", r_value) print("p-value:", p_value)