Commit d1945233 authored by Manas Gabani's avatar Manas Gabani

Added Distribution routes for students page

parent d90bbc6f
No preview for this file type
......@@ -14,25 +14,106 @@ import matplotlib.pyplot as plt
def read_all_csv(path='./rawdata_csv/', extension='csv'):
result = glob.glob(path+'SRC_R*.{}'.format(extension))
df=None
for file in result:
if(df is None):
df=pd.read_csv(file)
else:
df=pd.concat([df,pd.read_csv(file)], ignore_index=True)
df_master=pd.read_csv("SRC_MasterData.csv")
df_master=df_master[['State_Code','State_Name','Total_Population']]
final_df = pd.merge(df, df_master, on='State_Code', how='inner')
final_df['total']=final_df[['Primary_Only','Primary_with_Upper_Primary','Primary with_Upper_Primary_Sec_H.Sec','Upper_Primary_Only','Upper_Primary_with_Sec_H.Sec','Primary_with_Upper_Primary_Sec','Upper_Primary_with _Sec']].sum(axis=1)
final_df['total_by_pop']=final_df['total']/final_df['Total_Population']
final_df=final_df[["Year","State_Name","State_Code","Main_Dimension","Sub_Dimension","Total_Population",'total','total_by_pop']]
final_df['total']=final_df[['Primary_Only','Primary_with_Upper_Primary','Primary with_Upper_Primary_Sec_H.Sec','Upper_Primary_Only','Upper_Primary_with_Sec_H.Sec','Primary_with_Upper_Primary_Sec','Upper_Primary_with_Sec']].sum(axis=1)
final_df['total_by_population']=final_df['total']/final_df['Total_Population']
final_df=final_df[["Year","State_Name","State_Code","Main_Dimension","Sub_Dimension","Total_Population",'total','total_by_population']]
return final_df
final_df=read_all_csv()
latest_year = max(final_df['Year'])
dict_summary={"top3":[],"bottom3":[]}
form_value_to_sub_dimension_mapping = {
'govt':'Government',
'private':'Private',
'others':'Madrasas & Unrecognised'
}
# fig_size_w=16
# fig_size_h=13
fig_size_w, fig_size_h = 8, 6
def state_total_enrollments(main_df, year, file_name):
df_filtered=main_df.loc[(main_df['Main_Dimension'] == "Elementary Enrolment by School Category")]
df_filtered=df_filtered.loc[df_filtered['Year'] == year]
df_filtered=df_filtered[['Year','State_Name','total','total_by_population']]
df_sum = df_filtered.groupby(['State_Name','Year'],as_index = False).sum().sort_values("total_by_population",ascending=False)
fig = plt.figure(figsize=(fig_size_w,fig_size_h))
plt.xticks(rotation=90, ha="right")
plt.bar(df_sum['State_Name'],df_sum['total_by_population'], align='center')
plt.ylabel('Enrollements/population')
list_states=list(df_sum['State_Name'])
dict_summary['top3']=[list_states[0],list_states[1],list_states[2]]
dict_summary['bottom3']=[list_states[-1],list_states[-2],list_states[-3]]
plt.savefig(file_name)
plt.close(fig)
app = Flask(__name__)
return dict_summary
# state_total_enrollments(final_df,2010,"enrol")
def statewise_distribution(output_filename, input_df, year, main_dimension, sub_dimension=''):
# main_dimension = "Elementary Enrolment by School Category"
if sub_dimension:
df_filtered = input_df.loc[(input_df['Main_Dimension'] == main_dimension) & ((input_df['Sub_Dimension'] == sub_dimension))]
else:
df_filtered = input_df.loc[(input_df['Main_Dimension'] == main_dimension)]
df_filtered = df_filtered.loc[df_filtered['Year'] == year]
# print(df_filtered)
df_filtered = df_filtered[['Year','State_Name','total','total_by_population']]
df_sum = df_filtered.groupby(['State_Name','Year'],as_index = False).sum().sort_values("total_by_population",ascending=False)
# print(df_sum)
fig = plt.figure(figsize=(fig_size_w,fig_size_h))
plt.xticks(rotation=90, ha="right")
plt.bar(df_sum['State_Name'],df_sum['total_by_population'], align='center')
plt.ylabel('Enrollements/Population')
list_states=list(df_sum['State_Name'])
# print(list_states)
dict_summary['top3']=[list_states[0],list_states[1],list_states[2]]
dict_summary['bottom3']=[list_states[-1],list_states[-2],list_states[-3]]
plt.savefig(output_filename)
plt.close(fig)
return dict_summary
# statewise_distribution(os.path.join(app.config['UPLOAD_FOLDER'], "img/distribution_rural_enrolment.jpeg"), final_df, latest_year, main_dimension = "Rural Elementary Enrolment")
# statewise_distribution(os.path.join(app.config['UPLOAD_FOLDER'], "img/distribution_rural_enrolment.jpeg"), final_df, latest_year, main_dimension = "Rural Elementary Enrolment", sub_dimension="Government")
def state_total_enrollments_by_rural(main_df, year, file_name):
df_fil=main_df.loc[(main_df['Main_Dimension'] == "Rural Elementary Enrolment")]
df_fil=df_fil.loc[df_fil['Year'] == year]
df_fil=df_fil[['Year','State_Name','total','total_by_population']]
df_sum = df_fil.groupby(['State_Name','Year'],as_index = False).sum().sort_values("total_by_population",ascending=False)
fig = plt.figure(figsize=(fig_size_w,fig_size_h))
plt.xticks(rotation=90, ha="right")
plt.bar(df_sum['State_Name'],df_sum['total_by_population'], align='center')
plt.ylabel('Enrollements/population')
list_states=list(df_sum['State_Name'])
dict_summary['top3']=[list_states[0],list_states[1],list_states[2]]
dict_summary['bottom3']=[list_states[-1],list_states[-2],list_states[-3]]
plt.savefig(file_name)
plt.close(fig)
return df_sum
# state_total_enrollments(final_df,2010,"enrol")
app = Flask(__name__)
print(' ------------ Server Started ------------ ')
UPLOAD_FOLDER = 'static/'
app.secret_key = "secret key"
......@@ -80,9 +161,21 @@ def home():
def index():
return render_template('index.html')
distribution_rural_enrolment = ''
distribution_elementary_enrolment = ''
rural_enrolment_summary = {}
elementary_enrolment_summary = {}
rural_enrolment_category = ''
elementary_enrolment_category = ''
@app.route('/students.html')
def students():
return render_template('students.html')
global distribution_elementary_enrolment, distribution_rural_enrolment, rural_enrolment_summary, elementary_enrolment_summary, rural_enrolment_category, elementary_enrolment_category
elementary_enrolment_category, rural_enrolment_category = 'Government', 'Government'
distribution_rural_enrolment = "img/distribution_rural_enrolment_govt_{}.jpeg".format(latest_year)
rural_enrolment_summary = statewise_distribution(os.path.join(app.config['UPLOAD_FOLDER'], distribution_rural_enrolment), final_df, latest_year, main_dimension = "Rural Elementary Enrolment", sub_dimension=elementary_enrolment_category)
distribution_elementary_enrolment = "img/distribution_elementary_enrolment_govt_{}.jpeg".format(latest_year)
elementary_enrolment_summary = statewise_distribution(os.path.join(app.config['UPLOAD_FOLDER'], distribution_elementary_enrolment), final_df, latest_year, main_dimension = "Elementary Enrolment by School Category", sub_dimension=rural_enrolment_category)
return render_template('students.html', distribution_rural_enrolment=distribution_rural_enrolment, distribution_elementary_enrolment=distribution_elementary_enrolment, rural_enrolment_summary=rural_enrolment_summary, elementary_enrolment_summary=elementary_enrolment_summary, rural_enrolment_category=rural_enrolment_category, elementary_enrolment_category=elementary_enrolment_category)
@app.route('/teachers.html')
def teachers():
......@@ -119,11 +212,23 @@ def get_trend_from_students():
prepare_graph(trend_from_students)
return render_template('students.html', trend_from_students=trend_from_students)
@app.route('/get_distribution_from_students', methods=['POST'])
def get_distribution_from_students():
distribution_from_students = 'img/sample_distribution_students_new.jpeg'
prepare_graph(distribution_from_students)
return render_template('students.html', distribution_from_students=distribution_from_students)
@app.route('/get_distribution_for_elementary_enrolment', methods=['POST'])
def get_distribution_for_elementary_enrolment():
global form_value_to_sub_dimension_mapping, distribution_elementary_enrolment, distribution_rural_enrolment, elementary_enrolment_summary, rural_enrolment_summary, elementary_enrolment_category, rural_enrolment_category
elementary_enrolment_category = form_value_to_sub_dimension_mapping[request.form['category']]
requested_year = int(request.form['year'])
distribution_elementary_enrolment = "img/distribution_elementary_enrolment_{}_{}.jpeg".format(request.form['category'], requested_year)
elementary_enrolment_summary = statewise_distribution(os.path.join(app.config['UPLOAD_FOLDER'], distribution_elementary_enrolment), final_df, requested_year, main_dimension = "Elementary Enrolment by School Category", sub_dimension=elementary_enrolment_category)
return render_template('students.html', distribution_rural_enrolment=distribution_rural_enrolment, distribution_elementary_enrolment=distribution_elementary_enrolment, rural_enrolment_summary=rural_enrolment_summary, elementary_enrolment_summary=elementary_enrolment_summary, rural_enrolment_category=rural_enrolment_category, elementary_enrolment_category=elementary_enrolment_category)
@app.route('/get_distribution_for_rural_enrolment', methods=['POST'])
def get_distribution_for_rural_enrolment():
global form_value_to_sub_dimension_mapping, distribution_elementary_enrolment, distribution_rural_enrolment, elementary_enrolment_summary, rural_enrolment_summary, elementary_enrolment_category, rural_enrolment_category
rural_enrolment_category = form_value_to_sub_dimension_mapping[request.form['category']]
requested_year = int(request.form['year'])
distribution_rural_enrolment = "img/distribution_elementary_enrolment_{}_{}.jpeg".format(request.form['category'], requested_year)
rural_enrolment_summary = statewise_distribution(os.path.join(app.config['UPLOAD_FOLDER'], distribution_rural_enrolment), final_df, requested_year, main_dimension = "Elementary Enrolment by School Category", sub_dimension=rural_enrolment_category)
return render_template('students.html', distribution_rural_enrolment=distribution_rural_enrolment, distribution_elementary_enrolment=distribution_elementary_enrolment, rural_enrolment_summary=rural_enrolment_summary, elementary_enrolment_summary=elementary_enrolment_summary, rural_enrolment_category=rural_enrolment_category, elementary_enrolment_category=elementary_enrolment_category)
@app.route('/get_trend_from_teachers', methods=['POST'])
def get_trend_from_teachers():
......@@ -173,28 +278,6 @@ def get_distribution_from_facilities():
prepare_graph(distribution_from_facilities)
return render_template('facilities.html', distribution_from_facilities=distribution_from_facilities)
# submit image and display
# @app.route('/', methods=['POST'])
# def upload_image():
# print(request.files)
# if 'file' not in request.files:
# flash('No file part')
# return redirect(request.url)
# file = request.files['file']
# if file.filename == '':
# flash('No image selected for uploading')
# return redirect(request.url)
# if file and allowed_file(file.filename):
# filename = secure_filename(file.filename)
# file.save(os.path.join(app.config['UPLOAD_FOLDER'], filename))
# print('upload_image filename: ' + filename)
# flash('Image successfully uploaded and displayed below')
# return render_template('index.html', filename=filename)
# else:
# flash('Allowed image types are - png, jpg, jpeg, gif')
# # print(request.url)
# return redirect(request.url)
# # @app.route('/display/<filename>')
# @app.route('/display/<filename>')
# def display_image(filename):
......
Year,State_Code,Primary_Only,Primary_with_Upper_Primary,Primary with_Upper_Primary_Sec_H.Sec,Upper_Primary_Only,Upper_Primary_with_Sec_H.Sec,Primary_with_Upper_Primary_Sec,Upper_Primary_with _Sec,No_Response,Main_Dimension,Sub_Dimension
Year,State_Code,Primary_Only,Primary_with_Upper_Primary,Primary with_Upper_Primary_Sec_H.Sec,Upper_Primary_Only,Upper_Primary_with_Sec_H.Sec,Primary_with_Upper_Primary_Sec,Upper_Primary_with_Sec,No_Response,Main_Dimension,Sub_Dimension
2006,1,10583,4618,912,42,316,,,0,School by Category,Government
2006,2,10620,5,20,2171,1692,,,13,School by Category,Government
2006,3,13090,523,414,2088,2713,,,0,School by Category,Government
......
Year,State_Code,Primary_Only,Primary_with_Upper_Primary,Primary with_Upper_Primary_Sec_H.Sec,Upper_Primary_Only,Upper_Primary_with_Sec_H.Sec,Primary_with_Upper_Primary_Sec,Upper_Primary_with _Sec,No_Response,Main_Dimension,Sub_Dimension
Year,State_Code,Primary_Only,Primary_with_Upper_Primary,Primary with_Upper_Primary_Sec_H.Sec,Upper_Primary_Only,Upper_Primary_with_Sec_H.Sec,Primary_with_Upper_Primary_Sec,Upper_Primary_with_Sec,No_Response,Main_Dimension,Sub_Dimension
2007,1,10532,4645,961,54,310,,,0,School by Category,Government
2007,2,10692,3,27,2401,1845,,,5,School by Category,Government
2007,3,12985,46,139,2312,3026,,,0,School by Category,Government
......
Year,State_Code,Primary_Only,Primary_with_Upper_Primary,Primary with_Upper_Primary_Sec_H.Sec,Upper_Primary_Only,Upper_Primary_with_Sec_H.Sec,Primary_with_Upper_Primary_Sec,Upper_Primary_with _Sec,No_Response,Main_Dimension,Sub_Dimension
Year,State_Code,Primary_Only,Primary_with_Upper_Primary,Primary with_Upper_Primary_Sec_H.Sec,Upper_Primary_Only,Upper_Primary_with_Sec_H.Sec,Primary_with_Upper_Primary_Sec,Upper_Primary_with_Sec,No_Response,Main_Dimension,Sub_Dimension
2008,1,14205,5119,1109,65,368,,,0,School by Category,Government
2008,2,10718,6,31,2324,1992,,,0,School by Category,Government
2008,3,13393,115,246,2468,3104,,,0,School by Category,Government
......
Year,State_Code,Primary_Only,Primary_with_Upper_Primary,Primary with_Upper_Primary_Sec_H.Sec,Upper_Primary_Only,Upper_Primary_with_Sec_H.Sec,Primary_with_Upper_Primary_Sec,Upper_Primary_with _Sec,No_Response,Main_Dimension,Sub_Dimension
Year,State_Code,Primary_Only,Primary_with_Upper_Primary,Primary with_Upper_Primary_Sec_H.Sec,Upper_Primary_Only,Upper_Primary_with_Sec_H.Sec,Primary_with_Upper_Primary_Sec,Upper_Primary_with_Sec,No_Response,Main_Dimension,Sub_Dimension
2009,1,13425,6302,1062,106,415,,,1,School by Category,Government
2009,2,10717,6,20,2328,2020,,,0,School by Category,Government
2009,3,13438,85,283,3028,3133,,,2,School by Category,Government
......
Year,State_Code,Primary_Only,Primary_with_Upper_Primary,Primary with_Upper_Primary_Sec_H.Sec,Upper_Primary_Only,Upper_Primary_with_Sec_H.Sec,Primary_with_Upper_Primary_Sec,Upper_Primary_with _Sec,No_Response,Main_Dimension,Sub_Dimension
Year,State_Code,Primary_Only,Primary_with_Upper_Primary,Primary with_Upper_Primary_Sec_H.Sec,Upper_Primary_Only,Upper_Primary_with_Sec_H.Sec,Primary_with_Upper_Primary_Sec,Upper_Primary_with_Sec,No_Response,Main_Dimension,Sub_Dimension
2010,1,13138,7064,1029,114,835,,,0,School by Category,Government
2010,2,10719,7,24,2304,2072,,,0,School by Category,Government
2010,3,13449,66,463,3041,3216,,,3,School by Category,Government
......
Year,State_Code,Primary_Only,Primary_with_Upper_Primary,Primary with_Upper_Primary_Sec_H.Sec,Upper_Primary_Only,Upper_Primary_with_Sec_H.Sec,Primary_with_Upper_Primary_Sec,Upper_Primary_with _Sec,No_Response,Main_Dimension,Sub_Dimension
Year,State_Code,Primary_Only,Primary_with_Upper_Primary,Primary with_Upper_Primary_Sec_H.Sec,Upper_Primary_Only,Upper_Primary_with_Sec_H.Sec,Primary_with_Upper_Primary_Sec,Upper_Primary_with_Sec,No_Response,Main_Dimension,Sub_Dimension
2011,1,13096,7764,1103,128,447,,,0,School by Category,Government
2011,2,10577,9,26,2271,2118,,,0,School by Category,Government
2011,3,13453,105,525,2993,3292,,,2,School by Category,Government
......
Year,State_Code,Primary_Only,Primary_with_Upper_Primary,Primary with_Upper_Primary_Sec_H.Sec,Upper_Primary_Only,Upper_Primary_with_Sec_H.Sec,Primary_with_Upper_Primary_Sec,Upper_Primary_with _Sec,No_Response,Main_Dimension,Sub_Dimension
Year,State_Code,Primary_Only,Primary_with_Upper_Primary,Primary with_Upper_Primary_Sec_H.Sec,Upper_Primary_Only,Upper_Primary_with_Sec_H.Sec,Primary_with_Upper_Primary_Sec,Upper_Primary_with_Sec,No_Response,Main_Dimension,Sub_Dimension
2012,1,13288,7843,288,131,147,1085,321,0,School by Category,Government
2012,2,10619,6,23,2279,1335,6,843,0,School by Category,Government
2012,3,13368,117,270,2928,1549,196,1786,0,School by Category,Government
......
Year,State_Code,Primary_Only,Primary_with_Upper_Primary,Primary with_Upper_Primary_Sec_H.Sec,Upper_Primary_Only,Upper_Primary_with_Sec_H.Sec,Primary_with_Upper_Primary_Sec,Upper_Primary_with _Sec,No_Response,Main_Dimension,Sub_Dimension
Year,State_Code,Primary_Only,Primary_with_Upper_Primary,Primary with_Upper_Primary_Sec_H.Sec,Upper_Primary_Only,Upper_Primary_with_Sec_H.Sec,Primary_with_Upper_Primary_Sec,Upper_Primary_with_Sec,No_Response,Main_Dimension,Sub_Dimension
2013,1,13288,7867,115,135,103,1328,398,0,School by Category,Government
2013,2,10656,5,27,2322,1373,3,833,0,School by Category,Government
2013,3,13535,552,426,2881,1589,529,1825,6,School by Category,Government
......
Year,State_Code,Primary_Only,Primary_with_Upper_Primary,Primary with_Upper_Primary_Sec_H.Sec,Upper_Primary_Only,Upper_Primary_with_Sec_H.Sec,Primary_with_Upper_Primary_Sec,Upper_Primary_with _Sec,No_Response,Main_Dimension,Sub_Dimension
Year,State_Code,Primary_Only,Primary_with_Upper_Primary,Primary with_Upper_Primary_Sec_H.Sec,Upper_Primary_Only,Upper_Primary_with_Sec_H.Sec,Primary_with_Upper_Primary_Sec,Upper_Primary_with_Sec,No_Response,Main_Dimension,Sub_Dimension
2014,1,13255,7978,101,133,93,1413,405,0,School by Category,Government
2014,2,10717,4,26,2202,1555,4,847,0,School by Category,Government
2014,3,13456,393,259,2883,1614,319,1817,0,School by Category,Government
......
Year,State_Code,Primary_Only,Primary_with_Upper_Primary,Primary with_Upper_Primary_Sec_H.Sec,Upper_Primary_Only,Upper_Primary_with_Sec_H.Sec,Primary_with_Upper_Primary_Sec,Upper_Primary_with _Sec,No_Response,Main_Dimension,Sub_Dimension
Year,State_Code,Primary_Only,Primary_with_Upper_Primary,Primary with_Upper_Primary_Sec_H.Sec,Upper_Primary_Only,Upper_Primary_with_Sec_H.Sec,Primary_with_Upper_Primary_Sec,Upper_Primary_with_Sec,No_Response,Main_Dimension,Sub_Dimension
2015,1,13166,8026,98,133,92,1401,413,0,School by Category,Government
2015,2,10716,5,24,2131,1623,7,880,0,School by Category,Government
2015,3,13250,328,309,2858,1631,283,1829,0,School by Category,Government
......
Year,State_Code,Primary_Only,Primary_with_Upper_Primary,Primary with_Upper_Primary_Sec_H.Sec,Upper_Primary_Only,Upper_Primary_with_Sec_H.Sec,Primary_with_Upper_Primary_Sec,Upper_Primary_with _Sec,No_Response,Main_Dimension,Sub_Dimension
Year,State_Code,Primary_Only,Primary_with_Upper_Primary,Primary with_Upper_Primary_Sec_H.Sec,Upper_Primary_Only,Upper_Primary_with_Sec_H.Sec,Primary_with_Upper_Primary_Sec,Upper_Primary_with_Sec,No_Response,Main_Dimension,Sub_Dimension
2016,1,13181,8027,106,134,92,1407,401,0,School by Category,Government
2016,2,10730,5,26,2065,1733,6,924,0,School by Category,Government
2016,3,13226,345,338,2678,1956,293,1688,0,School by Category,Government
......
static/img/sample_trend_schools.jpeg

30.2 KB | W: | H:

static/img/sample_trend_schools.jpeg

28.8 KB | W: | H:

static/img/sample_trend_schools.jpeg
static/img/sample_trend_schools.jpeg
static/img/sample_trend_schools.jpeg
static/img/sample_trend_schools.jpeg
  • 2-up
  • Swipe
  • Onion skin
......@@ -107,66 +107,117 @@
<div class="content-2">
<div class="new-students">
<div class="title">
Distribution across states
</div>
<form method="POST" action="/get_distribution_from_students">
Select state:
<select name="state" class="state">
<option value="Maharashtra">Maharashtra</option>
<option value="Gujarat">Gujarat</option>
<option value="Karnataka">Karnataka</option>
<option value="Kerela">Kerela</option>
Distribution across states for Elementary Enrolment in {% print(elementary_enrolment_category) %} Schools
</div>
<form method="POST" action="/get_distribution_for_elementary_enrolment">
Select Year:
<select name="year" class="year">
<option value="2016">2016</option>
<option value="2015">2015</option>
<option value="2014">2014</option>
<option value="2013">2013</option>
<option value="2012">2012</option>
<option value="2011">2011</option>
<option value="2010">2010</option>
<option value="2009">2009</option>
<option value="2008">2008</option>
<option value="2007">2007</option>
<option value="2006">2006</option>
</select>
Select type:
<select name="type" class="type">
<option value="government">Government</option>
Select Category:
<select name="category" class="category">
<option value="govt">Government</option>
<option value="private">Private</option>
<option value="others">Madrasas and Others</option>
</select>
<input name="get_distribution_from_students" type="submit" value="Submit">
<input name="get_distribution_for_elementary_enrolment" type="submit" value="Submit">
</form>
{% if distribution_from_students %}
<div>
<img src="{{ url_for('static', filename=distribution_from_students) }}">
<img src="{{ url_for('static', filename=distribution_elementary_enrolment) }}">
</div>
{% else %}
<div>
<img src="{{ url_for('static', filename='img/sample_distribution_students.jpeg') }}">
</div>
{% endif %}
</div>
</div>
{% if distribution_from_students %}
<div class="cards">
<div class="card">
<div class="box">
<h1>2194</h1>
<h3>Government</h3>
</div>
<div class="icon-case">
<img src="{{ url_for('static', filename='img/students.png') }}" alt="">
</div>
<div class="content-2">
<div class="new-students">
<div class="title">
Top Performing States
</div>
<div class="card">
<div class="box">
<h1>53</h1>
<h3>Private</h3>
<table>
<tr>
<th>Rank</th>
<th>Name</th>
</tr>
<tr>
<td>1</td>
<td>{% print(elementary_enrolment_summary['top3'][0]) %}</td>
</tr>
<tr>
<td>2</td>
<td>{% print(elementary_enrolment_summary['top3'][1]) %}</td>
</tr>
<tr>
<td>3</td>
<td>{% print(elementary_enrolment_summary['top3'][2]) %}</td>
</tr>
</table>
</div>
<div class="icon-case">
<img src="{{ url_for('static', filename='img/teachers.png') }}" alt="">
<div class="new-students">
<div class="title">
Worst Performing States
</div>
<table>
<tr>
<th>Rank</th>
<th>Name</th>
</tr>
<tr>
<td>1</td>
<td>{% print(elementary_enrolment_summary['bottom3'][0]) %}</td>
</tr>
<tr>
<td>2</td>
<td>{% print(elementary_enrolment_summary['bottom3'][1]) %}</td>
</tr>
<tr>
<td>3</td>
<td>{% print(elementary_enrolment_summary['bottom3'][2]) %}</td>
</tr>
</table>
</div>
<div class="card">
<div class="box">
<h1>5</h1>
<h3>Others</h3>
</div>
<div class="icon-case">
<img src="{{ url_for('static', filename='img/schools.png') }}" alt="">
<div class="content-2">
<div class="new-students">
<div class="title">
Distribution across states for Rural Enrolment in {% print(rural_enrolment_category) %} Schools
</div>
<form method="POST" action="/get_distribution_for_rural_enrolment">
Select Year:
<select name="year" class="year">
<option value="2016">2016</option>
<option value="2015">2015</option>
<option value="2014">2014</option>
<option value="2013">2013</option>
<option value="2012">2012</option>
<option value="2011">2011</option>
<option value="2010">2010</option>
<option value="2009">2009</option>
<option value="2008">2008</option>
<option value="2007">2007</option>
<option value="2006">2006</option>
</select>
Select Category:
<select name="category" class="category">
<option value="govt">Government</option>
<option value="private">Private</option>
</select>
<input name="get_distribution_for_rural_enrolment" type="submit" value="Submit">
</form>
<div>
<img src="{{ url_for('static', filename=distribution_rural_enrolment) }}">
</div>
</div>
</div>
{% else %}
<div class="content-2">
<div class="new-students">
<div class="title">
......@@ -179,15 +230,15 @@
</tr>
<tr>
<td>1</td>
<td>Maharashtra</td>
<td>{% print(rural_enrolment_summary['top3'][0]) %}</td>
</tr>
<tr>
<td>2</td>
<td>Gujarat</td>
<td>{% print(rural_enrolment_summary['top3'][1]) %}</td>
</tr>
<tr>
<td>3</td>
<td>Karnataka</td>
<td>{% print(rural_enrolment_summary['top3'][2]) %}</td>
</tr>
</table>
</div>
......@@ -202,20 +253,20 @@
</tr>
<tr>
<td>1</td>
<td>West Bengal</td>
<td>{% print(rural_enrolment_summary['bottom3'][0]) %}</td>
</tr>
<tr>
<td>2</td>
<td>Orissa</td>
<td>{% print(rural_enrolment_summary['bottom3'][1]) %}</td>
</tr>
<tr>
<td>3</td>
<td>Bihar</td>
<td>{% print(rural_enrolment_summary['bottom3'][2]) %}</td>
</tr>
</table>
</div>
</div>
{% endif %}
</div>
</div>
</body>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment