Survey by Menage in Senegalese regions on Sorghum cultivation between 2012-2016
Survey by Menage in Senegalese regions on Sorghum cultivation between 2012-2016¶
In [1]:
import pandas as pd
import pandas_profiling as pp
import matplotlib.pyplot as plt, numpy as np
In [8]:
data = pd.read_excel('Survey by Menage in Senegalese regions on Sorghum cultivation between 2012-2016.xlsx')
In [9]:
data.head()
Out[9]:
| Région | Sup (ha) (ha) 2012 | Rdt (kg/ha) 2012 | Prod (t) 2012 | Sup (ha) (ha) 2013 | Rdt (kg/ha) 2013 | Prod (t) 2013 | Sup (ha) (ha) 2014 | Rdt (kg/ha) 2014 | Prod (t) 2014 | Sup (ha) (ha) 2015 | Rdt (kg/ha) 2015 | Prod (t) 2015 | Sup (ha) (ha) 2016 | Rdt (kg/ha) 2016 | Prod (t) 2016 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | Dakar | 358 | 462 | 165 | 300 | 400 | 120 | 200 | 450 | 90 | 350 | 515 | 180 | 385 | 500 | 193 |
| 1 | Diourbel | 2652 | 662 | 1755 | 2090 | 542 | 1134 | 3500 | 565 | 1978 | 12784 | 834 | 10666 | 14062 | 637 | 8960 |
| 2 | Fatick | 8226 | 800 | 6580 | 6063 | 1037 | 6285 | 6623 | 795 | 5265 | 13761 | 871 | 11989 | 15137 | 731 | 11071 |
| 3 | Kaolack | 8707 | 860 | 7492 | 3789 | 939 | 3559 | 8167 | 926 | 7566 | 16417 | 639 | 10491 | 18058 | 889 | 16052 |
| 4 | Kolda | 20130 | 857 | 17249 | 17703 | 699 | 12374 | 16563 | 750 | 12431 | 31896 | 813 | 25935 | 35086 | 769 | 26966 |
In [10]:
data.shape
Out[10]:
(14, 16)
In [11]:
data.columns
Out[11]:
Index(['Région', 'Sup (ha) (ha) 2012', 'Rdt (kg/ha) 2012', 'Prod (t) 2012',
'Sup (ha) (ha) 2013', 'Rdt (kg/ha) 2013', 'Prod (t) 2013',
'Sup (ha) (ha) 2014', 'Rdt (kg/ha) 2014', 'Prod (t) 2014',
'Sup (ha) (ha) 2015', 'Rdt (kg/ha) 2015', 'Prod (t) 2015',
'Sup (ha) (ha) 2016', 'Rdt (kg/ha) 2016', 'Prod (t) 2016'],
dtype='object')
In [12]:
data.dtypes
Out[12]:
Région object Sup (ha) (ha) 2012 int64 Rdt (kg/ha) 2012 int64 Prod (t) 2012 int64 Sup (ha) (ha) 2013 int64 Rdt (kg/ha) 2013 int64 Prod (t) 2013 int64 Sup (ha) (ha) 2014 int64 Rdt (kg/ha) 2014 int64 Prod (t) 2014 int64 Sup (ha) (ha) 2015 int64 Rdt (kg/ha) 2015 int64 Prod (t) 2015 int64 Sup (ha) (ha) 2016 int64 Rdt (kg/ha) 2016 int64 Prod (t) 2016 int64 dtype: object
In [14]:
data.plot(figsize=(12,8))
Out[14]:
<AxesSubplot:>
In [16]:
data.plot.hist(figsize=(10,8))
Out[16]:
<AxesSubplot:ylabel='Frequency'>
In [31]:
data.groupby(['Région']).sum().plot(kind='pie', title="Distribution of Sorghum Yield in all Region 2016 ",
y='Rdt (kg/ha) 2016', autopct='%1.1f%%', figsize=(10,8))
Out[31]:
<AxesSubplot:title={'center':'Distribution of Sorghum Yield in all Region 2016 '}, ylabel='Rdt (kg/ha) 2016'>
In [33]:
Tasks = data['Rdt (kg/ha) 2016']
my_labels = data['Région']
fig = plt.figure(figsize=(10,8))
plt.pie(Tasks,labels=my_labels,autopct='%1.1f%%')
plt.title('Distribution of Sorghum Yield in all Region 2016 ')
plt.axis('equal')
plt.show()
In [35]:
from dataprep.eda import plot
plot(data)
Out[35]:
Dataset Statistics
| Number of Variables | 16 |
|---|---|
| Number of Rows | 14 |
| Missing Cells | 0 |
| Missing Cells (%) | 0.0% |
| Duplicate Rows | 0 |
| Duplicate Rows (%) | 0.0% |
| Total Size in Memory | 2.7 KB |
| Average Row Size in Memory | 200.4 B |
| Variable Types |
|
Dataset Insights
| Sup (ha) (ha) 2012 and Prod (t) 2012 have similar distributions | Similar Distribution |
|---|---|
| Sup (ha) (ha) 2012 and (ha) (ha) 2013 have similar distributions | Similar Distribution |
| Sup (ha) (ha) 2012 and Prod (t) 2013 have similar distributions | Similar Distribution |
| Sup (ha) (ha) 2012 and (ha) (ha) 2014 have similar distributions | Similar Distribution |
| Sup (ha) (ha) 2012 and Prod (t) 2014 have similar distributions | Similar Distribution |
| Sup (ha) (ha) 2012 and (ha) (ha) 2015 have similar distributions | Similar Distribution |
| Sup (ha) (ha) 2012 and Prod (t) 2015 have similar distributions | Similar Distribution |
| Sup (ha) (ha) 2012 and (ha) (ha) 2016 have similar distributions | Similar Distribution |
| Sup (ha) (ha) 2012 and Prod (t) 2016 have similar distributions | Similar Distribution |
| Rdt (kg/ha) 2012 and (kg/ha) 2013 have similar distributions | Similar Distribution |
Dataset Insights
| Rdt (kg/ha) 2012 and (kg/ha) 2014 have similar distributions | Similar Distribution |
|---|---|
| Rdt (kg/ha) 2012 and (kg/ha) 2015 have similar distributions | Similar Distribution |
| Rdt (kg/ha) 2012 and (kg/ha) 2016 have similar distributions | Similar Distribution |
| Prod (t) 2012 and Sup (ha) (ha) 2013 have similar distributions | Similar Distribution |
| Prod (t) 2012 and (t) 2013 have similar distributions | Similar Distribution |
| Prod (t) 2012 and Sup (ha) (ha) 2014 have similar distributions | Similar Distribution |
| Prod (t) 2012 and (t) 2014 have similar distributions | Similar Distribution |
| Prod (t) 2012 and Sup (ha) (ha) 2015 have similar distributions | Similar Distribution |
| Prod (t) 2012 and (t) 2015 have similar distributions | Similar Distribution |
| Prod (t) 2012 and Sup (ha) (ha) 2016 have similar distributions | Similar Distribution |
Dataset Insights
| Prod (t) 2012 and (t) 2016 have similar distributions | Similar Distribution |
|---|---|
| Sup (ha) (ha) 2013 and Prod (t) 2013 have similar distributions | Similar Distribution |
| Sup (ha) (ha) 2013 and (ha) (ha) 2014 have similar distributions | Similar Distribution |
| Sup (ha) (ha) 2013 and Prod (t) 2014 have similar distributions | Similar Distribution |
| Sup (ha) (ha) 2013 and (ha) (ha) 2015 have similar distributions | Similar Distribution |
| Sup (ha) (ha) 2013 and Prod (t) 2015 have similar distributions | Similar Distribution |
| Sup (ha) (ha) 2013 and (ha) (ha) 2016 have similar distributions | Similar Distribution |
| Sup (ha) (ha) 2013 and Prod (t) 2016 have similar distributions | Similar Distribution |
| Rdt (kg/ha) 2013 and (kg/ha) 2014 have similar distributions | Similar Distribution |
| Rdt (kg/ha) 2013 and (kg/ha) 2015 have similar distributions | Similar Distribution |
Dataset Insights
| Rdt (kg/ha) 2013 and (kg/ha) 2016 have similar distributions | Similar Distribution |
|---|---|
| Prod (t) 2013 and Sup (ha) (ha) 2014 have similar distributions | Similar Distribution |
| Prod (t) 2013 and (t) 2014 have similar distributions | Similar Distribution |
| Prod (t) 2013 and Sup (ha) (ha) 2015 have similar distributions | Similar Distribution |
| Prod (t) 2013 and (t) 2015 have similar distributions | Similar Distribution |
| Prod (t) 2013 and Sup (ha) (ha) 2016 have similar distributions | Similar Distribution |
| Prod (t) 2013 and (t) 2016 have similar distributions | Similar Distribution |
| Sup (ha) (ha) 2014 and Prod (t) 2014 have similar distributions | Similar Distribution |
| Sup (ha) (ha) 2014 and (ha) (ha) 2015 have similar distributions | Similar Distribution |
| Sup (ha) (ha) 2014 and Prod (t) 2015 have similar distributions | Similar Distribution |
Dataset Insights
| Sup (ha) (ha) 2014 and (ha) (ha) 2016 have similar distributions | Similar Distribution |
|---|---|
| Sup (ha) (ha) 2014 and Prod (t) 2016 have similar distributions | Similar Distribution |
| Rdt (kg/ha) 2014 and (kg/ha) 2015 have similar distributions | Similar Distribution |
| Rdt (kg/ha) 2014 and (kg/ha) 2016 have similar distributions | Similar Distribution |
| Prod (t) 2014 and Sup (ha) (ha) 2015 have similar distributions | Similar Distribution |
| Prod (t) 2014 and (t) 2015 have similar distributions | Similar Distribution |
| Prod (t) 2014 and Sup (ha) (ha) 2016 have similar distributions | Similar Distribution |
| Prod (t) 2014 and (t) 2016 have similar distributions | Similar Distribution |
| Sup (ha) (ha) 2015 and Prod (t) 2015 have similar distributions | Similar Distribution |
| Sup (ha) (ha) 2015 and (ha) (ha) 2016 have similar distributions | Similar Distribution |
Dataset Insights
| Sup (ha) (ha) 2015 and Prod (t) 2016 have similar distributions | Similar Distribution |
|---|---|
| Rdt (kg/ha) 2015 and (kg/ha) 2016 have similar distributions | Similar Distribution |
| Prod (t) 2015 and Sup (ha) (ha) 2016 have similar distributions | Similar Distribution |
| Prod (t) 2015 and (t) 2016 have similar distributions | Similar Distribution |
| Sup (ha) (ha) 2016 and Prod (t) 2016 have similar distributions | Similar Distribution |
| Sup (ha) (ha) 2012 is skewed | Skewed |
| Rdt (kg/ha) 2012 is skewed | Skewed |
| Prod (t) 2012 is skewed | Skewed |
| Sup (ha) (ha) 2013 is skewed | Skewed |
| Prod (t) 2013 is skewed | Skewed |
Dataset Insights
| Sup (ha) (ha) 2014 is skewed | Skewed |
|---|---|
| Prod (t) 2014 is skewed | Skewed |
| Prod (t) 2015 is skewed | Skewed |
| Prod (t) 2016 is skewed | Skewed |
| Région has all distinct values | Unique |
| Sup (ha) (ha) 2013 has 1 (7.14%) zeros | Zeros |
| Rdt (kg/ha) 2013 has 1 (7.14%) zeros | Zeros |
| Prod (t) 2013 has 1 (7.14%) zeros | Zeros |
- 1
- 2
- 3
- 4
- 5
- 6
- 7
In [36]:
plot(data, "Région", "Rdt (kg/ha) 2016")
Out[36]:
In [ ]:
Comments
Post a Comment