Satyam0077 commited on
Commit
b30530a
·
verified ·
1 Parent(s): 1b6e7a1

Upload 3 files

Browse files
Files changed (3) hide show
  1. cleaned_farmer_data.csv +56 -0
  2. dashboard.py +129 -0
  3. requirements.txt +7 -0
cleaned_farmer_data.csv ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ sr_no,uid,program_year,farmer_name,plantation_type_dense_fruit,total_land_area_acre,area_f4f_acre,District,Block,water_available,electricity_available,contract uploaded,land_record_uploaded,cc_training_uploaded?,cc_training_date,farmer_payment_collected,farmer_payment_date,amount,mode_collection_cash_upi_banktransfer,contract_date,baseline_survey,plantation_date,trees_planted,mango_native,mango_grafted_kesar,lemon_sai_sharbati,sitaphal_native,sitaphal_golden,sitaphal _balanagar,awala,awala_grafted,peru,peru_sardar,chincha,chincha_grafted,Jamun,Jamun_bhardoli,chikku,orange,mosambi,dalimb,ramphal,drumstick_Koimb,bamboo,karwand,arjun,katesawar,karanj,kaduneem,kanchan,kadamb,bhendi,shirish,ain,pimpal,vad,tamhan,waval,palas,babhul,bakul,area_f4f_ratio
2
+ 1,id_1,2023,farmer_b,Fruit Tree,5,4,A,p,Yes,Yes,Yes,Yes,Yes,2023-10-30,Yes,,9000.0,Cash,2023-10-30,No,2023-10-02,370.0,0,150,150,0,0,0,2,0,2,0,2,0,2,0,0,0,0,0,0,0,50,2,1,1,0,1,1,1,1,0,1,1,1,0,0,1,0,1,0.8
3
+ 2,id_2,2023,farmer_c,Fruit Tree,5,30,A,p,Yes,Yes,Yes,Yes,Yes,2023-07-19,Yes,2023-03-07,12600.0,Cash,2023-07-19,Yes,2023-07-29,,0,240,0,0,200,0,2,0,0,0,2,0,2,0,0,0,0,0,0,0,50,2,1,1,0,1,1,1,1,0,1,1,1,1,0,0,0,1,6.0
4
+ 3,id_3,2023,farmer_d,Fruit Tree,7,5,A,p,Yes,Yes,Yes,Yes,No,2023-10-21,Yes,2023-07-25,13500.0,UPI,2023-10-21,Yes,2023-10-21,,0,150,0,0,350,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,125,2,4,4,3,3,3,0,0,2,0,3,0,0,3,3,0,3,0.7142857142857143
5
+ 4,id_4,2023,farmer_e,Fruit Tree,9,4,A,p,Yes,Yes,Yes,Yes,Yes,2023-10-09,Yes,2023-07-17,17000.0,Cash,2023-10-09,Yes,2023-10-09,,0,200,0,0,500,0,3,0,0,200,0,0,0,0,0,0,0,0,0,0,150,4,4,4,3,4,4,0,0,4,0,4,0,0,3,3,0,4,0.4444444444444444
6
+ 5,id_5,2023,farmer_f,Fruit Tree,7,4,A,p,Yes,Yes,Yes,Yes,Yes,2023-10-25,Yes,2023-07-01,17000.0,Cash,2023-10-25,Yes,2023-10-25,,0,200,100,0,400,0,3,0,0,0,3,0,0,0,0,0,0,0,0,0,150,3,3,3,3,3,3,3,3,3,3,0,0,3,0,3,0,3,0.5714285714285714
7
+ 6,id_6,2023,farmer_g,Fruit Tree,6,4,A,p,Yes,No,Yes,Yes,Yes,2023-10-01,Yes,2023-06-27,3000.0,Cash,2023-10-01,Yes,2023-10-06,375.0,0,0,100,0,210,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,50,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0.6666666666666666
8
+ 7,id_7,2023,farmer_h,Fruit Tree,6,5,A,p,Yes,Yes,Yes,Yes,Yes,2023-10-11,Yes,2023-07-01,11500.0,UPI,2023-10-11,Yes,2023-10-16,,0,100,300,0,175,0,3,0,0,0,3,0,0,0,0,0,0,0,0,0,125,2,2,2,3,2,2,2,2,3,3,0,0,3,0,3,0,3,0.8333333333333334
9
+ 8,id_8,2023,farmer_i,Fruit Tree,5,1,A,p,Yes,Yes,Yes,Yes,Yes,2023-08-12,Yes,2023-06-23,12000.0,UPI,2023-08-12,Yes,2023-08-17,,40,0,300,0,800,0,14,0,0,0,2,0,45,0,0,0,0,0,0,0,200,10,4,4,4,4,4,4,0,2,4,0,0,4,0,4,0,4,0.2
10
+ 9,id_9,2023,farmer_j,Fruit Tree,6,1,A,p,Yes,Yes,Yes,Yes,Yes,2023-09-26,Yes,2023-05-29,3000.0,Bank transfer,2023-09-26,Yes,2023-10-01,397.0,60,0,95,10,155,0,1,0,0,0,0,0,0,13,0,0,0,0,0,0,50,1,1,1,1,1,1,0,0,1,0,2,0,0,1,1,0,2,0.16666666666666666
11
+ 10,id_10,2023,farmer_k,Fruit Tree,9,5,A,p,Yes,Yes,Yes,Yes,Yes,2023-09-26,Yes,2023-05-29,3000.0,Bank transfer,2023-09-26,No,2023-10-01,396.0,60,0,95,10,155,0,2,0,0,0,0,0,0,12,0,0,0,0,0,0,50,1,1,1,1,1,1,0,0,1,0,1,0,0,2,1,0,1,0.5555555555555556
12
+ 11,id_11,2023,farmer_l,Fruit Tree,7,1,A,p,Yes,Yes,Yes,No,No,2023-10-05,Yes,2023-07-17,6100.0,Cash,2023-10-05,Yes,2023-10-10,,0,60,175,20,0,0,70,0,0,20,40,0,20,0,0,0,0,0,0,0,75,20,5,1,0,0,5,5,0,2,0,0,0,5,0,0,0,0,0.14285714285714285
13
+ 12,id_12,2023,farmer_m,Fruit Tree,8,1,A,p,Yes,Yes,Yes,Yes,Yes,2023-07-31,Yes,2023-07-01,4750.0,Cheque_cash,2023-07-31,Yes,2023-08-05,,0,25,0,0,0,0,0,0,0,0,100,0,250,0,0,0,0,0,0,0,63,0,5,0,0,0,5,0,0,0,0,0,0,5,0,5,0,0,0.125
14
+ 13,id_13,2023,farmer_n,Fruit Tree,9,5,A,p,Yes,Yes,Yes,Yes,Yes,2023-07-22,Yes,2023-06-27,2810.0,Cash,2023-07-22,Yes,2023-07-27,,0,44,0,0,79,0,7,0,0,0,10,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,1,0,0,0,1,0,1,0,0,0.5555555555555556
15
+ 14,id_14,2023,farmer_o,Fruit Tree,8,1,A,p,Yes,Yes,Yes,Yes,Yes,2023-08-21,Yes,2023-07-17,3750.0,Cash,2023-08-21,Yes,2023-08-26,,0,0,120,0,240,0,30,0,40,0,0,0,0,0,0,0,0,0,0,0,50,0,5,5,0,0,5,0,0,0,0,0,0,5,0,5,0,0,0.125
16
+ 15,id_15,2023,farmer_p,Fruit Tree,9,2,A,p,Yes,Yes,Yes,Yes,Yes,2023-07-22,Yes,2023-07-01,7000.0,Cash,2023-07-22,Yes,2023-07-27,407.0,0,100,0,0,200,0,30,0,10,0,5,0,5,0,0,0,0,0,0,0,0,0,3,2,0,0,3,0,0,3,0,0,0,3,0,3,0,0,0.2222222222222222
17
+ 16,id_16,2023,farmer_q,Fruit Tree,9,5,A,q,Yes,Yes,Yes,Yes,Yes,2023-08-12,Yes,2023-06-27,4500.0,Cash,2023-08-12,Yes,2023-08-17,,0,0,0,0,225,0,0,0,225,0,0,0,0,0,0,0,0,0,0,0,75,0,3,3,0,0,3,0,0,0,3,0,0,3,0,3,0,0,0.5555555555555556
18
+ 17,id_17,2023,farmer_r,Fruit Tree,9,3,A,q,Yes,Yes,Yes,Yes,Yes,2023-08-05,Yes,2023-07-17,6600.0,Cash,2023-08-05,Yes,2023-08-10,418.0,0,90,0,230,0,0,0,0,10,0,0,0,0,0,0,0,0,0,0,0,70,0,3,3,0,0,3,0,0,3,0,0,0,3,0,3,0,0,0.3333333333333333
19
+ 18,id_18,2023,farmer_s,Fruit Tree,7,1,A,q,Yes,Yes,No,Yes,No,2023-07-31,Yes,2023-07-01,3000.0,Cash,2023-07-31,Yes,2023-08-05,370.0,0,0,150,150,0,0,5,0,5,0,5,0,5,0,0,0,0,0,0,0,15,15,4,4,0,0,4,0,0,0,0,0,0,4,0,4,0,0,0.14285714285714285
20
+ 19,id_19,2023,farmer_t,Fruit Tree,6,4,A,q,Yes,Yes,Yes,Yes,Yes,2023-07-21,Yes,2023-06-27,5190.0,Cash,2023-07-21,Yes,2023-07-26,,0,81,0,0,146,0,13,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,2,0,0,2,0,0,0,2,0,1,0,0,0.6666666666666666
21
+ 20,id_20,2023,farmer_u,Fruit Tree,8,1,A,q,Yes,Yes,Yes,Yes,Yes,2023-10-06,Yes,2023-07-17,6500.0,Cash,2023-10-06,Yes,2023-10-11,,0,50,0,0,0,300,0,0,0,50,100,0,100,0,0,0,0,0,0,0,0,0,5,5,0,0,5,0,0,0,0,0,0,5,0,5,0,0,0.125
22
+ 21,id_21,2023,farmer_v,Bamboo,5,8,A,q,Yes,Yes,Yes,Yes,Yes,2023-10-04,No,,,,2023-10-04,Yes,2023-10-09,,5,0,0,5,0,0,0,0,0,0,5,0,5,0,0,0,0,0,0,0,700,0,5,0,5,5,0,0,1,0,0,0,0,0,0,0,0,0,1.6
23
+ 22,id_22,2023,farmer_w,Bamboo,9,4,A,q,Yes,Yes,Yes,Yes,Yes,2023-08-26,No,,,,2023-08-26,Yes,2023-08-31,350.0,4,0,0,4,0,0,0,0,0,0,5,0,5,0,0,0,0,0,0,0,350,0,4,0,2,4,0,0,2,0,0,0,0,0,0,0,0,0,0.4444444444444444
24
+ 23,id_23,2023,farmer_x,Bamboo,7,4,A,q,Yes,No,Yes,Yes,Yes,2023-09-04,No,,,,2023-09-04,Yes,2023-09-09,,5,0,0,5,0,0,0,0,0,0,10,0,7,0,0,0,0,0,0,0,500,0,6,0,3,3,0,0,3,0,0,0,0,0,0,0,0,0,0.5714285714285714
25
+ 24,id_24,2023,farmer_y,Bamboo,6,5,B,r,Yes,No,Yes,Yes,Yes,2023-08-20,No,,,,2023-08-20,Yes,2023-08-25,,5,0,0,5,0,0,0,0,0,0,10,0,5,0,0,0,0,0,0,0,1120,0,5,0,5,5,0,0,5,0,0,0,0,0,0,0,0,0,0.8333333333333334
26
+ 25,id_25,2023,farmer_z,Bamboo,8,5,B,r,Yes,Yes,Yes,Yes,Yes,2023-05-25,No,,,,2023-05-25,Yes,2023-05-30,,5,0,0,5,0,0,0,0,0,0,10,0,5,0,0,0,0,0,0,0,1520,0,10,0,6,5,0,0,5,0,0,0,0,0,0,0,0,0,0.625
27
+ 26,id_26,2023,farmer_{,Bamboo,10,3,B,r,Yes,Yes,Yes,Yes,Yes,2023-10-26,No,,,,2023-10-26,Yes,2023-10-31,,5,0,0,5,0,0,0,0,0,0,10,0,4,0,0,0,0,0,0,0,640,0,6,0,4,4,0,0,3,0,0,0,0,0,0,0,0,0,0.3
28
+ 27,id_27,2023,farmer_|,Bamboo,8,1,B,r,Yes,Yes,Yes,Yes,Yes,2023-09-23,No,,,,2023-09-23,Yes,2023-09-28,,3,0,0,3,0,0,0,0,0,0,6,0,4,0,0,0,0,0,0,0,440,0,4,0,2,2,0,0,2,0,0,0,0,0,0,0,0,0,0.125
29
+ 28,id_28,2022,farmer_},Bamboo,10,3,B,r,Yes,Yes,Yes,Yes,Yes,2023-04-04,No,,,,2023-04-04,Yes,2023-04-09,,5,0,0,3,0,0,0,0,0,0,5,0,7,0,0,0,0,0,0,0,647,0,2,0,4,2,0,0,3,0,0,0,0,0,0,0,0,0,0.3
30
+ 29,id_29,2021,farmer_~,Bamboo,9,2,B,r,Yes,Yes,Yes,Yes,Yes,2023-12-06,No,,,,2023-12-06,Yes,,,5,0,0,3,0,0,0,0,0,0,10,0,5,0,0,0,0,0,0,0,640,0,5,0,4,3,0,0,5,0,0,0,0,0,0,0,0,0,0.2222222222222222
31
+ 30,id_30,2021,farmer_,Bamboo,8,5,B,r,Yes,Yes,Yes,Yes,Yes,2023-05-08,No,,,,2023-05-08,Yes,,370.0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,370,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.625
32
+ 31,id_31,2021,farmer_€,Bamboo,10,3,B,r,Yes,Yes,Yes,Yes,Yes,2023-11-05,No,,,,2023-11-05,Yes,2023-11-08,370.0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,370,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.3
33
+ 32,id_32,2023,farmer_,Bamboo,6,5,B,r,Yes,Yes,Yes,Yes,Yes,2023-07-14,No,,,,2023-07-14,Yes,2023-07-17,,7,0,0,3,0,0,0,0,0,0,10,0,6,0,0,0,0,0,0,0,720,0,6,0,4,3,0,0,7,0,0,0,0,0,0,0,0,0,0.8333333333333334
34
+ 33,id_33,2023,farmer_‚,Bamboo,9,2,B,r,Yes,Yes,Yes,Yes,Yes,2023-11-05,No,,,,2023-11-05,Yes,2023-11-08,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,920,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.2222222222222222
35
+ 34,id_34,2023,farmer_ƒ,Bamboo,8,1,B,r,Yes,Yes,Yes,Yes,Yes,2023-11-05,No,,,,2023-11-05,Yes,2023-11-08,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,550,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.125
36
+ 35,id_35,2022,farmer_„,Bamboo,7,1,B,r,Yes,Yes,Yes,Yes,Yes,2023-08-24,No,,,,2023-08-24,Yes,2023-08-27,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2220,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.14285714285714285
37
+ 36,id_36,2022,farmer_…,Bamboo,6,3,B,r,Yes,Yes,Yes,Yes,Yes,2023-07-15,No,,,,2023-07-15,Yes,2023-07-18,,7,0,0,3,0,0,0,0,0,0,10,0,6,0,0,0,0,0,0,0,720,0,6,0,4,3,0,0,7,0,0,0,0,0,0,0,0,0,0.5
38
+ 37,id_37,2022,farmer_†,Bamboo,9,4,B,r,Yes,Yes,Yes,Yes,Yes,2023-08-10,No,,,,2023-08-10,Yes,2023-08-13,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2950,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.4444444444444444
39
+ 38,id_38,2022,farmer_‡,Bamboo,5,1,B,r,No,Yes,Yes,Yes,Yes,2023-02-06,No,,,,2023-02-06,Yes,2023-02-09,370.0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,370,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.2
40
+ 39,id_39,2022,farmer_ˆ,Bamboo,7,2,B,r,Yes,Yes,Yes,Yes,Yes,2023-02-06,No,,,,2023-02-06,Yes,2023-02-09,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,481,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.2857142857142857
41
+ 40,id_40,2022,farmer_‰,Bamboo,9,4,B,r,Yes,Yes,Yes,Yes,Yes,2023-06-06,No,,,,2023-06-06,Yes,2023-06-09,400.0,5,0,0,5,0,0,0,0,0,0,5,0,5,0,0,0,0,0,0,0,350,0,5,0,5,5,0,0,1,0,0,0,0,0,0,0,0,0,0.4444444444444444
42
+ 41,id_41,2023,farmer_Š,Bamboo,10,1,B,r,Yes,Yes,Yes,Yes,Yes,2023-07-21,No,,,,2023-07-21,Yes,2023-07-24,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,600,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.1
43
+ 42,id_42,2023,farmer_‹,Bamboo,5,4,B,r,Yes,Yes,Yes,Yes,Yes,2023-08-27,No,,,,2023-08-27,Yes,2023-08-30,370.0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,370,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.8
44
+ 43,id_43,2023,farmer_Œ,Bamboo,8,2,B,r,Yes,Yes,Yes,Yes,Yes,2023-03-06,No,,,,2023-03-06,Yes,2023-03-09,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,592,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.25
45
+ 44,id_44,2023,farmer_,Bamboo,8,3,B,r,Yes,Yes,Yes,Yes,Yes,2023-05-06,No,,,,2023-05-06,Yes,2023-05-09,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,481,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.375
46
+ 45,id_45,2023,farmer_Ž,Bamboo,10,4,B,r,Yes,Yes,Yes,Yes,Yes,2023-03-06,No,,,,2023-03-06,Yes,2023-03-09,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,350,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.4
47
+ 46,id_46,2023,farmer_,Bamboo,7,3,B,r,Yes,Yes,Yes,Yes,Yes,2023-12-05,No,,,,2023-12-05,Yes,2023-12-08,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1110,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.42857142857142855
48
+ 47,id_47,2023,farmer_,Bamboo,8,5,B,r,Yes,Yes,Yes,Yes,Yes,2023-08-24,No,,,,2023-08-24,Yes,2023-08-27,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,555,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.625
49
+ 48,id_48,2023,farmer_‘,Bamboo,9,4,B,r,Yes,Yes,Yes,Yes,Yes,2023-08-22,No,,,,2023-08-22,Yes,2023-08-25,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,647,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.4444444444444444
50
+ 49,id_49,2023,farmer_’,Bamboo,8,12,B,r,No,Yes,Yes,Yes,Yes,2023-08-21,No,,,,2023-08-21,Yes,2023-08-24,420.0,2,0,0,2,0,0,0,0,0,0,3,0,3,0,0,0,0,0,0,0,380,0,2,0,4,2,0,0,3,0,0,0,0,0,0,0,0,0,1.5
51
+ 50,id_50,2023,farmer_“,Bamboo,9,5,B,r,Yes,Yes,Yes,Yes,Yes,2023-09-06,No,,,,2023-09-06,Yes,2023-09-09,415.0,3,0,0,0,0,0,0,0,0,0,4,0,2,0,0,0,0,0,0,0,370,0,3,0,2,2,0,0,3,0,0,0,0,0,0,0,0,0,0.5555555555555556
52
+ 51,id_51,2023,farmer_”,Bamboo,9,1,B,r,Yes,Yes,Yes,Yes,Yes,2023-02-06,No,,,,2023-02-06,Yes,2023-02-09,,5,0,0,5,0,0,0,0,0,0,12,0,9,0,0,0,0,0,0,0,540,0,8,0,3,3,0,0,3,0,0,0,0,0,0,0,0,0,0.1111111111111111
53
+ 52,id_52,2023,farmer_•,Bamboo,9,4,B,s,Yes,Yes,Yes,Yes,Yes,2023-09-27,No,,,,2023-09-27,Yes,2023-09-30,,2,0,0,2,0,0,0,0,0,0,4,0,3,0,0,0,0,0,0,0,150,0,2,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0.4444444444444444
54
+ 53,id_53,2023,farmer_–,Bamboo,8,4,B,s,Yes,Yes,Yes,Yes,Yes,2023-10-06,No,,,,2023-10-06,Yes,2023-10-09,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,907,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.5
55
+ 54,id_54,2023,farmer_—,Bamboo,6,4,B,s,Yes,Yes,Yes,Yes,Yes,2023-09-15,No,,,,2023-09-15,Yes,2023-09-18,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,514,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.6666666666666666
56
+ 55,id_55,2023,farmer_˜,Bamboo,7,2,B,s,Yes,Yes,Yes,Yes,Yes,2023-10-06,No,,,,2023-10-06,Yes,2023-10-09,,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,342,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.2857142857142857
dashboard.py ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import pandas as pd
3
+
4
+ # Load the cleaned data
5
+ df = pd.read_csv(r'C:\Users\satya\Agroforestry_Project\data\cleaned_farmer_data.csv')
6
+
7
+ # Set the page configuration for better layout and dark theme
8
+ st.set_page_config(
9
+ page_title="Agroforestry Program Dashboard",
10
+ page_icon="🌱",
11
+ layout="wide",
12
+ )
13
+
14
+ # Custom CSS for dark theme and background color adjustments
15
+ st.markdown("""
16
+ <style>
17
+ body {
18
+ background-color: #121212; /* Dark background color */
19
+ color: white; /* Text color set to white */
20
+ }
21
+ .sidebar .sidebar-content {
22
+ background-color: #1e1e1e; /* Dark sidebar background */
23
+ color: white; /* Sidebar text color */
24
+ }
25
+ .stButton>button {
26
+ background-color: #4CAF50; /* Green button color */
27
+ color: white; /* Button text color */
28
+ }
29
+ .title {
30
+ text-align: center;
31
+ font-size: 40px;
32
+ color: #4CAF50;
33
+ }
34
+ .stMarkdown {
35
+ background-color: #1e1e1e; /* Dark background for markdown blocks */
36
+ }
37
+ .stTable {
38
+ background-color: #1e1e1e; /* Dark background for table blocks */
39
+ }
40
+ .stDataFrame {
41
+ background-color: #1e1e1e; /* Dark background for dataframe */
42
+ }
43
+ </style>
44
+ """, unsafe_allow_html=True)
45
+
46
+ # Title and header for the dashboard
47
+ st.markdown('<div class="title">Real-Time Insights for Farmers</div>', unsafe_allow_html=True)
48
+
49
+ # Sidebar for navigation with a cleaner layout
50
+ st.sidebar.header("Dashboard Navigation")
51
+ section = st.sidebar.radio(
52
+ "Select a Section:",
53
+ ['Overview', 'Data Quality Issues', 'Plantation Progress', 'Location Insights']
54
+ )
55
+
56
+ # Overview Section
57
+ if section == 'Overview':
58
+ st.subheader("📊 Overall Statistics")
59
+
60
+ # Display key metrics in a clean, organized way
61
+ total_area = df['total_land_area_acre'].sum() # Corrected column name
62
+ total_plantation_area = df['area_f4f_acre'].sum() # Assuming 'area_f4f_acre' represents plantation area
63
+
64
+ # Calculate the number of rows with missing or erroneous data
65
+ missing_data_count = df.isnull().sum().sum() # Total missing values in the dataset
66
+
67
+ st.markdown(f"""
68
+ <div style="display: flex; justify-content: space-around; margin-top: 20px;">
69
+ <div style="padding: 10px; background-color: #333333; border-radius: 8px; width: 30%; text-align: center;">
70
+ <h3>Total Area (Acres)</h3>
71
+ <p style="font-size: 30px; color: #4CAF50;">{total_area}</p>
72
+ </div>
73
+ <div style="padding: 10px; background-color: #333333; border-radius: 8px; width: 30%; text-align: center;">
74
+ <h3>Total Plantation Area (Acres)</h3>
75
+ <p style="font-size: 30px; color: #4CAF50;">{total_plantation_area}</p>
76
+ </div>
77
+ <div style="padding: 10px; background-color: #333333; border-radius: 8px; width: 30%; text-align: center;">
78
+ <h3>Missing Data Entries</h3>
79
+ <p style="font-size: 30px; color: #f44336;">{missing_data_count}</p>
80
+ </div>
81
+ </div>
82
+ """, unsafe_allow_html=True)
83
+
84
+ # Data Quality Issues Section
85
+ elif section == 'Data Quality Issues':
86
+ st.subheader("⚠️ Data Quality Issues")
87
+
88
+ # Check for missing or erroneous data
89
+ missing_data = df[df.isnull().any(axis=1)] # Rows with missing values
90
+
91
+ # Search functionality to filter results by farmer name
92
+ search_term = st.text_input("🔍 Search by Farmer Name", "").strip().lower()
93
+ if search_term:
94
+ missing_data = missing_data[missing_data['farmer_name'].str.lower().str.contains(search_term)]
95
+
96
+ if not missing_data.empty:
97
+ st.write(f"**Displaying {len(missing_data)} records with data quality issues:**")
98
+ st.dataframe(missing_data)
99
+ else:
100
+ st.write("🎉 No data quality issues found!")
101
+
102
+ # Plantation Progress Section
103
+ elif section == 'Plantation Progress':
104
+ st.subheader("🌿 Plantation Progress")
105
+
106
+ # Check if plantation area percentage data exists
107
+ if 'area_f4f_acre' in df.columns and 'total_land_area_acre' in df.columns:
108
+ df['plantation_area_percentage'] = (df['area_f4f_acre'] / df['total_land_area_acre']) * 100
109
+ st.bar_chart(df['plantation_area_percentage'])
110
+ else:
111
+ st.warning("⚠️ No plantation progress data available!")
112
+
113
+ # Location Insights Section
114
+ elif section == 'Location Insights':
115
+ st.subheader("📍 Plantation Area by Location")
116
+
117
+ # Display the plantation area by district or location
118
+ if 'District' in df.columns and 'area_f4f_acre' in df.columns:
119
+ location_distribution = df.groupby('District')['area_f4f_acre'].sum().reset_index()
120
+ st.bar_chart(location_distribution.set_index('District')['area_f4f_acre'])
121
+ else:
122
+ st.warning("⚠️ Location or plantation area data is missing!")
123
+
124
+ # Footer with contact info
125
+ st.markdown("""
126
+ ---
127
+ **Developed by:** [Satyam Kumar](https://github.com/Satyam0775)
128
+ **📧 Contact:** Satyamrishav0013@gmail.com
129
+ """)
requirements.txt ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ pandas
2
+ numpy
3
+ matplotlib
4
+ seaborn
5
+ plotly
6
+ scikit-learn
7
+ openpyxl