Commit 1c3d1780 authored by Manas Gabani's avatar Manas Gabani

summary added for statewise pages

parent 14972549
......@@ -200,7 +200,7 @@ def get_trend_for_teachers():
state_code = int(request.form['state_code'])
trend_teachers="img/trend_{}_{}.jpeg".format(request.form['type'], state_code)
total_teachers_by_main_dimension(os.path.join(app.config['UPLOAD_FOLDER'], trend_teachers), final_df, main_dimension, state_code)
teachers_summary = get_dimension_wise_summary(final_df, default_state_code, "Teachers by School Category")
teachers_summary = get_dimension_wise_summary(final_df, state_code, "Teachers by School Category")
return render_template('teachers.html', teachers_summary=teachers_summary, trend_teachers=trend_teachers, distribution_teachers_by_category=distribution_teachers_by_category, distribution_teachers_by_educational_qualification=distribution_teachers_by_educational_qualification, teachers_by_category_summary=teachers_by_category_summary, teachers_by_educational_qualification_summary=teachers_by_educational_qualification_summary, teachers_category=teachers_category, teachers_qualification=teachers_qualification)
@app.route('/get_distribution_for_teachers_by_category', methods=['POST'])
......@@ -228,7 +228,7 @@ def get_trend_for_schools():
state_code = int(request.form['state_code'])
trend_schools = "img/trend_{}_{}.jpeg".format(request.form['type'], state_code)
total_enrolment_by_category(os.path.join(app.config['UPLOAD_FOLDER'], trend_schools), final_df, main_dimension, state_code, ylabel='Number of Schools')
schools_summary = get_dimension_wise_summary(final_df, default_state_code, "School by Category")
schools_summary = get_dimension_wise_summary(final_df, state_code, "School by Category")
return render_template('schools.html', schools_summary=schools_summary, trend_schools=trend_schools, distribution_schools_by_category=distribution_schools_by_category, distribution_rural_schools_by_category=distribution_rural_schools_by_category, schools_by_category_summary=schools_by_category_summary, rural_schools_by_category_summary=rural_schools_by_category_summary, school_category=school_category, rural_school_category=rural_school_category)
@app.route('/get_distribution_of_schools_by_category', methods=['POST'])
......@@ -255,7 +255,7 @@ def get_trend_for_classrooms():
state_code = int(request.form['state_code'])
trend_classrooms = "img/trend_classrooms_{}.jpeg".format(state_code)
total_classrooms_by_trend(os.path.join(app.config['UPLOAD_FOLDER'], trend_classrooms), final_df, state_code)
classrooms_summary = get_dimension_wise_summary(final_df, default_state_code, "Total Classrooms")
classrooms_summary = get_dimension_wise_summary(final_df, state_code, "Total Classrooms")
return render_template('classrooms.html', classrooms_summary=classrooms_summary, trend_classrooms=trend_classrooms, distribution_classroom_by_condition=distribution_classroom_by_condition, classroom_condition_summary=classroom_condition_summary, classroom_condition=classroom_condition)
@app.route('/get_distribution_of_classroom_conditions', methods=['POST'])
......@@ -273,7 +273,7 @@ def get_trend_for_schools_with_facilities():
state_code = int(request.form['state_code'])
trend_school_facilities = "img/trend_school_facilities_{}.jpeg".format(state_code)
total_schools_for_facilities(os.path.join(app.config['UPLOAD_FOLDER'], trend_school_facilities), final_df, state_code)
facilities_summary = get_dimension_wise_summary(final_df, default_state_code, "School Facilities")
facilities_summary = get_dimension_wise_summary(final_df, state_code, "School Facilities")
return render_template('facilities.html', facilities_summary=facilities_summary, trend_school_facilities=trend_school_facilities, distribution_school_facility=distribution_school_facility, school_facility_summary=school_facility_summary, school_facility=school_facility)
@app.route('/get_distribution_of_school_facilities', methods=['POST'])
......
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