Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
Education in INDIA
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Manas
Education in INDIA
Commits
4313845c
Commit
4313845c
authored
Nov 23, 2022
by
Manas Gabani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
markers added for teachers by educational qualification and numerical value visualization of KPIs
parent
ad49ba07
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
70 additions
and
58 deletions
+70
-58
templates/classrooms.html
templates/classrooms.html
+4
-4
templates/facilities.html
templates/facilities.html
+6
-6
templates/index.html
templates/index.html
+4
-4
templates/schools.html
templates/schools.html
+4
-4
templates/students.html
templates/students.html
+4
-4
templates/teachers.html
templates/teachers.html
+4
-4
utils.py
utils.py
+44
-32
No files found.
templates/classrooms.html
View file @
4313845c
...
...
@@ -37,7 +37,7 @@
<div
class=
"containercards"
>
<div
class=
"card"
>
<div
class=
"box"
>
<h
1>
{% print(classrooms_summary['total']) %}
</h1
>
<h
2>
{% print(classrooms_summary['total']) %}
</h2
>
<h3>
Classrooms
</h3>
</div>
<div
class=
"icon-case"
>
...
...
@@ -46,7 +46,7 @@
</div>
<div
class=
"card"
>
<div
class=
"box"
>
<h
1>
{% print(classrooms_summary['good']) %}
</h1
>
<h
2>
{% print(classrooms_summary['good']) %}
</h2
>
<h3>
Good Condition
</h3>
</div>
<div
class=
"icon-case"
>
...
...
@@ -55,7 +55,7 @@
</div>
<div
class=
"card"
>
<div
class=
"box"
>
<h
1>
{% print(classrooms_summary['minor_repair']) %}
</h1
>
<h
2>
{% print(classrooms_summary['minor_repair']) %}
</h2
>
<h3>
Need Minor Repair
</h3>
</div>
<div
class=
"icon-case"
>
...
...
@@ -64,7 +64,7 @@
</div>
<div
class=
"card"
>
<div
class=
"box"
>
<h
1>
{% print(classrooms_summary['major_repair']) %}
</h1
>
<h
2>
{% print(classrooms_summary['major_repair']) %}
</h2
>
<h3>
Need Major Repair
</h3>
</div>
<div
class=
"icon-case"
>
...
...
templates/facilities.html
View file @
4313845c
...
...
@@ -37,7 +37,7 @@
<div
class=
"containercards"
>
<!-- <div class="card">
<div class="box">
<h
1>{% print(facilities_summary['enrolment_lt_50']) %}</h1
>
<h
2>{% print(facilities_summary['enrolment_lt_50']) %}</h2
>
<h3>Enrolment <= 50</h3>
</div>
<div class="icon-case">
...
...
@@ -46,7 +46,7 @@
</div> -->
<div
class=
"card"
>
<div
class=
"box"
>
<h
1>
{% print(facilities_summary['drinking_water']) %}
</h1
>
<h
2>
{% print(facilities_summary['drinking_water']) %}
</h2
>
<h3>
Schools with Drinking Water
</h3>
</div>
<div
class=
"icon-case"
>
...
...
@@ -55,7 +55,7 @@
</div>
<div
class=
"card"
>
<div
class=
"box"
>
<h
1>
{% print(facilities_summary['girls_toilet']) %}
</h1
>
<h
2>
{% print(facilities_summary['girls_toilet']) %}
</h2
>
<h3>
Schools with Girls' Toilet
</h3>
</div>
<div
class=
"icon-case"
>
...
...
@@ -64,7 +64,7 @@
</div>
<!-- <div class="card">
<div class="box">
<h
1>{% print(facilities_summary['ramp']) %}</h1
>
<h
2>{% print(facilities_summary['ramp']) %}</h2
>
<h3>Schools with Ramp</h3>
</div>
<div class="icon-case">
...
...
@@ -73,7 +73,7 @@
</div> -->
<div
class=
"card"
>
<div
class=
"box"
>
<h
1>
{% print(facilities_summary['single_classroom']) %}
</h1
>
<h
2>
{% print(facilities_summary['single_classroom']) %}
</h2
>
<h3>
Single Classroom Schools
</h3>
</div>
<div
class=
"icon-case"
>
...
...
@@ -82,7 +82,7 @@
</div>
<div
class=
"card"
>
<div
class=
"box"
>
<h
1>
{% print(facilities_summary['single_teacher']) %}
</h1
>
<h
2>
{% print(facilities_summary['single_teacher']) %}
</h2
>
<h3>
Single Teacher Schools
</h3>
</div>
<div
class=
"icon-case"
>
...
...
templates/index.html
View file @
4313845c
...
...
@@ -37,7 +37,7 @@
<div
class=
"containercards"
>
<div
class=
"card"
>
<div
class=
"box"
>
<h
1>
{% print(index_summary['students']) %}
</h1
>
<h
2>
{% print(index_summary['students']) %}
</h2
>
<h3>
Students
</h3>
</div>
<div
class=
"icon-case"
>
...
...
@@ -46,7 +46,7 @@
</div>
<div
class=
"card"
>
<div
class=
"box"
>
<h
1>
{% print(index_summary['teachers']) %}
</h1
>
<h
2>
{% print(index_summary['teachers']) %}
</h2
>
<h3>
Teachers
</h3>
</div>
<div
class=
"icon-case"
>
...
...
@@ -55,7 +55,7 @@
</div>
<div
class=
"card"
>
<div
class=
"box"
>
<h
1>
{% print(index_summary['schools']) %}
</h1
>
<h
2>
{% print(index_summary['schools']) %}
</h2
>
<h3>
Schools
</h3>
</div>
<div
class=
"icon-case"
>
...
...
@@ -64,7 +64,7 @@
</div>
<div
class=
"card"
>
<div
class=
"box"
>
<h
1>
{% print(index_summary['classrooms']) %}
</h1
>
<h
2>
{% print(index_summary['classrooms']) %}
</h2
>
<h3>
Classrooms
</h3>
</div>
<div
class=
"icon-case"
>
...
...
templates/schools.html
View file @
4313845c
...
...
@@ -37,7 +37,7 @@
<div
class=
"containercards"
>
<div
class=
"card"
>
<div
class=
"box"
>
<h
1>
{% print(schools_summary['total']) %}
</h1
>
<h
2>
{% print(schools_summary['total']) %}
</h2
>
<h3>
Schools
</h3>
</div>
<div
class=
"icon-case"
>
...
...
@@ -46,7 +46,7 @@
</div>
<div
class=
"card"
>
<div
class=
"box"
>
<h
1>
{% print(schools_summary['govt']) %}
</h1
>
<h
2>
{% print(schools_summary['govt']) %}
</h2
>
<h3>
Government
</h3>
</div>
<div
class=
"icon-case"
>
...
...
@@ -55,7 +55,7 @@
</div>
<div
class=
"card"
>
<div
class=
"box"
>
<h
1>
{% print(schools_summary['private']) %}
</h1
>
<h
2>
{% print(schools_summary['private']) %}
</h2
>
<h3>
Private
</h3>
</div>
<div
class=
"icon-case"
>
...
...
@@ -64,7 +64,7 @@
</div>
<div
class=
"card"
>
<div
class=
"box"
>
<h
1>
{% print(schools_summary['others']) %}
</h1
>
<h
2>
{% print(schools_summary['others']) %}
</h2
>
<h3>
Others
</h3>
</div>
<div
class=
"icon-case"
>
...
...
templates/students.html
View file @
4313845c
...
...
@@ -37,7 +37,7 @@
<div
class=
"containercards"
>
<div
class=
"card"
>
<div
class=
"box"
>
<h
1>
{% print(students_summary['total']) %}
</h1
>
<h
2>
{% print(students_summary['total']) %}
</h2
>
<h3>
Students
</h3>
</div>
<div
class=
"icon-case"
>
...
...
@@ -46,7 +46,7 @@
</div>
<div
class=
"card"
>
<div
class=
"box"
>
<h
1>
{% print(students_summary['govt']) %}
</h1
>
<h
2>
{% print(students_summary['govt']) %}
</h2
>
<h3>
Government
</h3>
</div>
<div
class=
"icon-case"
>
...
...
@@ -55,7 +55,7 @@
</div>
<div
class=
"card"
>
<div
class=
"box"
>
<h
1>
{% print(students_summary['private']) %}
</h1
>
<h
2>
{% print(students_summary['private']) %}
</h2
>
<h3>
Private
</h3>
</div>
<div
class=
"icon-case"
>
...
...
@@ -64,7 +64,7 @@
</div>
<div
class=
"card"
>
<div
class=
"box"
>
<h
1>
{% print(students_summary['others']) %}
</h1
>
<h
2>
{% print(students_summary['others']) %}
</h2
>
<h3>
Others
</h3>
</div>
<div
class=
"icon-case"
>
...
...
templates/teachers.html
View file @
4313845c
...
...
@@ -37,7 +37,7 @@
<div
class=
"containercards"
>
<div
class=
"card"
>
<div
class=
"box"
>
<h
1>
{% print(teachers_summary['total']) %}
</h1
>
<h
2>
{% print(teachers_summary['total']) %}
</h2
>
<h3>
Teachers
</h3>
</div>
<div
class=
"icon-case"
>
...
...
@@ -46,7 +46,7 @@
</div>
<div
class=
"card"
>
<div
class=
"box"
>
<h
1>
{% print(teachers_summary['govt']) %}
</h1
>
<h
2>
{% print(teachers_summary['govt']) %}
</h2
>
<h3>
Government
</h3>
</div>
<div
class=
"icon-case"
>
...
...
@@ -55,7 +55,7 @@
</div>
<div
class=
"card"
>
<div
class=
"box"
>
<h
1>
{% print(teachers_summary['private']) %}
</h1
>
<h
2>
{% print(teachers_summary['private']) %}
</h2
>
<h3>
Private
</h3>
</div>
<div
class=
"icon-case"
>
...
...
@@ -64,7 +64,7 @@
</div>
<div
class=
"card"
>
<div
class=
"box"
>
<h
1>
{% print(teachers_summary['others']) %}
</h1
>
<h
2>
{% print(teachers_summary['others']) %}
</h2
>
<h3>
Others
</h3>
</div>
<div
class=
"icon-case"
>
...
...
utils.py
View file @
4313845c
...
...
@@ -5,7 +5,7 @@ import glob
import
matplotlib
matplotlib
.
use
(
'Agg'
)
import
matplotlib.pyplot
as
plt
from
babel.numbers
import
format_number
# dict_summary={"top3":[],"bottom3":[]}
fig_size_ds_w
,
fig_size_ds_h
=
10
,
6
...
...
@@ -50,7 +50,7 @@ def statewise_distribution(output_filename, input_df, year, ylabel, main_dimensi
else
:
dim
=
'Category'
label
=
'Year: '
+
str
(
year
)
+
', '
+
dim
+
': '
+
sub_dimension
plt
.
title
(
label
=
label
,
loc
=
"right"
,
fontsize
=
10
,
fontstyle
=
'italic'
)
plt
.
title
(
label
=
label
,
fontweight
=
'bold'
,
fontsize
=
10
,
fontstyle
=
'italic'
)
# plt.xticks(rotation=90, ha="right", fontsize=10)
plt
.
yticks
(
fontsize
=
7
)
# plt.bar(df_sum['State_Name'],df_sum['total_by_population'], align='center')
...
...
@@ -90,7 +90,7 @@ def total_enrolment_by_category(output_filename, input_df, main_dimension, state
plt
.
text
(
x
=
x
,
y
=
y
,
s
=
'{:.0f}'
.
format
(
y
),
color
=
'b'
,
rotation
=
15
,
fontsize
=
7
,
weight
=
'bold'
)
plt
.
legend
()
plt
.
title
(
label
=
'State: '
+
state_name
+
', Type: '
+
main_dimension
,
loc
=
"right"
,
fontsize
=
10
,
fontstyle
=
'italic'
)
plt
.
title
(
label
=
'State: '
+
state_name
+
', Type: '
+
main_dimension
,
fontweight
=
'bold'
,
fontsize
=
10
,
fontstyle
=
'italic'
)
plt
.
xticks
(
np
.
arange
(
min_year
,
max_year
+
1
,
1.0
))
plt
.
ylabel
(
ylabel
)
plt
.
xlabel
(
'Year'
)
...
...
@@ -128,15 +128,27 @@ def total_teachers_by_main_dimension(output_filename, input_df, main_dimension,
df_pg
=
df_sum
.
loc
[(
df_sum
[
'Sub_Dimension'
]
==
"Post Graduate"
)]
df_phd
=
df_sum
.
loc
[(
df_sum
[
'Sub_Dimension'
]
==
"M.Phil / Ph.D"
)]
plt
.
plot
(
df_bel_sec
[
'Year'
],
df_bel_sec
[
'total'
],
color
=
'r'
,
label
=
'Below Secondary'
)
plt
.
plot
(
df_sec
[
'Year'
],
df_sec
[
'total'
],
color
=
'g'
,
label
=
'Secondary'
)
plt
.
plot
(
df_hs
[
'Year'
],
df_hs
[
'total'
],
color
=
'b'
,
label
=
'Higher Secondary'
)
plt
.
plot
(
df_grad
[
'Year'
],
df_grad
[
'total'
],
color
=
'y'
,
label
=
'Graduate'
)
plt
.
plot
(
df_pg
[
'Year'
],
df_pg
[
'total'
],
color
=
'c'
,
label
=
'Post Graduate'
)
plt
.
plot
(
df_phd
[
'Year'
],
df_phd
[
'total'
],
color
=
'm'
,
label
=
'M.Phil / Ph.D'
)
plt
.
plot
(
df_bel_sec
[
'Year'
],
df_bel_sec
[
'total'
],
marker
=
'o'
,
color
=
'r'
,
label
=
'Below Secondary'
)
for
x
,
y
in
zip
(
df_bel_sec
[
'Year'
],
df_bel_sec
[
'total'
]):
plt
.
text
(
x
=
x
,
y
=
y
,
s
=
'{:.0f}'
.
format
(
y
),
color
=
'r'
,
rotation
=
15
,
fontsize
=
7
,
weight
=
'bold'
)
plt
.
plot
(
df_sec
[
'Year'
],
df_sec
[
'total'
],
marker
=
'+'
,
color
=
'g'
,
label
=
'Secondary'
)
for
x
,
y
in
zip
(
df_sec
[
'Year'
],
df_sec
[
'total'
]):
plt
.
text
(
x
=
x
,
y
=
y
,
s
=
'{:.0f}'
.
format
(
y
),
color
=
'g'
,
rotation
=
15
,
fontsize
=
7
,
weight
=
'bold'
)
plt
.
plot
(
df_hs
[
'Year'
],
df_hs
[
'total'
],
marker
=
'*'
,
color
=
'b'
,
label
=
'Higher Secondary'
)
for
x
,
y
in
zip
(
df_hs
[
'Year'
],
df_hs
[
'total'
]):
plt
.
text
(
x
=
x
,
y
=
y
,
s
=
'{:.0f}'
.
format
(
y
),
color
=
'b'
,
rotation
=
15
,
fontsize
=
7
,
weight
=
'bold'
)
plt
.
plot
(
df_grad
[
'Year'
],
df_grad
[
'total'
],
marker
=
'd'
,
color
=
'y'
,
label
=
'Graduate'
)
for
x
,
y
in
zip
(
df_grad
[
'Year'
],
df_grad
[
'total'
]):
plt
.
text
(
x
=
x
,
y
=
y
,
s
=
'{:.0f}'
.
format
(
y
),
color
=
'y'
,
rotation
=
15
,
fontsize
=
7
,
weight
=
'bold'
)
plt
.
plot
(
df_pg
[
'Year'
],
df_pg
[
'total'
],
marker
=
's'
,
color
=
'c'
,
label
=
'Post Graduate'
)
for
x
,
y
in
zip
(
df_pg
[
'Year'
],
df_pg
[
'total'
]):
plt
.
text
(
x
=
x
,
y
=
y
,
s
=
'{:.0f}'
.
format
(
y
),
color
=
'c'
,
rotation
=
15
,
fontsize
=
7
,
weight
=
'bold'
)
plt
.
plot
(
df_phd
[
'Year'
],
df_phd
[
'total'
],
marker
=
'x'
,
color
=
'm'
,
label
=
'M.Phil / Ph.D'
)
for
x
,
y
in
zip
(
df_phd
[
'Year'
],
df_phd
[
'total'
]):
plt
.
text
(
x
=
x
,
y
=
y
,
s
=
'{:.0f}'
.
format
(
y
),
color
=
'm'
,
rotation
=
15
,
fontsize
=
7
,
weight
=
'bold'
)
plt
.
legend
()
plt
.
title
(
label
=
'State: '
+
state_name
+
', Type: '
+
main_dimension
,
loc
=
"right"
,
fontsize
=
10
,
fontstyle
=
'italic'
)
plt
.
title
(
label
=
'State: '
+
state_name
+
', Type: '
+
main_dimension
,
fontweight
=
'bold'
,
fontsize
=
10
,
fontstyle
=
'italic'
)
plt
.
xticks
(
np
.
arange
(
min_year
,
max_year
+
1
,
1.0
))
plt
.
ylabel
(
'Number of Teachers'
)
plt
.
xlabel
(
'Year'
)
...
...
@@ -167,7 +179,7 @@ def total_classrooms_by_trend(output_filename, input_df, state_code):
plt
.
text
(
x
=
x
,
y
=
y
,
s
=
'{:.0f}'
.
format
(
y
),
color
=
'b'
,
rotation
=
15
,
fontsize
=
7
,
weight
=
'bold'
)
plt
.
legend
()
plt
.
title
(
label
=
'State: '
+
state_name
,
loc
=
"right"
,
fontsize
=
10
,
fontstyle
=
'italic'
)
plt
.
title
(
label
=
'State: '
+
state_name
,
fontweight
=
'bold'
,
fontsize
=
10
,
fontstyle
=
'italic'
)
plt
.
xticks
(
np
.
arange
(
min_year
,
max_year
+
1
,
1.0
))
plt
.
ylabel
(
'Number of Classrooms'
)
plt
.
xlabel
(
'Year'
)
...
...
@@ -210,7 +222,7 @@ def total_schools_for_facilities(output_filename, input_df, state_code):
plt
.
text
(
x
=
x
,
y
=
y
,
s
=
'{:.0f}'
.
format
(
y
),
color
=
'm'
,
rotation
=
15
,
fontsize
=
7
,
weight
=
'bold'
)
plt
.
legend
()
plt
.
title
(
label
=
'State: '
+
state_name
,
loc
=
"right"
,
fontsize
=
10
,
fontstyle
=
'italic'
)
plt
.
title
(
label
=
'State: '
+
state_name
,
fontweight
=
'bold'
,
fontsize
=
10
,
fontstyle
=
'italic'
)
plt
.
xticks
(
np
.
arange
(
min_year
,
max_year
+
1
,
1.0
))
plt
.
ylabel
(
'Number of Schools'
)
plt
.
xlabel
(
'Year'
)
...
...
@@ -252,7 +264,7 @@ def main_dimension_overall(output_filename, input_df, main_dimension, ylabel):
plt
.
text
(
x
=
x
,
y
=
y
,
s
=
'{:.0f}'
.
format
(
y
))
plt
.
legend
()
plt
.
title
(
label
=
'KPI: '
+
ylabel
,
loc
=
"right"
,
fontsize
=
10
,
fontstyle
=
'italic'
)
plt
.
title
(
label
=
'KPI: '
+
ylabel
,
fontweight
=
'bold'
,
fontsize
=
10
,
fontstyle
=
'italic'
)
plt
.
xticks
(
np
.
arange
(
min_year
,
max_year
+
1
,
1.0
))
plt
.
ylabel
(
ylabel
)
plt
.
xlabel
(
'Year'
)
...
...
@@ -293,7 +305,7 @@ def total_schools_for_facilities_overall(output_filename, input_df):
plt
.
text
(
x
=
x
,
y
=
y
,
s
=
'{:.0f}'
.
format
(
y
),
color
=
'm'
,
rotation
=
15
,
fontsize
=
7
,
weight
=
'bold'
)
plt
.
legend
()
plt
.
title
(
label
=
'KPI: Number of Schools'
,
loc
=
"right"
,
fontsize
=
10
,
fontstyle
=
'italic'
)
plt
.
title
(
label
=
'KPI: Number of Schools'
,
fontweight
=
'bold'
,
fontsize
=
10
,
fontstyle
=
'italic'
)
plt
.
xticks
(
np
.
arange
(
min_year
,
max_year
+
1
,
1.0
))
plt
.
ylabel
(
'Number of Schools'
)
plt
.
xlabel
(
'Year'
)
...
...
@@ -307,10 +319,10 @@ def get_index_summary(input_df):
schools
=
sum
(
input_df
[(
input_df
[
'Main_Dimension'
]
==
'School by Category'
)
&
(
input_df
[
'Year'
]
==
latest_year
)][
'total'
])
classrooms
=
sum
(
input_df
[(
input_df
[
'Main_Dimension'
]
==
'Total Classrooms'
)
&
(
input_df
[
'Year'
]
==
latest_year
)][
'total'
])
return
{
'students'
:
int
(
students
),
'teachers'
:
int
(
teachers
),
'schools'
:
int
(
schools
),
'classrooms'
:
int
(
classrooms
)
'students'
:
format_number
(
int
(
students
),
locale
=
'en_IN'
),
'teachers'
:
format_number
(
int
(
teachers
),
locale
=
'en_IN'
),
'schools'
:
format_number
(
int
(
schools
),
locale
=
'en_IN'
),
'classrooms'
:
format_number
(
int
(
classrooms
),
locale
=
'en_IN'
)
}
def
get_dimension_wise_summary
(
input_df
,
state_code
,
main_dimension
):
...
...
@@ -322,20 +334,20 @@ def get_dimension_wise_summary(input_df, state_code, main_dimension):
private
=
sum
(
df_fil
[(
df_fil
[
'Main_Dimension'
]
==
main_dimension
)
&
(
df_fil
[
'Sub_Dimension'
]
==
'Private'
)][
'total'
])
others
=
sum
(
df_fil
[(
df_fil
[
'Main_Dimension'
]
==
main_dimension
)
&
(
df_fil
[
'Sub_Dimension'
]
==
'Madrasas & Unrecognised'
)][
'total'
])
return
{
'total'
:
int
(
total
),
'govt'
:
int
(
govt
),
'private'
:
int
(
private
),
'others'
:
int
(
others
)
'total'
:
format_number
(
int
(
total
),
locale
=
'en_IN'
),
'govt'
:
format_number
(
int
(
govt
),
locale
=
'en_IN'
),
'private'
:
format_number
(
int
(
private
),
locale
=
'en_IN'
),
'others'
:
format_number
(
int
(
others
),
locale
=
'en_IN'
)
}
elif
main_dimension
==
'Total Classrooms'
:
good
=
sum
(
df_fil
[(
df_fil
[
'Main_Dimension'
]
==
main_dimension
)
&
(
df_fil
[
'Sub_Dimension'
]
==
'Good Condition'
)][
'total'
])
minor_repair
=
sum
(
df_fil
[(
df_fil
[
'Main_Dimension'
]
==
main_dimension
)
&
(
df_fil
[
'Sub_Dimension'
]
==
'Need Minor Repair'
)][
'total'
])
major_repair
=
sum
(
df_fil
[(
df_fil
[
'Main_Dimension'
]
==
main_dimension
)
&
(
df_fil
[
'Sub_Dimension'
]
==
'Need Major Repair'
)][
'total'
])
return
{
'total'
:
int
(
total
),
'good'
:
int
(
good
),
'minor_repair'
:
int
(
minor_repair
),
'major_repair'
:
int
(
major_repair
)
'total'
:
format_number
(
int
(
total
),
locale
=
'en_IN'
),
'good'
:
format_number
(
int
(
good
),
locale
=
'en_IN'
),
'minor_repair'
:
format_number
(
int
(
minor_repair
),
locale
=
'en_IN'
),
'major_repair'
:
format_number
(
int
(
major_repair
),
locale
=
'en_IN'
)
}
else
:
enrolment_lt_50
=
sum
(
df_fil
[(
df_fil
[
'Main_Dimension'
]
==
main_dimension
)
&
(
df_fil
[
'Sub_Dimension'
]
==
'Enrolment <= 50'
)][
'total'
])
...
...
@@ -345,10 +357,10 @@ def get_dimension_wise_summary(input_df, state_code, main_dimension):
single_classroom
=
sum
(
df_fil
[(
df_fil
[
'Main_Dimension'
]
==
main_dimension
)
&
(
df_fil
[
'Sub_Dimension'
]
==
'Single Classroom Schools'
)][
'total'
])
single_teacher
=
sum
(
df_fil
[(
df_fil
[
'Main_Dimension'
]
==
main_dimension
)
&
(
df_fil
[
'Sub_Dimension'
]
==
'Single Teacher Schools'
)][
'total'
])
return
{
'enrolment_lt_50'
:
int
(
enrolment_lt_50
),
'drinking_water'
:
int
(
drinking_water
),
'girls_toilet'
:
int
(
girls_toilet
),
'ramp'
:
int
(
ramp
),
'single_classroom'
:
int
(
single_classroom
),
'single_teacher'
:
int
(
single_teacher
)
'enrolment_lt_50'
:
format_number
(
int
(
enrolment_lt_50
),
locale
=
'en_IN'
),
'drinking_water'
:
format_number
(
int
(
drinking_water
),
locale
=
'en_IN'
),
'girls_toilet'
:
format_number
(
int
(
girls_toilet
),
locale
=
'en_IN'
),
'ramp'
:
format_number
(
int
(
ramp
),
locale
=
'en_IN'
),
'single_classroom'
:
format_number
(
int
(
single_classroom
),
locale
=
'en_IN'
),
'single_teacher'
:
format_number
(
int
(
single_teacher
),
locale
=
'en_IN'
)
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment