diff --git a/Controller/EducationDataController.py b/Controller/EducationDataController.py new file mode 100644 index 0000000..1a132a4 --- /dev/null +++ b/Controller/EducationDataController.py @@ -0,0 +1,67 @@ +from fastapi import APIRouter, Query +from Model.EducationDataModel import EducationDataModel + + +# 创建APIRouter实例 +router = APIRouter(prefix="/EducationData", tags=["教育统计数据"]) + + +@router.get("/byYear") +async def get_education_data_by_year( + year: int = Query(default=2023, ge=2015, le=2028, + description="年份: 2015-2028范围内的年份") +): + """获取指定年份所有学段的教育数据""" + try: + # 调用EducationDataModel的方法获取数据 + data = EducationDataModel.get_education_data_by_year(year) + + # 返回包含状态和数据的响应 + return { + "code": 200, + "message": "success", + "data": data + } + except Exception as e: + # 异常处理 + return { + "code": 500, + "message": f"获取数据失败: {str(e)}", + "data": [] + } + + +@router.get("/populationByYear") +async def get_population_data_by_year( + year: int = Query(default=2023, ge=2015, le=2028, + description="年份: 2015-2028范围内的年份") +): + """获取指定年份的云南省人口数据""" + try: + # 调用EducationDataModel的方法获取人口数据 + data = EducationDataModel.get_population_data_by_year(year) + + if data: + # 返回包含状态和数据的响应 + return { + "code": 200, + "message": "success", + "data": data + } + else: + # 未找到数据的情况 + return { + "code": 404, + "message": f"未找到{year}年的云南省人口数据", + "data": None + } + except Exception as e: + # 异常处理 + return { + "code": 500, + "message": f"获取数据失败: {str(e)}", + "data": None + } + + + diff --git a/Controller/RuYuanZaiYuanCountController.py b/Controller/RuYuanZaiYuanCountController.py index 0db2748..4f3de7d 100644 --- a/Controller/RuYuanZaiYuanCountController.py +++ b/Controller/RuYuanZaiYuanCountController.py @@ -1,21 +1,24 @@ -from fastapi import APIRouter +from fastapi import APIRouter, Query from Model.RuYuanZaiYuanCountModel import RuYuanZaiYuanModel # 创建APIRouter实例 -router = APIRouter(prefix="/RuYuanZaiYuan", tags=["大屏展示"]) - -# 默认的根路由 -@router.get("/") -async def root(): - return {"message": "Welcome to YunNan Education World!"} - -@router.get("/school/preschool/chart") -async def get_preschool_education_chart_config(): - return RuYuanZaiYuanModel.generate_preschool_education_config() - -@router.get("/school/preschool/inschool/chart") -async def get_preschool_in_school_chart_config(): - return RuYuanZaiYuanModel.generate_in_school_education_config() +router = APIRouter(prefix="/RuYuanZaiYuan", tags=["入校、在校人数统计"]) + + +@router.get("/school/chart") +async def get_education_chart_config( + education_stage: str = Query(default="preschool", pattern="^(preschool|primary|junior|senior)$", + description="教育阶段: preschool(学前), primary(小学), junior(初中), senior(高中)") +): + return RuYuanZaiYuanModel.generate_preschool_education_config(education_stage) + +@router.get("/school/inschool/chart") +async def get_in_school_chart_config( + education_stage: str = Query(default="preschool", pattern="^(preschool|primary|junior|senior)$", + description="教育阶段: preschool(学前), primary(小学), junior(初中), senior(高中)") +): + return RuYuanZaiYuanModel.generate_in_school_education_config(education_stage) + diff --git a/Controller/__pycache__/EducationDataController.cpython-310.pyc b/Controller/__pycache__/EducationDataController.cpython-310.pyc new file mode 100644 index 0000000..60b2777 Binary files /dev/null and b/Controller/__pycache__/EducationDataController.cpython-310.pyc differ diff --git a/Controller/__pycache__/RuYuanZaiYuanCountController.cpython-310.pyc b/Controller/__pycache__/RuYuanZaiYuanCountController.cpython-310.pyc index b673b4e..09b98a0 100644 Binary files a/Controller/__pycache__/RuYuanZaiYuanCountController.cpython-310.pyc and b/Controller/__pycache__/RuYuanZaiYuanCountController.cpython-310.pyc differ diff --git a/Data/SchoolCount.json b/Data/SchoolCount.json index 6c27965..3d7969d 100644 --- a/Data/SchoolCount.json +++ b/Data/SchoolCount.json @@ -107,7 +107,7 @@ "rural": 1670 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 1682, "town": 194, @@ -159,7 +159,7 @@ "rural": 740 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 465, "town": 174, @@ -332,7 +332,7 @@ "rural": 103 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 192, "town": 96, @@ -384,7 +384,7 @@ "rural": 56 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 95, "town": 75, @@ -557,7 +557,7 @@ "rural": 0 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 15, "town": 13, @@ -609,7 +609,7 @@ "rural": 0 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 20, "town": 20, @@ -782,7 +782,7 @@ "rural": 0 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 20, "town": 20, @@ -834,7 +834,7 @@ "rural": 0 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 9, "town": 8, @@ -1007,7 +1007,7 @@ "rural": 0 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 31, "town": 29, @@ -1059,7 +1059,7 @@ "rural": 0 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 22, "town": 20, @@ -1232,7 +1232,7 @@ "rural": 0 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 23, "town": 19, @@ -1284,7 +1284,7 @@ "rural": 0 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 13, "town": 13, @@ -1457,7 +1457,7 @@ "rural": 4 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 10, "town": 2, @@ -1509,7 +1509,7 @@ "rural": 6 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 2, @@ -1682,7 +1682,7 @@ "rural": 0 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 5, "town": 4, @@ -1734,7 +1734,7 @@ "rural": 0 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 6, "town": 6, @@ -1907,7 +1907,7 @@ "rural": 2 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 11, "town": 0, @@ -1959,7 +1959,7 @@ "rural": 1 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -2132,7 +2132,7 @@ "rural": 10 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 6, "town": 0, @@ -2184,7 +2184,7 @@ "rural": 4 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -2357,7 +2357,7 @@ "rural": 27 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 15, "town": 0, @@ -2409,7 +2409,7 @@ "rural": 8 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -2582,7 +2582,7 @@ "rural": 11 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 5, "town": 0, @@ -2634,7 +2634,7 @@ "rural": 4 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -2807,7 +2807,7 @@ "rural": 12 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 8, "town": 0, @@ -2859,7 +2859,7 @@ "rural": 6 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 3, "town": 0, @@ -3032,7 +3032,7 @@ "rural": 15 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 17, "town": 0, @@ -3084,7 +3084,7 @@ "rural": 13 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -3257,7 +3257,7 @@ "rural": 20 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 17, "town": 0, @@ -3309,7 +3309,7 @@ "rural": 13 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 4, "town": 0, @@ -3482,7 +3482,7 @@ "rural": 1 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 9, "town": 9, @@ -3534,7 +3534,7 @@ "rural": 0 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 6, "town": 6, @@ -3707,7 +3707,7 @@ "rural": 319 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 188, "town": 22, @@ -3759,7 +3759,7 @@ "rural": 100 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 56, "town": 20, @@ -3932,7 +3932,7 @@ "rural": 8 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 21, "town": 14, @@ -3984,7 +3984,7 @@ "rural": 3 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 11, "town": 10, @@ -4157,7 +4157,7 @@ "rural": 2 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 10, "town": 0, @@ -4209,7 +4209,7 @@ "rural": 0 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -4382,7 +4382,7 @@ "rural": 30 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 17, "town": 0, @@ -4434,7 +4434,7 @@ "rural": 10 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 9, "town": 0, @@ -4607,7 +4607,7 @@ "rural": 46 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 14, "town": 0, @@ -4659,7 +4659,7 @@ "rural": 11 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 3, "town": 0, @@ -4832,7 +4832,7 @@ "rural": 44 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 21, "town": 0, @@ -4884,7 +4884,7 @@ "rural": 14 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 3, "town": 0, @@ -5057,7 +5057,7 @@ "rural": 66 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 17, "town": 0, @@ -5109,7 +5109,7 @@ "rural": 17 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 7, "town": 0, @@ -5282,7 +5282,7 @@ "rural": 40 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 32, "town": 0, @@ -5334,7 +5334,7 @@ "rural": 23 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 3, "town": 0, @@ -5507,7 +5507,7 @@ "rural": 3 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 19, "town": 0, @@ -5559,7 +5559,7 @@ "rural": 2 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 6, "town": 0, @@ -5732,7 +5732,7 @@ "rural": 80 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 37, "town": 8, @@ -5784,7 +5784,7 @@ "rural": 20 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 12, "town": 10, @@ -5957,7 +5957,7 @@ "rural": 87 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 86, "town": 9, @@ -6009,7 +6009,7 @@ "rural": 35 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 21, "town": 7, @@ -6182,7 +6182,7 @@ "rural": 1 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 17, "town": 9, @@ -6234,7 +6234,7 @@ "rural": 0 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 7, "town": 7, @@ -6407,7 +6407,7 @@ "rural": 8 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 12, "town": 0, @@ -6459,7 +6459,7 @@ "rural": 4 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -6632,7 +6632,7 @@ "rural": 6 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 4, "town": 0, @@ -6684,7 +6684,7 @@ "rural": 0 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 1, "town": 0, @@ -6857,7 +6857,7 @@ "rural": 21 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 7, "town": 0, @@ -6909,7 +6909,7 @@ "rural": 7 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 3, "town": 0, @@ -7082,7 +7082,7 @@ "rural": 16 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 8, "town": 0, @@ -7134,7 +7134,7 @@ "rural": 5 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -7307,7 +7307,7 @@ "rural": 8 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 8, "town": 0, @@ -7359,7 +7359,7 @@ "rural": 4 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 1, "town": 0, @@ -7532,7 +7532,7 @@ "rural": 8 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 9, "town": 0, @@ -7584,7 +7584,7 @@ "rural": 6 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -7757,7 +7757,7 @@ "rural": 9 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 12, "town": 0, @@ -7809,7 +7809,7 @@ "rural": 6 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 1, "town": 0, @@ -7982,7 +7982,7 @@ "rural": 10 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 9, "town": 0, @@ -8034,7 +8034,7 @@ "rural": 3 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -8207,7 +8207,7 @@ "rural": 53 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 89, "town": 2, @@ -8259,7 +8259,7 @@ "rural": 23 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 32, "town": 5, @@ -8432,7 +8432,7 @@ "rural": 5 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 23, "town": 2, @@ -8484,7 +8484,7 @@ "rural": 2 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 13, "town": 5, @@ -8657,7 +8657,7 @@ "rural": 10 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 15, "town": 0, @@ -8709,7 +8709,7 @@ "rural": 3 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 3, "town": 0, @@ -8882,7 +8882,7 @@ "rural": 12 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 22, "town": 0, @@ -8934,7 +8934,7 @@ "rural": 5 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 9, "town": 0, @@ -9107,7 +9107,7 @@ "rural": 8 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 13, "town": 0, @@ -9159,7 +9159,7 @@ "rural": 3 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 4, "town": 0, @@ -9332,7 +9332,7 @@ "rural": 18 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 16, "town": 0, @@ -9384,7 +9384,7 @@ "rural": 10 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 3, "town": 0, @@ -9557,7 +9557,7 @@ "rural": 203 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 180, "town": 8, @@ -9609,7 +9609,7 @@ "rural": 98 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 49, "town": 8, @@ -9782,7 +9782,7 @@ "rural": 11 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 26, "town": 8, @@ -9834,7 +9834,7 @@ "rural": 6 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 10, "town": 8, @@ -10007,7 +10007,7 @@ "rural": 25 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 12, "town": 0, @@ -10059,7 +10059,7 @@ "rural": 10 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 3, "town": 0, @@ -10232,7 +10232,7 @@ "rural": 20 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 20, "town": 0, @@ -10284,7 +10284,7 @@ "rural": 12 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 3, "town": 0, @@ -10457,7 +10457,7 @@ "rural": 21 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 11, "town": 0, @@ -10509,7 +10509,7 @@ "rural": 5 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 3, "town": 0, @@ -10682,7 +10682,7 @@ "rural": 14 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 11, "town": 0, @@ -10734,7 +10734,7 @@ "rural": 5 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -10907,7 +10907,7 @@ "rural": 17 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 17, "town": 0, @@ -10959,7 +10959,7 @@ "rural": 12 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 3, "town": 0, @@ -11132,7 +11132,7 @@ "rural": 9 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 5, "town": 0, @@ -11184,7 +11184,7 @@ "rural": 5 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 1, "town": 0, @@ -11357,7 +11357,7 @@ "rural": 44 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 44, "town": 0, @@ -11409,7 +11409,7 @@ "rural": 19 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 16, "town": 0, @@ -11582,7 +11582,7 @@ "rural": 19 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 16, "town": 0, @@ -11634,7 +11634,7 @@ "rural": 15 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 4, "town": 0, @@ -11807,7 +11807,7 @@ "rural": 20 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 14, "town": 0, @@ -11859,7 +11859,7 @@ "rural": 9 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -12032,7 +12032,7 @@ "rural": 3 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 4, "town": 0, @@ -12084,7 +12084,7 @@ "rural": 0 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -12257,7 +12257,7 @@ "rural": 56 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 58, "town": 7, @@ -12309,7 +12309,7 @@ "rural": 22 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 16, "town": 3, @@ -12482,7 +12482,7 @@ "rural": 2 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 8, "town": 7, @@ -12534,7 +12534,7 @@ "rural": 1 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 3, "town": 3, @@ -12707,7 +12707,7 @@ "rural": 7 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 11, "town": 0, @@ -12759,7 +12759,7 @@ "rural": 5 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 3, "town": 0, @@ -12932,7 +12932,7 @@ "rural": 20 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 21, "town": 0, @@ -12984,7 +12984,7 @@ "rural": 8 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 5, "town": 0, @@ -13157,7 +13157,7 @@ "rural": 16 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 3, "town": 0, @@ -13209,7 +13209,7 @@ "rural": 2 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 3, "town": 0, @@ -13382,7 +13382,7 @@ "rural": 11 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 15, "town": 0, @@ -13434,7 +13434,7 @@ "rural": 6 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -13607,7 +13607,7 @@ "rural": 90 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 104, "town": 4, @@ -13659,7 +13659,7 @@ "rural": 59 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 24, "town": 4, @@ -13832,7 +13832,7 @@ "rural": 3 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 9, "town": 4, @@ -13884,7 +13884,7 @@ "rural": 3 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 4, "town": 4, @@ -14057,7 +14057,7 @@ "rural": 10 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 10, "town": 0, @@ -14109,7 +14109,7 @@ "rural": 6 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 1, "town": 0, @@ -14282,7 +14282,7 @@ "rural": 17 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 18, "town": 0, @@ -14334,7 +14334,7 @@ "rural": 12 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -14507,7 +14507,7 @@ "rural": 12 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 15, "town": 0, @@ -14559,7 +14559,7 @@ "rural": 9 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 4, "town": 0, @@ -14732,7 +14732,7 @@ "rural": 12 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 9, "town": 0, @@ -14784,7 +14784,7 @@ "rural": 5 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 3, "town": 0, @@ -14957,7 +14957,7 @@ "rural": 10 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 8, "town": 0, @@ -15009,7 +15009,7 @@ "rural": 8 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 3, "town": 0, @@ -15182,7 +15182,7 @@ "rural": 5 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 6, "town": 0, @@ -15234,7 +15234,7 @@ "rural": 5 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 1, "town": 0, @@ -15407,7 +15407,7 @@ "rural": 5 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 5, "town": 0, @@ -15459,7 +15459,7 @@ "rural": 3 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 1, "town": 0, @@ -15632,7 +15632,7 @@ "rural": 10 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 19, "town": 0, @@ -15684,7 +15684,7 @@ "rural": 5 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 4, "town": 0, @@ -15857,7 +15857,7 @@ "rural": 6 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 5, "town": 0, @@ -15909,7 +15909,7 @@ "rural": 3 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 1, "town": 0, @@ -16082,7 +16082,7 @@ "rural": 121 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 102, "town": 3, @@ -16134,7 +16134,7 @@ "rural": 36 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 19, "town": 5, @@ -16307,7 +16307,7 @@ "rural": 4 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 17, "town": 3, @@ -16359,7 +16359,7 @@ "rural": 0 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 6, "town": 5, @@ -16532,7 +16532,7 @@ "rural": 35 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 18, "town": 0, @@ -16584,7 +16584,7 @@ "rural": 8 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 4, "town": 0, @@ -16757,7 +16757,7 @@ "rural": 23 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 16, "town": 0, @@ -16809,7 +16809,7 @@ "rural": 8 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -16982,7 +16982,7 @@ "rural": 12 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 13, "town": 0, @@ -17034,7 +17034,7 @@ "rural": 3 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -17207,7 +17207,7 @@ "rural": 9 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 8, "town": 0, @@ -17259,7 +17259,7 @@ "rural": 4 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 1, "town": 0, @@ -17432,7 +17432,7 @@ "rural": 11 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 6, "town": 0, @@ -17484,7 +17484,7 @@ "rural": 2 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 1, "town": 0, @@ -17657,7 +17657,7 @@ "rural": 17 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 13, "town": 0, @@ -17709,7 +17709,7 @@ "rural": 6 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -17882,7 +17882,7 @@ "rural": 10 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 11, "town": 0, @@ -17934,7 +17934,7 @@ "rural": 5 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 1, "town": 0, @@ -18107,7 +18107,7 @@ "rural": 111 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 117, "town": 5, @@ -18159,7 +18159,7 @@ "rural": 62 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 21, "town": 8, @@ -18332,7 +18332,7 @@ "rural": 11 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 19, "town": 5, @@ -18384,7 +18384,7 @@ "rural": 10 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 8, "town": 8, @@ -18557,7 +18557,7 @@ "rural": 5 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 9, "town": 0, @@ -18609,7 +18609,7 @@ "rural": 5 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 1, "town": 0, @@ -18782,7 +18782,7 @@ "rural": 7 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 10, "town": 0, @@ -18834,7 +18834,7 @@ "rural": 4 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 1, "town": 0, @@ -19007,7 +19007,7 @@ "rural": 11 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 14, "town": 0, @@ -19059,7 +19059,7 @@ "rural": 9 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 1, "town": 0, @@ -19232,7 +19232,7 @@ "rural": 10 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 9, "town": 0, @@ -19284,7 +19284,7 @@ "rural": 4 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 1, "town": 0, @@ -19457,7 +19457,7 @@ "rural": 15 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 12, "town": 0, @@ -19509,7 +19509,7 @@ "rural": 6 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -19682,7 +19682,7 @@ "rural": 6 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 2, "town": 0, @@ -19734,7 +19734,7 @@ "rural": 1 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 1, "town": 0, @@ -19907,7 +19907,7 @@ "rural": 12 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 11, "town": 0, @@ -19959,7 +19959,7 @@ "rural": 4 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 1, "town": 0, @@ -20132,7 +20132,7 @@ "rural": 12 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 13, "town": 0, @@ -20184,7 +20184,7 @@ "rural": 9 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -20357,7 +20357,7 @@ "rural": 22 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 18, "town": 0, @@ -20409,7 +20409,7 @@ "rural": 10 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 3, "town": 0, @@ -20582,7 +20582,7 @@ "rural": 141 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 163, "town": 17, @@ -20634,7 +20634,7 @@ "rural": 67 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 38, "town": 15, @@ -20807,7 +20807,7 @@ "rural": 5 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 17, "town": 5, @@ -20859,7 +20859,7 @@ "rural": 4 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 5, "town": 3, @@ -21032,7 +21032,7 @@ "rural": 2 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 14, "town": 5, @@ -21084,7 +21084,7 @@ "rural": 1 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 3, "town": 3, @@ -21257,7 +21257,7 @@ "rural": 7 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 13, "town": 4, @@ -21309,7 +21309,7 @@ "rural": 4 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 4, "town": 4, @@ -21482,7 +21482,7 @@ "rural": 18 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 12, "town": 3, @@ -21534,7 +21534,7 @@ "rural": 8 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 7, "town": 5, @@ -21707,7 +21707,7 @@ "rural": 7 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 7, "town": 0, @@ -21759,7 +21759,7 @@ "rural": 4 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 1, "town": 0, @@ -21932,7 +21932,7 @@ "rural": 32 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 15, "town": 0, @@ -21984,7 +21984,7 @@ "rural": 9 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 7, "town": 0, @@ -22157,7 +22157,7 @@ "rural": 18 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 10, "town": 0, @@ -22209,7 +22209,7 @@ "rural": 8 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 3, "town": 0, @@ -22382,7 +22382,7 @@ "rural": 18 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 14, "town": 0, @@ -22434,7 +22434,7 @@ "rural": 7 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -22607,7 +22607,7 @@ "rural": 5 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 15, "town": 0, @@ -22659,7 +22659,7 @@ "rural": 4 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -22832,7 +22832,7 @@ "rural": 10 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 14, "town": 0, @@ -22884,7 +22884,7 @@ "rural": 6 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 1, "town": 0, @@ -23057,7 +23057,7 @@ "rural": 11 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 16, "town": 0, @@ -23109,7 +23109,7 @@ "rural": 6 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 1, "town": 0, @@ -23282,7 +23282,7 @@ "rural": 5 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 9, "town": 0, @@ -23334,7 +23334,7 @@ "rural": 5 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 1, "town": 0, @@ -23507,7 +23507,7 @@ "rural": 3 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 7, "town": 0, @@ -23559,7 +23559,7 @@ "rural": 1 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 1, "town": 0, @@ -23732,7 +23732,7 @@ "rural": 124 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 135, "town": 7, @@ -23784,7 +23784,7 @@ "rural": 59 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 21, "town": 3, @@ -23957,7 +23957,7 @@ "rural": 11 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 21, "town": 7, @@ -24009,7 +24009,7 @@ "rural": 7 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 3, "town": 3, @@ -24182,7 +24182,7 @@ "rural": 34 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 17, "town": 0, @@ -24234,7 +24234,7 @@ "rural": 12 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 3, "town": 0, @@ -24407,7 +24407,7 @@ "rural": 7 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 11, "town": 0, @@ -24459,7 +24459,7 @@ "rural": 1 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -24632,7 +24632,7 @@ "rural": 5 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 11, "town": 0, @@ -24684,7 +24684,7 @@ "rural": 3 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 1, "town": 0, @@ -24857,7 +24857,7 @@ "rural": 15 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 16, "town": 0, @@ -24909,7 +24909,7 @@ "rural": 11 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 1, "town": 0, @@ -25082,7 +25082,7 @@ "rural": 11 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 18, "town": 0, @@ -25134,7 +25134,7 @@ "rural": 6 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 3, "town": 0, @@ -25307,7 +25307,7 @@ "rural": 30 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 26, "town": 0, @@ -25359,7 +25359,7 @@ "rural": 13 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 5, "town": 0, @@ -25532,7 +25532,7 @@ "rural": 11 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 15, "town": 0, @@ -25584,7 +25584,7 @@ "rural": 6 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 3, "town": 0, @@ -25757,7 +25757,7 @@ "rural": 33 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 30, "town": 1, @@ -25809,7 +25809,7 @@ "rural": 19 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 16, "town": 8, @@ -25982,7 +25982,7 @@ "rural": 5 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 8, "town": 1, @@ -26034,7 +26034,7 @@ "rural": 3 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 10, "town": 8, @@ -26207,7 +26207,7 @@ "rural": 14 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 11, "town": 0, @@ -26259,7 +26259,7 @@ "rural": 8 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 3, "town": 0, @@ -26432,7 +26432,7 @@ "rural": 14 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 11, "town": 0, @@ -26484,7 +26484,7 @@ "rural": 8 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 3, "town": 0, @@ -26657,7 +26657,7 @@ "rural": 172 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 154, "town": 6, @@ -26709,7 +26709,7 @@ "rural": 70 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 36, "town": 8, @@ -26882,7 +26882,7 @@ "rural": 8 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 24, "town": 6, @@ -26934,7 +26934,7 @@ "rural": 4 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 12, "town": 8, @@ -27107,7 +27107,7 @@ "rural": 7 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 2, "town": 0, @@ -27159,7 +27159,7 @@ "rural": 1 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 1, "town": 0, @@ -27332,7 +27332,7 @@ "rural": 35 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 18, "town": 0, @@ -27384,7 +27384,7 @@ "rural": 8 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 3, "town": 0, @@ -27557,7 +27557,7 @@ "rural": 12 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 18, "town": 0, @@ -27609,7 +27609,7 @@ "rural": 10 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 4, "town": 0, @@ -27782,7 +27782,7 @@ "rural": 18 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 9, "town": 0, @@ -27834,7 +27834,7 @@ "rural": 7 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -28007,7 +28007,7 @@ "rural": 11 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 12, "town": 0, @@ -28059,7 +28059,7 @@ "rural": 7 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -28232,7 +28232,7 @@ "rural": 23 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 13, "town": 0, @@ -28284,7 +28284,7 @@ "rural": 6 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -28457,7 +28457,7 @@ "rural": 9 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 8, "town": 0, @@ -28509,7 +28509,7 @@ "rural": 3 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -28682,7 +28682,7 @@ "rural": 9 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 15, "town": 0, @@ -28734,7 +28734,7 @@ "rural": 5 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -28907,7 +28907,7 @@ "rural": 11 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 14, "town": 0, @@ -28959,7 +28959,7 @@ "rural": 6 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -29132,7 +29132,7 @@ "rural": 9 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 10, "town": 0, @@ -29184,7 +29184,7 @@ "rural": 5 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -29357,7 +29357,7 @@ "rural": 20 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 11, "town": 0, @@ -29409,7 +29409,7 @@ "rural": 8 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -29582,7 +29582,7 @@ "rural": 31 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 55, "town": 7, @@ -29634,7 +29634,7 @@ "rural": 23 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 10, "town": 5, @@ -29807,7 +29807,7 @@ "rural": 3 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 6, "town": 3, @@ -29859,7 +29859,7 @@ "rural": 2 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 1, @@ -30032,7 +30032,7 @@ "rural": 2 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 15, "town": 4, @@ -30084,7 +30084,7 @@ "rural": 3 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 4, "town": 4, @@ -30257,7 +30257,7 @@ "rural": 5 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 9, "town": 0, @@ -30309,7 +30309,7 @@ "rural": 5 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 1, "town": 0, @@ -30482,7 +30482,7 @@ "rural": 15 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 18, "town": 0, @@ -30534,7 +30534,7 @@ "rural": 9 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 2, "town": 0, @@ -30707,7 +30707,7 @@ "rural": 6 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 7, "town": 0, @@ -30759,7 +30759,7 @@ "rural": 4 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 1, "town": 0, @@ -30932,7 +30932,7 @@ "rural": 17 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 21, "town": 0, @@ -30984,7 +30984,7 @@ "rural": 9 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 8, "town": 0, @@ -31157,7 +31157,7 @@ "rural": 7 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 6, "town": 0, @@ -31209,7 +31209,7 @@ "rural": 3 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 3, "town": 0, @@ -31382,7 +31382,7 @@ "rural": 1 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 4, "town": 0, @@ -31434,7 +31434,7 @@ "rural": 1 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 1, "town": 0, @@ -31607,7 +31607,7 @@ "rural": 2 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 3, "town": 0, @@ -31659,7 +31659,7 @@ "rural": 0 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 1, "town": 0, @@ -31832,7 +31832,7 @@ "rural": 7 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 8, "town": 0, @@ -31884,7 +31884,7 @@ "rural": 5 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 3, "town": 0, @@ -32057,7 +32057,7 @@ "rural": 9 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 8, "town": 0, @@ -32109,7 +32109,7 @@ "rural": 2 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 3, "town": 0, @@ -32282,7 +32282,7 @@ "rural": 3 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 3, "town": 0, @@ -32334,7 +32334,7 @@ "rural": 0 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 3, "town": 0, @@ -32507,7 +32507,7 @@ "rural": 2 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 2, "town": 0, @@ -32559,7 +32559,7 @@ "rural": 1 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 0, "town": 0, @@ -32732,7 +32732,7 @@ "rural": 4 } }, - "junior_high_schools": { + "junior_schools": { "2015": { "urban": 3, "town": 0, @@ -32784,7 +32784,7 @@ "rural": 1 } }, - "senior_high_schools": { + "senior_schools": { "2015": { "urban": 0, "town": 0, diff --git a/Data/TeacherCount.json b/Data/TeacherCount.json index 677c671..81d2bb3 100644 --- a/Data/TeacherCount.json +++ b/Data/TeacherCount.json @@ -207,7 +207,7 @@ "rural_teacher": 98761 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 118187, "urban_staff": 15802, @@ -309,7 +309,7 @@ "rural_teacher": 33387 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 80641, "urban_staff": 29393, @@ -662,7 +662,7 @@ "rural_teacher": 5247 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 14454, "urban_staff": 6137, @@ -764,7 +764,7 @@ "rural_teacher": 1423 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 14945, "urban_staff": 11285, @@ -1117,7 +1117,7 @@ "rural_teacher": 173 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 833, "urban_staff": 688, @@ -1219,7 +1219,7 @@ "rural_teacher": 104 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 3209, "urban_staff": 3209, @@ -1572,7 +1572,7 @@ "rural_teacher": 216 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1075, "urban_staff": 1075, @@ -1674,7 +1674,7 @@ "rural_teacher": 0 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 1287, "urban_staff": 1265, @@ -2027,7 +2027,7 @@ "rural_teacher": 172 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1717, "urban_staff": 1591, @@ -2129,7 +2129,7 @@ "rural_teacher": 60 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 3484, "urban_staff": 3080, @@ -2482,7 +2482,7 @@ "rural_teacher": 231 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1233, "urban_staff": 1058, @@ -2584,7 +2584,7 @@ "rural_teacher": 164 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 1481, "urban_staff": 1481, @@ -2937,7 +2937,7 @@ "rural_teacher": 229 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 786, "urban_staff": 280, @@ -3039,7 +3039,7 @@ "rural_teacher": 18 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 448, "urban_staff": 448, @@ -3392,7 +3392,7 @@ "rural_teacher": 277 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 401, "urban_staff": 368, @@ -3494,7 +3494,7 @@ "rural_teacher": 0 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 881, "urban_staff": 881, @@ -3847,7 +3847,7 @@ "rural_teacher": 440 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1012, "urban_staff": 0, @@ -3949,7 +3949,7 @@ "rural_teacher": 152 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 296, "urban_staff": 0, @@ -4302,7 +4302,7 @@ "rural_teacher": 126 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 442, "urban_staff": 0, @@ -4404,7 +4404,7 @@ "rural_teacher": 82 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 296, "urban_staff": 0, @@ -4757,7 +4757,7 @@ "rural_teacher": 546 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1074, "urban_staff": 0, @@ -4859,7 +4859,7 @@ "rural_teacher": 106 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 410, "urban_staff": 0, @@ -5212,7 +5212,7 @@ "rural_teacher": 312 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 825, "urban_staff": 0, @@ -5314,7 +5314,7 @@ "rural_teacher": 201 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 310, "urban_staff": 0, @@ -5667,7 +5667,7 @@ "rural_teacher": 793 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 936, "urban_staff": 0, @@ -5769,7 +5769,7 @@ "rural_teacher": 194 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 404, "urban_staff": 0, @@ -6122,7 +6122,7 @@ "rural_teacher": 490 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1189, "urban_staff": 0, @@ -6224,7 +6224,7 @@ "rural_teacher": 75 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 430, "urban_staff": 0, @@ -6577,7 +6577,7 @@ "rural_teacher": 1164 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1854, "urban_staff": 0, @@ -6679,7 +6679,7 @@ "rural_teacher": 231 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 1088, "urban_staff": 0, @@ -7032,7 +7032,7 @@ "rural_teacher": 78 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1077, "urban_staff": 1077, @@ -7134,7 +7134,7 @@ "rural_teacher": 36 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 921, "urban_staff": 921, @@ -7487,7 +7487,7 @@ "rural_teacher": 13282 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 16199, "urban_staff": 2029, @@ -7589,7 +7589,7 @@ "rural_teacher": 3809 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 10797, "urban_staff": 3977, @@ -7942,7 +7942,7 @@ "rural_teacher": 1235 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1995, "urban_staff": 1354, @@ -8044,7 +8044,7 @@ "rural_teacher": 296 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 1797, "urban_staff": 1712, @@ -8397,7 +8397,7 @@ "rural_teacher": 257 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 645, "urban_staff": 0, @@ -8499,7 +8499,7 @@ "rural_teacher": 0 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 308, "urban_staff": 0, @@ -8852,7 +8852,7 @@ "rural_teacher": 2028 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1350, "urban_staff": 0, @@ -8954,7 +8954,7 @@ "rural_teacher": 618 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 1734, "urban_staff": 0, @@ -9307,7 +9307,7 @@ "rural_teacher": 1016 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 905, "urban_staff": 0, @@ -9409,7 +9409,7 @@ "rural_teacher": 261 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 569, "urban_staff": 0, @@ -9762,7 +9762,7 @@ "rural_teacher": 1602 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1565, "urban_staff": 0, @@ -9864,7 +9864,7 @@ "rural_teacher": 463 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 646, "urban_staff": 0, @@ -10217,7 +10217,7 @@ "rural_teacher": 1739 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 2122, "urban_staff": 0, @@ -10319,7 +10319,7 @@ "rural_teacher": 50 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 1233, "urban_staff": 0, @@ -10672,7 +10672,7 @@ "rural_teacher": 2413 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 2541, "urban_staff": 0, @@ -10774,7 +10774,7 @@ "rural_teacher": 891 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 1060, "urban_staff": 0, @@ -11127,7 +11127,7 @@ "rural_teacher": 835 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1461, "urban_staff": 0, @@ -11229,7 +11229,7 @@ "rural_teacher": 518 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 882, "urban_staff": 0, @@ -11582,7 +11582,7 @@ "rural_teacher": 2157 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 3615, "urban_staff": 675, @@ -11684,7 +11684,7 @@ "rural_teacher": 712 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 2568, "urban_staff": 2265, @@ -12037,7 +12037,7 @@ "rural_teacher": 3847 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 6946, "urban_staff": 837, @@ -12139,7 +12139,7 @@ "rural_teacher": 1214 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 3141, "urban_staff": 945, @@ -12492,7 +12492,7 @@ "rural_teacher": 377 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1531, "urban_staff": 837, @@ -12594,7 +12594,7 @@ "rural_teacher": 201 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 945, "urban_staff": 945, @@ -12947,7 +12947,7 @@ "rural_teacher": 485 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 899, "urban_staff": 0, @@ -13049,7 +13049,7 @@ "rural_teacher": 178 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 355, "urban_staff": 0, @@ -13402,7 +13402,7 @@ "rural_teacher": 350 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 436, "urban_staff": 0, @@ -13504,7 +13504,7 @@ "rural_teacher": 110 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 158, "urban_staff": 0, @@ -13857,7 +13857,7 @@ "rural_teacher": 462 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 782, "urban_staff": 0, @@ -13959,7 +13959,7 @@ "rural_teacher": 0 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 385, "urban_staff": 0, @@ -14312,7 +14312,7 @@ "rural_teacher": 506 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 556, "urban_staff": 0, @@ -14414,7 +14414,7 @@ "rural_teacher": 45 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 291, "urban_staff": 0, @@ -14767,7 +14767,7 @@ "rural_teacher": 351 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 577, "urban_staff": 0, @@ -14869,7 +14869,7 @@ "rural_teacher": 91 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 163, "urban_staff": 0, @@ -15222,7 +15222,7 @@ "rural_teacher": 262 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 596, "urban_staff": 0, @@ -15324,7 +15324,7 @@ "rural_teacher": 92 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 332, "urban_staff": 0, @@ -15677,7 +15677,7 @@ "rural_teacher": 593 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 925, "urban_staff": 0, @@ -15779,7 +15779,7 @@ "rural_teacher": 207 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 251, "urban_staff": 0, @@ -16132,7 +16132,7 @@ "rural_teacher": 461 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 644, "urban_staff": 0, @@ -16234,7 +16234,7 @@ "rural_teacher": 290 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 261, "urban_staff": 0, @@ -16587,7 +16587,7 @@ "rural_teacher": 6324 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 5252, "urban_staff": 201, @@ -16689,7 +16689,7 @@ "rural_teacher": 2819 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 6212, "urban_staff": 1103, @@ -17042,7 +17042,7 @@ "rural_teacher": 1904 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1434, "urban_staff": 201, @@ -17144,7 +17144,7 @@ "rural_teacher": 1167 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 2626, "urban_staff": 1103, @@ -17497,7 +17497,7 @@ "rural_teacher": 935 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 813, "urban_staff": 0, @@ -17599,7 +17599,7 @@ "rural_teacher": 330 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 571, "urban_staff": 0, @@ -17952,7 +17952,7 @@ "rural_teacher": 1690 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1427, "urban_staff": 0, @@ -18054,7 +18054,7 @@ "rural_teacher": 689 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 1709, "urban_staff": 0, @@ -18407,7 +18407,7 @@ "rural_teacher": 1138 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 642, "urban_staff": 0, @@ -18509,7 +18509,7 @@ "rural_teacher": 454 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 652, "urban_staff": 0, @@ -18862,7 +18862,7 @@ "rural_teacher": 657 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 936, "urban_staff": 0, @@ -18964,7 +18964,7 @@ "rural_teacher": 179 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 654, "urban_staff": 0, @@ -19317,7 +19317,7 @@ "rural_teacher": 12983 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 13005, "urban_staff": 498, @@ -19419,7 +19419,7 @@ "rural_teacher": 5277 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 9277, "urban_staff": 1830, @@ -19772,7 +19772,7 @@ "rural_teacher": 1489 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1858, "urban_staff": 498, @@ -19874,7 +19874,7 @@ "rural_teacher": 551 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 2173, "urban_staff": 1830, @@ -20227,7 +20227,7 @@ "rural_teacher": 1061 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 965, "urban_staff": 0, @@ -20329,7 +20329,7 @@ "rural_teacher": 286 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 590, "urban_staff": 0, @@ -20682,7 +20682,7 @@ "rural_teacher": 1205 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1362, "urban_staff": 0, @@ -20784,7 +20784,7 @@ "rural_teacher": 530 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 627, "urban_staff": 0, @@ -21137,7 +21137,7 @@ "rural_teacher": 1198 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 823, "urban_staff": 0, @@ -21239,7 +21239,7 @@ "rural_teacher": 646 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 748, "urban_staff": 0, @@ -21592,7 +21592,7 @@ "rural_teacher": 670 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 571, "urban_staff": 0, @@ -21694,7 +21694,7 @@ "rural_teacher": 399 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 345, "urban_staff": 0, @@ -22047,7 +22047,7 @@ "rural_teacher": 676 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1288, "urban_staff": 0, @@ -22149,7 +22149,7 @@ "rural_teacher": 149 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 581, "urban_staff": 0, @@ -22502,7 +22502,7 @@ "rural_teacher": 248 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 378, "urban_staff": 0, @@ -22604,7 +22604,7 @@ "rural_teacher": 0 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 251, "urban_staff": 0, @@ -22957,7 +22957,7 @@ "rural_teacher": 3770 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 3431, "urban_staff": 0, @@ -23059,7 +23059,7 @@ "rural_teacher": 1938 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 2261, "urban_staff": 0, @@ -23412,7 +23412,7 @@ "rural_teacher": 1372 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1081, "urban_staff": 0, @@ -23514,7 +23514,7 @@ "rural_teacher": 490 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 660, "urban_staff": 0, @@ -23867,7 +23867,7 @@ "rural_teacher": 1220 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1022, "urban_staff": 0, @@ -23969,7 +23969,7 @@ "rural_teacher": 288 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 575, "urban_staff": 0, @@ -24322,7 +24322,7 @@ "rural_teacher": 74 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 226, "urban_staff": 0, @@ -24424,7 +24424,7 @@ "rural_teacher": 0 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 466, "urban_staff": 0, @@ -24777,7 +24777,7 @@ "rural_teacher": 2790 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 4178, "urban_staff": 856, @@ -24879,7 +24879,7 @@ "rural_teacher": 502 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 2276, "urban_staff": 516, @@ -25232,7 +25232,7 @@ "rural_teacher": 92 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 902, "urban_staff": 856, @@ -25334,7 +25334,7 @@ "rural_teacher": 0 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 516, "urban_staff": 516, @@ -25687,7 +25687,7 @@ "rural_teacher": 600 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 622, "urban_staff": 0, @@ -25789,7 +25789,7 @@ "rural_teacher": 98 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 452, "urban_staff": 0, @@ -26142,7 +26142,7 @@ "rural_teacher": 1022 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1271, "urban_staff": 0, @@ -26244,7 +26244,7 @@ "rural_teacher": 167 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 569, "urban_staff": 0, @@ -26597,7 +26597,7 @@ "rural_teacher": 400 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 488, "urban_staff": 0, @@ -26699,7 +26699,7 @@ "rural_teacher": 0 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 251, "urban_staff": 0, @@ -27052,7 +27052,7 @@ "rural_teacher": 676 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 895, "urban_staff": 0, @@ -27154,7 +27154,7 @@ "rural_teacher": 237 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 488, "urban_staff": 0, @@ -27507,7 +27507,7 @@ "rural_teacher": 4307 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 5741, "urban_staff": 417, @@ -27609,7 +27609,7 @@ "rural_teacher": 1269 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 3945, "urban_staff": 819, @@ -27962,7 +27962,7 @@ "rural_teacher": 370 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 655, "urban_staff": 417, @@ -28064,7 +28064,7 @@ "rural_teacher": 48 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 819, "urban_staff": 819, @@ -28417,7 +28417,7 @@ "rural_teacher": 288 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 720, "urban_staff": 0, @@ -28519,7 +28519,7 @@ "rural_teacher": 96 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 275, "urban_staff": 0, @@ -28872,7 +28872,7 @@ "rural_teacher": 309 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1063, "urban_staff": 0, @@ -28974,7 +28974,7 @@ "rural_teacher": 208 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 379, "urban_staff": 0, @@ -29327,7 +29327,7 @@ "rural_teacher": 606 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 702, "urban_staff": 0, @@ -29429,7 +29429,7 @@ "rural_teacher": 151 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 443, "urban_staff": 0, @@ -29782,7 +29782,7 @@ "rural_teacher": 515 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 436, "urban_staff": 0, @@ -29884,7 +29884,7 @@ "rural_teacher": 181 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 601, "urban_staff": 0, @@ -30237,7 +30237,7 @@ "rural_teacher": 155 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 435, "urban_staff": 0, @@ -30339,7 +30339,7 @@ "rural_teacher": 46 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 458, "urban_staff": 0, @@ -30692,7 +30692,7 @@ "rural_teacher": 235 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 209, "urban_staff": 0, @@ -30794,7 +30794,7 @@ "rural_teacher": 22 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 170, "urban_staff": 0, @@ -31147,7 +31147,7 @@ "rural_teacher": 245 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 331, "urban_staff": 0, @@ -31249,7 +31249,7 @@ "rural_teacher": 31 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 146, "urban_staff": 0, @@ -31602,7 +31602,7 @@ "rural_teacher": 1306 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 973, "urban_staff": 0, @@ -31704,7 +31704,7 @@ "rural_teacher": 486 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 530, "urban_staff": 0, @@ -32057,7 +32057,7 @@ "rural_teacher": 278 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 217, "urban_staff": 0, @@ -32159,7 +32159,7 @@ "rural_teacher": 0 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 124, "urban_staff": 0, @@ -32512,7 +32512,7 @@ "rural_teacher": 6891 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 5078, "urban_staff": 85, @@ -32614,7 +32614,7 @@ "rural_teacher": 2445 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 3627, "urban_staff": 1118, @@ -32967,7 +32967,7 @@ "rural_teacher": 786 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 575, "urban_staff": 85, @@ -33069,7 +33069,7 @@ "rural_teacher": 412 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 1171, "urban_staff": 1118, @@ -33422,7 +33422,7 @@ "rural_teacher": 1098 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 915, "urban_staff": 0, @@ -33524,7 +33524,7 @@ "rural_teacher": 376 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 681, "urban_staff": 0, @@ -33877,7 +33877,7 @@ "rural_teacher": 1209 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 949, "urban_staff": 0, @@ -33979,7 +33979,7 @@ "rural_teacher": 317 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 323, "urban_staff": 0, @@ -34332,7 +34332,7 @@ "rural_teacher": 1111 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 671, "urban_staff": 0, @@ -34434,7 +34434,7 @@ "rural_teacher": 463 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 466, "urban_staff": 0, @@ -34787,7 +34787,7 @@ "rural_teacher": 561 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 452, "urban_staff": 0, @@ -34889,7 +34889,7 @@ "rural_teacher": 223 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 158, "urban_staff": 0, @@ -35242,7 +35242,7 @@ "rural_teacher": 653 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 349, "urban_staff": 0, @@ -35344,7 +35344,7 @@ "rural_teacher": 154 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 267, "urban_staff": 0, @@ -35697,7 +35697,7 @@ "rural_teacher": 904 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 591, "urban_staff": 0, @@ -35799,7 +35799,7 @@ "rural_teacher": 288 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 350, "urban_staff": 0, @@ -36152,7 +36152,7 @@ "rural_teacher": 569 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 576, "urban_staff": 0, @@ -36254,7 +36254,7 @@ "rural_teacher": 212 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 211, "urban_staff": 0, @@ -36607,7 +36607,7 @@ "rural_teacher": 4231 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 7073, "urban_staff": 565, @@ -36709,7 +36709,7 @@ "rural_teacher": 955 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 4206, "urban_staff": 1493, @@ -37062,7 +37062,7 @@ "rural_teacher": 662 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1341, "urban_staff": 565, @@ -37164,7 +37164,7 @@ "rural_teacher": 105 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 1493, "urban_staff": 1493, @@ -37517,7 +37517,7 @@ "rural_teacher": 206 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 480, "urban_staff": 0, @@ -37619,7 +37619,7 @@ "rural_teacher": 69 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 137, "urban_staff": 0, @@ -37972,7 +37972,7 @@ "rural_teacher": 243 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 537, "urban_staff": 0, @@ -38074,7 +38074,7 @@ "rural_teacher": 81 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 230, "urban_staff": 0, @@ -38427,7 +38427,7 @@ "rural_teacher": 355 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 680, "urban_staff": 0, @@ -38529,7 +38529,7 @@ "rural_teacher": 70 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 217, "urban_staff": 0, @@ -38882,7 +38882,7 @@ "rural_teacher": 389 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 718, "urban_staff": 0, @@ -38984,7 +38984,7 @@ "rural_teacher": 110 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 281, "urban_staff": 0, @@ -39337,7 +39337,7 @@ "rural_teacher": 450 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 582, "urban_staff": 0, @@ -39439,7 +39439,7 @@ "rural_teacher": 142 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 600, "urban_staff": 0, @@ -39792,7 +39792,7 @@ "rural_teacher": 134 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 228, "urban_staff": 0, @@ -39894,7 +39894,7 @@ "rural_teacher": 0 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 141, "urban_staff": 0, @@ -40247,7 +40247,7 @@ "rural_teacher": 492 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 687, "urban_staff": 0, @@ -40349,7 +40349,7 @@ "rural_teacher": 173 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 194, "urban_staff": 0, @@ -40702,7 +40702,7 @@ "rural_teacher": 394 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 721, "urban_staff": 0, @@ -40804,7 +40804,7 @@ "rural_teacher": 108 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 418, "urban_staff": 0, @@ -41157,7 +41157,7 @@ "rural_teacher": 906 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1099, "urban_staff": 0, @@ -41259,7 +41259,7 @@ "rural_teacher": 97 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 495, "urban_staff": 0, @@ -41612,7 +41612,7 @@ "rural_teacher": 11056 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 11900, "urban_staff": 1800, @@ -41714,7 +41714,7 @@ "rural_teacher": 3564 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 6676, "urban_staff": 2588, @@ -42067,7 +42067,7 @@ "rural_teacher": 579 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1043, "urban_staff": 475, @@ -42169,7 +42169,7 @@ "rural_teacher": 115 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 696, "urban_staff": 477, @@ -42522,7 +42522,7 @@ "rural_teacher": 504 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 818, "urban_staff": 362, @@ -42624,7 +42624,7 @@ "rural_teacher": 215 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 556, "urban_staff": 556, @@ -42977,7 +42977,7 @@ "rural_teacher": 648 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1059, "urban_staff": 563, @@ -43079,7 +43079,7 @@ "rural_teacher": 71 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 601, "urban_staff": 601, @@ -43432,7 +43432,7 @@ "rural_teacher": 983 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1059, "urban_staff": 400, @@ -43534,7 +43534,7 @@ "rural_teacher": 35 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 1288, "urban_staff": 954, @@ -43887,7 +43887,7 @@ "rural_teacher": 488 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 464, "urban_staff": 0, @@ -43989,7 +43989,7 @@ "rural_teacher": 115 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 137, "urban_staff": 0, @@ -44342,7 +44342,7 @@ "rural_teacher": 1075 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1333, "urban_staff": 0, @@ -44444,7 +44444,7 @@ "rural_teacher": 294 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 1295, "urban_staff": 0, @@ -44797,7 +44797,7 @@ "rural_teacher": 594 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 695, "urban_staff": 0, @@ -44899,7 +44899,7 @@ "rural_teacher": 62 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 583, "urban_staff": 0, @@ -45252,7 +45252,7 @@ "rural_teacher": 1306 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1328, "urban_staff": 0, @@ -45354,7 +45354,7 @@ "rural_teacher": 331 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 570, "urban_staff": 0, @@ -45707,7 +45707,7 @@ "rural_teacher": 1432 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 907, "urban_staff": 0, @@ -45809,7 +45809,7 @@ "rural_teacher": 881 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 286, "urban_staff": 0, @@ -46162,7 +46162,7 @@ "rural_teacher": 1329 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 922, "urban_staff": 0, @@ -46264,7 +46264,7 @@ "rural_teacher": 480 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 138, "urban_staff": 0, @@ -46617,7 +46617,7 @@ "rural_teacher": 1100 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1077, "urban_staff": 0, @@ -46719,7 +46719,7 @@ "rural_teacher": 521 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 253, "urban_staff": 0, @@ -47072,7 +47072,7 @@ "rural_teacher": 659 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 716, "urban_staff": 0, @@ -47174,7 +47174,7 @@ "rural_teacher": 224 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 194, "urban_staff": 0, @@ -47527,7 +47527,7 @@ "rural_teacher": 359 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 479, "urban_staff": 0, @@ -47629,7 +47629,7 @@ "rural_teacher": 220 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 79, "urban_staff": 0, @@ -47982,7 +47982,7 @@ "rural_teacher": 12261 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 10362, "urban_staff": 731, @@ -48084,7 +48084,7 @@ "rural_teacher": 4951 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 4958, "urban_staff": 870, @@ -48437,7 +48437,7 @@ "rural_teacher": 853 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1631, "urban_staff": 731, @@ -48539,7 +48539,7 @@ "rural_teacher": 295 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 870, "urban_staff": 870, @@ -48892,7 +48892,7 @@ "rural_teacher": 1498 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1358, "urban_staff": 0, @@ -48994,7 +48994,7 @@ "rural_teacher": 593 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 589, "urban_staff": 0, @@ -49347,7 +49347,7 @@ "rural_teacher": 963 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 808, "urban_staff": 0, @@ -49449,7 +49449,7 @@ "rural_teacher": 349 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 361, "urban_staff": 0, @@ -49802,7 +49802,7 @@ "rural_teacher": 1368 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 686, "urban_staff": 0, @@ -49904,7 +49904,7 @@ "rural_teacher": 462 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 456, "urban_staff": 0, @@ -50257,7 +50257,7 @@ "rural_teacher": 1070 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1129, "urban_staff": 0, @@ -50359,7 +50359,7 @@ "rural_teacher": 241 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 334, "urban_staff": 0, @@ -50712,7 +50712,7 @@ "rural_teacher": 1887 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1415, "urban_staff": 0, @@ -50814,7 +50814,7 @@ "rural_teacher": 927 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 816, "urban_staff": 0, @@ -51167,7 +51167,7 @@ "rural_teacher": 3041 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 2313, "urban_staff": 0, @@ -51269,7 +51269,7 @@ "rural_teacher": 1420 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 910, "urban_staff": 0, @@ -51622,7 +51622,7 @@ "rural_teacher": 1581 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1022, "urban_staff": 0, @@ -51724,7 +51724,7 @@ "rural_teacher": 664 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 622, "urban_staff": 0, @@ -52077,7 +52077,7 @@ "rural_teacher": 1925 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1944, "urban_staff": 119, @@ -52179,7 +52179,7 @@ "rural_teacher": 636 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 2152, "urban_staff": 1103, @@ -52532,7 +52532,7 @@ "rural_teacher": 722 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 720, "urban_staff": 119, @@ -52634,7 +52634,7 @@ "rural_teacher": 329 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 1405, "urban_staff": 1103, @@ -52987,7 +52987,7 @@ "rural_teacher": 668 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 634, "urban_staff": 0, @@ -53089,7 +53089,7 @@ "rural_teacher": 154 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 312, "urban_staff": 0, @@ -53442,7 +53442,7 @@ "rural_teacher": 535 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 590, "urban_staff": 0, @@ -53544,7 +53544,7 @@ "rural_teacher": 153 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 435, "urban_staff": 0, @@ -53897,7 +53897,7 @@ "rural_teacher": 7481 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 9523, "urban_staff": 582, @@ -53999,7 +53999,7 @@ "rural_teacher": 2606 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 5011, "urban_staff": 990, @@ -54352,7 +54352,7 @@ "rural_teacher": 762 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1520, "urban_staff": 582, @@ -54454,7 +54454,7 @@ "rural_teacher": 280 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 1438, "urban_staff": 990, @@ -54807,7 +54807,7 @@ "rural_teacher": 361 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 222, "urban_staff": 0, @@ -54909,7 +54909,7 @@ "rural_teacher": 123 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 101, "urban_staff": 0, @@ -55262,7 +55262,7 @@ "rural_teacher": 589 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1172, "urban_staff": 0, @@ -55364,7 +55364,7 @@ "rural_teacher": 223 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 851, "urban_staff": 0, @@ -55717,7 +55717,7 @@ "rural_teacher": 922 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1036, "urban_staff": 0, @@ -55819,7 +55819,7 @@ "rural_teacher": 395 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 382, "urban_staff": 0, @@ -56172,7 +56172,7 @@ "rural_teacher": 540 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 908, "urban_staff": 0, @@ -56274,7 +56274,7 @@ "rural_teacher": 79 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 272, "urban_staff": 0, @@ -56627,7 +56627,7 @@ "rural_teacher": 402 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 708, "urban_staff": 0, @@ -56729,7 +56729,7 @@ "rural_teacher": 110 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 256, "urban_staff": 0, @@ -57082,7 +57082,7 @@ "rural_teacher": 655 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 869, "urban_staff": 0, @@ -57184,7 +57184,7 @@ "rural_teacher": 406 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 292, "urban_staff": 0, @@ -57537,7 +57537,7 @@ "rural_teacher": 664 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 501, "urban_staff": 0, @@ -57639,7 +57639,7 @@ "rural_teacher": 192 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 258, "urban_staff": 0, @@ -57992,7 +57992,7 @@ "rural_teacher": 705 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 706, "urban_staff": 0, @@ -58094,7 +58094,7 @@ "rural_teacher": 255 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 255, "urban_staff": 0, @@ -58447,7 +58447,7 @@ "rural_teacher": 724 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 650, "urban_staff": 0, @@ -58549,7 +58549,7 @@ "rural_teacher": 271 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 279, "urban_staff": 0, @@ -58902,7 +58902,7 @@ "rural_teacher": 514 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 526, "urban_staff": 0, @@ -59004,7 +59004,7 @@ "rural_teacher": 172 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 283, "urban_staff": 0, @@ -59357,7 +59357,7 @@ "rural_teacher": 643 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 705, "urban_staff": 0, @@ -59459,7 +59459,7 @@ "rural_teacher": 100 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 344, "urban_staff": 0, @@ -59812,7 +59812,7 @@ "rural_teacher": 3124 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 4085, "urban_staff": 945, @@ -59914,7 +59914,7 @@ "rural_teacher": 1039 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 1487, "urban_staff": 756, @@ -60267,7 +60267,7 @@ "rural_teacher": 242 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 522, "urban_staff": 340, @@ -60369,7 +60369,7 @@ "rural_teacher": 0 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 253, "urban_staff": 187, @@ -60722,7 +60722,7 @@ "rural_teacher": 1025 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1348, "urban_staff": 605, @@ -60824,7 +60824,7 @@ "rural_teacher": 416 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 569, "urban_staff": 569, @@ -61177,7 +61177,7 @@ "rural_teacher": 468 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 535, "urban_staff": 0, @@ -61279,7 +61279,7 @@ "rural_teacher": 131 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 161, "urban_staff": 0, @@ -61632,7 +61632,7 @@ "rural_teacher": 853 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1064, "urban_staff": 0, @@ -61734,7 +61734,7 @@ "rural_teacher": 397 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 293, "urban_staff": 0, @@ -62087,7 +62087,7 @@ "rural_teacher": 536 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 616, "urban_staff": 0, @@ -62189,7 +62189,7 @@ "rural_teacher": 95 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 211, "urban_staff": 0, @@ -62542,7 +62542,7 @@ "rural_teacher": 1753 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1339, "urban_staff": 0, @@ -62644,7 +62644,7 @@ "rural_teacher": 625 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 1225, "urban_staff": 0, @@ -62997,7 +62997,7 @@ "rural_teacher": 395 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 429, "urban_staff": 0, @@ -63099,7 +63099,7 @@ "rural_teacher": 69 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 502, "urban_staff": 0, @@ -63452,7 +63452,7 @@ "rural_teacher": 626 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 209, "urban_staff": 0, @@ -63554,7 +63554,7 @@ "rural_teacher": 206 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 166, "urban_staff": 0, @@ -63907,7 +63907,7 @@ "rural_teacher": 169 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 193, "urban_staff": 0, @@ -64009,7 +64009,7 @@ "rural_teacher": 93 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 130, "urban_staff": 0, @@ -64362,7 +64362,7 @@ "rural_teacher": 563 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 508, "urban_staff": 0, @@ -64464,7 +64464,7 @@ "rural_teacher": 257 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 427, "urban_staff": 0, @@ -64817,7 +64817,7 @@ "rural_teacher": 1259 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 1108, "urban_staff": 0, @@ -64919,7 +64919,7 @@ "rural_teacher": 253 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 706, "urban_staff": 0, @@ -65272,7 +65272,7 @@ "rural_teacher": 445 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 518, "urban_staff": 0, @@ -65374,7 +65374,7 @@ "rural_teacher": 90 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 706, "urban_staff": 0, @@ -65727,7 +65727,7 @@ "rural_teacher": 225 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 211, "urban_staff": 0, @@ -65829,7 +65829,7 @@ "rural_teacher": 0 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 0, "urban_staff": 0, @@ -66182,7 +66182,7 @@ "rural_teacher": 589 } }, - "junior_high_teachers": { + "junior_teachers": { "2015": { "total_staff": 379, "urban_staff": 0, @@ -66284,7 +66284,7 @@ "rural_teacher": 163 } }, - "senior_high_teachers": { + "senior_teachers": { "2015": { "total_staff": 0, "urban_staff": 0, diff --git a/Doc/全省(城镇乡3分)自动计算模板0415 copy(1).xlsx b/Doc/全省(城镇乡3分)自动计算模板0415 copy(1).xlsx deleted file mode 100644 index 38676d5..0000000 Binary files a/Doc/全省(城镇乡3分)自动计算模板0415 copy(1).xlsx and /dev/null differ diff --git a/Doc/数据库-2015-2024-v2【带密码】.xlsx b/Doc/数据库-2015-2024-v2【带密码】.xlsx deleted file mode 100644 index 484d5a0..0000000 Binary files a/Doc/数据库-2015-2024-v2【带密码】.xlsx and /dev/null differ diff --git a/Model/EducationDataModel.py b/Model/EducationDataModel.py new file mode 100644 index 0000000..4d5fdbb --- /dev/null +++ b/Model/EducationDataModel.py @@ -0,0 +1,350 @@ +import os +import json + + +class EducationDataModel: + # 定义支持的教育阶段映射 + EDUCATION_STAGES = { + 'preschool': '学前', + 'primary': '小学', + 'junior': '初中', + 'senior': '高中', + 'vocational': '中职' + } + + # 获取脚本所在目录的绝对路径 + BASE_DIR = os.path.dirname(os.path.abspath(__file__)) + # 使用绝对路径定义数据目录和文件 + DATA_DIR = os.path.join(BASE_DIR, '../Data') + SCHOOL_COUNT_FILE = os.path.join(DATA_DIR, 'SchoolCount.json') + TEACHER_COUNT_FILE = os.path.join(DATA_DIR, 'TeacherCount.json') + ENROLLMENT_COUNT_FILE = os.path.join(DATA_DIR, 'ZaiXiaoShengCount.json') + ADMISSION_COUNT_FILE = os.path.join(DATA_DIR, 'ZhaoShengCount.json') + POPULATION_FILE = os.path.join(DATA_DIR, 'RenKou.json') # 新增:人口数据文件路径 + + @staticmethod + def load_json_file(file_path): + """加载JSON文件数据""" + try: + with open(file_path, 'r', encoding='utf-8') as f: + return json.load(f) + except Exception as e: + print(f"加载文件 {file_path} 失败: {e}") + return None + + @staticmethod + def get_province_data(data): + """从数据中提取云南省的数据""" + if not data or not isinstance(data, list): + return None + + # 查找云南省的数据 + for item in data: + if item.get('area_name') == '云南省': + return item + + print("未找到云南省的数据") + return None + + @staticmethod + def get_school_count_by_year_and_stage(year, stage): + """获取指定年份和学段的学校总数""" + school_data = EducationDataModel.load_json_file(EducationDataModel.SCHOOL_COUNT_FILE) + province_data = EducationDataModel.get_province_data(school_data) + + if not province_data: + return 0 + + # 根据学段获取对应的学校数据字段名 + stage_field_mapping = { + 'preschool': 'preschool_schools', + 'primary': 'primary_schools', + 'junior': 'junior_schools', + 'senior': 'senior_schools', + 'vocational': 'vocational_schools' + } + + field_name = stage_field_mapping.get(stage) + if not field_name or field_name not in province_data: + print(f"学段 {stage} 对应的学校数据字段不存在") + return 0 + + year_data = province_data[field_name].get(str(year)) + if not year_data: + print(f"年份 {year} 的学校数据不存在") + return 0 + + # 计算学校总数 - 处理vocational_schools的特殊格式 + try: + # 对于vocational学段,数据可能是直接的数值而不是字典 + if stage == 'vocational' and isinstance(year_data, int): + return year_data + # 对于其他学段或正常字典格式 + elif isinstance(year_data, dict): + if 'urban' in year_data and 'town' in year_data and 'rural' in year_data: + total_schools = year_data.get('urban', 0) + year_data.get('town', 0) + year_data.get('rural', 0) + return total_schools + elif 'total' in year_data: + # 如果没有分区数据但有total字段,使用total + return year_data.get('total', 0) + else: + print(f"年份 {year} 的学校数据缺少必要的字段") + return 0 + else: + print(f"年份 {year} 的学校数据格式不正确") + return 0 + except Exception as e: + print(f"计算学校总数时出错: {e}") + return 0 + + @staticmethod + def get_teacher_count_by_year_and_stage(year, stage): + """获取指定年份和学段的教职工总数""" + teacher_data = EducationDataModel.load_json_file(EducationDataModel.TEACHER_COUNT_FILE) + province_data = EducationDataModel.get_province_data(teacher_data) + + if not province_data: + return 0 + + # 根据学段获取对应的教职工数据字段名 + stage_field_mapping = { + 'preschool': 'preschool_teachers', + 'primary': 'primary_teachers', + 'junior': 'junior_teachers', + 'senior': 'senior_teachers', + 'vocational': 'vocational_teachers' + } + + field_name = stage_field_mapping.get(stage) + if not field_name or field_name not in province_data: + print(f"学段 {stage} 对应的教职工数据字段不存在") + return 0 + + year_data = province_data[field_name].get(str(year)) + if not year_data or not isinstance(year_data, dict): + print(f"年份 {year} 的教职工数据不存在或格式不正确") + return 0 + + # 优先使用total_staff,如果为0或不存在,则返回教师总数 + try: + total_staff = year_data.get('total_staff', 0) + if total_staff == 0: + total_staff = year_data.get('total_teacher', 0) + return total_staff + except Exception as e: + print(f"获取教职工总数时出错: {e}") + return 0 + + @staticmethod + def get_enrollment_count_by_year_and_stage(year, stage): + """获取指定年份和学段的在校生总数""" + enrollment_data = EducationDataModel.load_json_file(EducationDataModel.ENROLLMENT_COUNT_FILE) + province_data = EducationDataModel.get_province_data(enrollment_data) + + if not province_data or 'student_data' not in province_data: + print("未找到学生数据") + return 0 + + stage_data = province_data['student_data'].get(stage) + if not stage_data: + print(f"学段 {stage} 的学生数据不存在") + return 0 + + year_data = stage_data.get(str(year)) + if not year_data or not isinstance(year_data, dict): + print(f"年份 {year} 的学生数据不存在或格式不正确") + return 0 + + # 返回在校生总数 - 处理vocational数据只有total字段的情况 + try: + if 'urban' in year_data and 'town' in year_data and 'rural' in year_data: + # 通过累加城区、镇区、乡村数据计算总数 + total_enrollment = year_data.get('urban', 0) + year_data.get('town', 0) + year_data.get('rural', 0) + return total_enrollment + elif 'total' in year_data and stage == 'vocational': + # 对于vocational学段,如果只有total字段,使用total + return year_data.get('total', 0) + else: + # 对于其他学段,如果没有分区数据,直接报错 + print(f"年份 {year} 的学生数据缺少城区、镇区或乡村字段") + return 0 + except Exception as e: + print(f"获取在校生总数时出错: {e}") + return 0 + + @staticmethod + def get_admission_count_by_year_and_stage(year, stage): + """获取指定年份和学段的招生总数""" + admission_data = EducationDataModel.load_json_file(EducationDataModel.ADMISSION_COUNT_FILE) + province_data = EducationDataModel.get_province_data(admission_data) + + if not province_data or 'education_data' not in province_data: + print("未找到教育数据") + return 0 + + stage_data = province_data['education_data'].get(stage) + if not stage_data: + print(f"学段 {stage} 的教育数据不存在") + return 0 + + year_data = stage_data.get(str(year)) + if not year_data or not isinstance(year_data, dict): + print(f"年份 {year} 的教育数据不存在或格式不正确") + return 0 + + # 返回招生总数 - 处理vocational数据只有total字段的情况 + try: + if 'urban' in year_data and 'town' in year_data and 'rural' in year_data: + # 通过累加城区、镇区、乡村数据计算总数 + total_admission = year_data.get('urban', 0) + year_data.get('town', 0) + year_data.get('rural', 0) + return total_admission + elif 'total' in year_data and stage == 'vocational': + # 对于vocational学段,如果只有total字段,使用total + return year_data.get('total', 0) + else: + # 对于其他学段,如果没有分区数据,直接报错 + print(f"年份 {year} 的教育数据缺少城区、镇区或乡村字段") + return 0 + except Exception as e: + print(f"获取招生总数时出错: {e}") + return 0 + + @staticmethod + def get_education_data_by_year(year): + """获取指定年份所有学段的教育数据""" + result = [] + + for stage_code, stage_name in EducationDataModel.EDUCATION_STAGES.items(): + # 获取各类数据(增加异常处理) + try: + school_count = EducationDataModel.get_school_count_by_year_and_stage(year, stage_code) + teacher_count = EducationDataModel.get_teacher_count_by_year_and_stage(year, stage_code) + enrollment_count = EducationDataModel.get_enrollment_count_by_year_and_stage(year, stage_code) + admission_count = EducationDataModel.get_admission_count_by_year_and_stage(year, stage_code) + + # 转换为万人单位 + teacher_count_10k = round(teacher_count / 10000, 2) if teacher_count else 0 + enrollment_count_10k = round(enrollment_count / 10000, 2) if enrollment_count else 0 + admission_count_10k = round(admission_count / 10000, 2) if admission_count else 0 + + # 添加到结果列表 + result.append({ + 'education_stage': stage_name, + 'school_count': school_count, + 'teacher_count_10k': teacher_count_10k, + 'enrollment_count_10k': enrollment_count_10k, + 'admission_count_10k': admission_count_10k + }) + except Exception as e: + print(f"处理学段 {stage_name} 时出错: {e}") + # 出错时添加一个默认的空数据条目 + result.append({ + 'education_stage': stage_name, + 'school_count': 0, + 'teacher_count_10k': 0, + 'enrollment_count_10k': 0, + 'admission_count_10k': 0 + }) + + return result + + # 新增:人口数据相关方法 + @staticmethod + def get_population_data_by_year(year): + """获取指定年份的云南省人口数据""" + # 加载人口数据文件 + population_data = EducationDataModel.load_json_file(EducationDataModel.POPULATION_FILE) + # 获取云南省数据 + yunnan_data = EducationDataModel.get_province_data(population_data) + + if not yunnan_data: + print(f"未获取到云南省{year}年的人口数据") + return None + + year_str = str(year) + result = { + 'year': year, + 'total_population': yunnan_data.get('total_population', {}).get(year_str, 0), # 万人 + 'birth_population': yunnan_data.get('birth_population', {}).get(year_str, 0), # 原数据单位为个 + 'urban_population': yunnan_data.get('urban_population', {}).get(year_str, 0), # 万人 + 'rural_population': yunnan_data.get('rural_population', {}).get(year_str, 0), # 万人 + 'urbanization_rate': yunnan_data.get('urbanization_rate', {}).get(year_str, 0) # % + } + + # 将新生人口转换为万人(如果是整数) + if isinstance(result['birth_population'], int): + result['birth_population'] = round(result['birth_population'] / 10000, 1) + + return result + + @staticmethod + def print_population_data(population_data): + """打印人口数据""" + if not population_data: + print("没有可打印的人口数据") + return + + year = population_data.get('year', '未知') + print(f"云南省 {year}年人口概览") + print("-------------------") + print(f"总人口 {population_data.get('total_population', 0):,} 万人") + print(f"新生人口 {population_data.get('birth_population', 0)} 万人") + print(f"城镇人口 {population_data.get('urban_population', 0):,} 万人") + print(f"乡村人口 {population_data.get('rural_population', 0):,} 万人") + print(f"城镇化率 {population_data.get('urbanization_rate', 0):.2f} %") + + # 验证数据一致性 + total = population_data.get('total_population', 0) + urban_rural_sum = population_data.get('urban_population', 0) + population_data.get('rural_population', 0) + if abs(total - urban_rural_sum) > 0.01: + print("\n注意:总人口与城镇人口+乡村人口存在差异") + print(f"差异值: {abs(total - urban_rural_sum):.2f} 万人") + + @staticmethod + def print_education_data(data, year): + """打印教育数据""" + print(f"\n===== {year}年云南省各学段教育数据统计(单位:学校总数-个,其余-万人)=====") + print(f"{'学段':<8}{'学校总数':<10}{'教职工总数':<12}{'在校生总数':<12}{'招生总数':<12}") + print("=" * 60) + + for item in data: + print(f"{item['education_stage']:<8}{item['school_count']:<10}{item['teacher_count_10k']:<12.2f}{item['enrollment_count_10k']:<12.2f}{item['admission_count_10k']:<12.2f}") + + @staticmethod + def main(year=2023): + """主函数""" + try: + print(f"正在获取 {year} 年数据...") + print(f"数据目录: {EducationDataModel.DATA_DIR}") + + # 检查数据文件是否存在 + for file_path in [EducationDataModel.SCHOOL_COUNT_FILE, + EducationDataModel.TEACHER_COUNT_FILE, + EducationDataModel.ENROLLMENT_COUNT_FILE, + EducationDataModel.ADMISSION_COUNT_FILE, + EducationDataModel.POPULATION_FILE]: # 新增:检查人口数据文件 + if os.path.exists(file_path): + print(f"找到数据文件: {file_path}") + else: + print(f"警告:数据文件不存在: {file_path}") + + # 获取并打印教育数据 + education_data = EducationDataModel.get_education_data_by_year(year) + if education_data: + EducationDataModel.print_education_data(education_data, year) + else: + print("未获取到任何教育数据") + + # 新增:获取并打印人口数据 + print("\n" + "=" * 50) + population_data = EducationDataModel.get_population_data_by_year(year) + EducationDataModel.print_population_data(population_data) + + except Exception as e: + print(f"获取数据时发生错误: {e}") + import traceback + traceback.print_exc() + + +if __name__ == "__main__": + EducationDataModel.main() \ No newline at end of file diff --git a/Model/RuYuanZaiYuanCountModel.py b/Model/RuYuanZaiYuanCountModel.py index ba81b67..9a5ed59 100644 --- a/Model/RuYuanZaiYuanCountModel.py +++ b/Model/RuYuanZaiYuanCountModel.py @@ -1,14 +1,15 @@ import json -from pyecharts import options as opts -from pyecharts.charts import Bar, Line -from pyecharts.globals import CurrentConfig - -from Config.Config import ONLINE_HOST - -CurrentConfig.ONLINE_HOST = ONLINE_HOST class RuYuanZaiYuanModel: + # 定义支持的教育阶段映射 + EDUCATION_STAGES = { + 'preschool': '学前', + 'primary': '小学', + 'junior': '初中', + 'senior': '高中' + } + @staticmethod def load_student_data(): try: @@ -26,7 +27,11 @@ class RuYuanZaiYuanModel: return [], [] @staticmethod - def generate_preschool_education_config(): + def generate_preschool_education_config(education_stage='preschool'): + # 验证教育阶段参数 + if education_stage not in RuYuanZaiYuanModel.EDUCATION_STAGES: + education_stage = 'preschool' # 默认使用学前 + # 获取学前教育相关数据 enrollment_data, in_school_data = RuYuanZaiYuanModel.load_student_data() # 提取云南省级数据 @@ -39,17 +44,18 @@ class RuYuanZaiYuanModel: urban_data = [] # 城区数据 town_data = [] # 镇区数据 rural_data = [] # 乡村数据 - total_enroll = [] # 总入园数 + total_enroll = [] # 总人数 # 提取年份数据(2015-2024) years = [str(year) for year in range(2015, 2025)] for year in years: - enroll_data = yunnan_enroll["education_data"]["preschool"].get(year, {}) + # 使用传入的教育阶段参数 + enroll_data = yunnan_enroll["education_data"].get(education_stage, {}).get(year, {}) urban_data.append(enroll_data.get("urban", 0) / 10000) # 转换为万人 town_data.append(enroll_data.get("town", 0) / 10000) # 转换为万人 rural_data.append(enroll_data.get("rural", 0) / 10000) # 转换为万人 - # 计算总和作为总入园数,而非使用文件中的total字段 + # 计算总和作为总人数 calculated_total = enroll_data.get("urban", 0) + enroll_data.get("town", 0) + enroll_data.get("rural", 0) total_enroll.append(calculated_total / 10000) # 转换为万人 @@ -57,7 +63,7 @@ class RuYuanZaiYuanModel: base_year = "2022" # 找到2022年在years中的索引位置 base_index = years.index(base_year) if base_year in years else 0 - # 获取2022年的总入园数作为基数 + # 获取2022年的总人数作为基数 base_value = total_enroll[base_index] if base_index < len(total_enroll) else 0 # 创建2022年基数折线数据(2022-2024年) base_2022_line = [] @@ -67,18 +73,24 @@ class RuYuanZaiYuanModel: base_2022_line.append(base_value) else: base_2022_line.append(None) # 2022年之前不显示 - data = {"xAxis_data": years, - "series_data_0": urban_data, # 城区 - "series_data_1": town_data, # 镇区 - "series_data_2": rural_data, # 乡村 - "series_data_3": total_enroll, # 总入园数 - "series_data_4": base_2022_line # 2022年基数 - } + data = { + "xAxis_data": years, + "series_data_0": urban_data, # 城区 + "series_data_1": town_data, # 镇区 + "series_data_2": rural_data, # 乡村 + "series_data_3": total_enroll, # 总人数 + "series_data_4": base_2022_line, # 2022年基数 + "education_stage": RuYuanZaiYuanModel.EDUCATION_STAGES.get(education_stage, '学前') # 添加教育阶段名称 + } return data @staticmethod - def generate_in_school_education_config(): - # 获取学前教育相关数据 + def generate_in_school_education_config(education_stage='preschool'): + # 验证教育阶段参数 + if education_stage not in RuYuanZaiYuanModel.EDUCATION_STAGES: + education_stage = 'preschool' # 默认使用学前 + + # 获取在校生相关数据 enrollment_data, in_school_data = RuYuanZaiYuanModel.load_student_data() # 提取云南省级数据 @@ -90,15 +102,15 @@ class RuYuanZaiYuanModel: # 提取年份数据(2015-2024) years = [str(year) for year in range(2015, 2025)] - # 构建学前教育数据 + # 构建数据 urban_data = [] # 城区数据 town_data = [] # 镇区数据 rural_data = [] # 乡村数据 - total_in_school = [] # 总在园数 + total_in_school = [] # 总人数 for year in years: - # 将education_data改为student_data - in_school_year_data = yunnan_in_school["student_data"]["preschool"].get(year, {}) + # 使用传入的教育阶段参数 + in_school_year_data = yunnan_in_school["student_data"].get(education_stage, {}).get(year, {}) # 先获取原始数据 urban_val = in_school_year_data.get("urban", 0) @@ -118,7 +130,7 @@ class RuYuanZaiYuanModel: base_year = "2022" # 找到2022年在years中的索引位置 base_index = years.index(base_year) if base_year in years else 0 - # 获取2022年的总在园数作为基数 + # 获取2022年的总人数作为基数 base_value = total_in_school[base_index] if base_index < len(total_in_school) else 0 # 创建2022年基数折线数据(2022-2024年) base_2022_line = [] @@ -135,7 +147,8 @@ class RuYuanZaiYuanModel: "series_data_1": town_data, "series_data_2": rural_data, "series_data_3": total_in_school, - "series_data_4": base_2022_line + "series_data_4": base_2022_line, + "education_stage": RuYuanZaiYuanModel.EDUCATION_STAGES.get(education_stage, '学前') # 添加教育阶段名称 } return data diff --git a/Model/__pycache__/EducationDataModel.cpython-310.pyc b/Model/__pycache__/EducationDataModel.cpython-310.pyc new file mode 100644 index 0000000..7447f89 Binary files /dev/null and b/Model/__pycache__/EducationDataModel.cpython-310.pyc differ diff --git a/Model/__pycache__/RuYuanZaiYuanCountModel.cpython-310.pyc b/Model/__pycache__/RuYuanZaiYuanCountModel.cpython-310.pyc index 2ea7646..41985b9 100644 Binary files a/Model/__pycache__/RuYuanZaiYuanCountModel.cpython-310.pyc and b/Model/__pycache__/RuYuanZaiYuanCountModel.cpython-310.pyc differ diff --git a/Start.py b/Start.py index 5929489..8c2f3c1 100644 --- a/Start.py +++ b/Start.py @@ -4,7 +4,7 @@ from fastapi import FastAPI from fastapi.staticfiles import StaticFiles import uvicorn from Controller.RuYuanZaiYuanCountController import router as ruyuanZaiYuan_router - +from Controller.EducationDataController import router as educationData_router # 创建 FastAPI 应用实例 app = FastAPI(title="云南教育决策研究服务系统", description="云南省教育数据分析和可视化平台") @@ -14,6 +14,7 @@ app.mount("/static", StaticFiles(directory="static"), name="static") # 包含大屏展示路由 app.include_router(ruyuanZaiYuan_router) +app.include_router(educationData_router) # 主程序入口 if __name__ == "__main__": # 启动 FastAPI 应用,监听 8100 端口 diff --git a/Test/population_statistics.py b/Test/population_statistics.py new file mode 100644 index 0000000..b0bcc84 --- /dev/null +++ b/Test/population_statistics.py @@ -0,0 +1,274 @@ +import json +import os +from datetime import datetime + +class PopulationStatistics: + def __init__(self, data_file): + """初始化人口统计类,加载数据文件""" + self.data_file = data_file + self.data = self.load_data() + self.years = list(range(2015, 2025)) # 2015-2024年 + + def load_data(self): + """加载人口数据JSON文件""" + try: + with open(self.data_file, 'r', encoding='utf-8') as f: + return json.load(f) + except FileNotFoundError: + print(f"错误:找不到数据文件 {self.data_file}") + return [] + except json.JSONDecodeError: + print(f"错误:数据文件 {self.data_file} 格式不正确") + return [] + + def get_province_data(self): + """获取云南省全省数据""" + for item in self.data: + if item['area_name'] == '云南省' and item['area_code'] == '530000000': + return item + return None + + def get_city_data(self, city_name): + """获取指定城市的数据""" + for item in self.data: + if item['area_name'] == city_name: + return item + return None + + def get_all_cities(self): + """获取所有地市级城市列表""" + cities = [] + # 地市级城市的area_code格式为53XX00000 + for item in self.data: + if len(item['area_code']) == 9 and item['area_code'][-5:] == '00000' and item['area_code'] != '530000000': + cities.append(item) + return cities + + def calculate_total_population_by_year(self, level='province'): + """按年份计算总人口 + level: 'province'(全省), 'city'(昆明市), 'all_cities'(所有地级市) + """ + result = {} + + if level == 'province': + province_data = self.get_province_data() + if province_data: + result = province_data['total_population'] + + elif level == 'city': + city_data = self.get_city_data('昆明市') + if city_data: + result = city_data['total_population'] + + elif level == 'all_cities': + cities = self.get_all_cities() + for year in self.years: + total = 0 + for city in cities: + if str(year) in city['total_population']: + total += city['total_population'][str(year)] + result[str(year)] = total + + return result + + def calculate_urbanization_trend(self, area_name='云南省'): + """计算指定地区的城镇化率趋势""" + area_data = None + if area_name == '云南省': + area_data = self.get_province_data() + else: + area_data = self.get_city_data(area_name) + + if area_data and 'urbanization_rate' in area_data: + return area_data['urbanization_rate'] + return {} + + def compare_city_populations(self, year=2023): + """比较指定年份各城市的人口数量""" + cities = self.get_all_cities() + result = {} + + for city in cities: + if str(year) in city['total_population']: + result[city['area_name']] = city['total_population'][str(year)] + + # 按人口数量排序 + return dict(sorted(result.items(), key=lambda x: x[1], reverse=True)) + + def calculate_population_growth(self, area_name='云南省', start_year=2020, end_year=2023): + """计算指定地区在指定时间段内的人口增长率""" + area_data = None + if area_name == '云南省': + area_data = self.get_province_data() + else: + area_data = self.get_city_data(area_name) + + if not area_data: + return None + + start_pop = area_data['total_population'].get(str(start_year), 0) + end_pop = area_data['total_population'].get(str(end_year), 0) + + if start_pop == 0: + return None + + growth_rate = ((end_pop - start_pop) / start_pop) * 100 + return growth_rate + + def analyze_birth_rate(self, area_name='云南省'): + """分析指定地区的出生率趋势""" + area_data = None + if area_name == '云南省': + area_data = self.get_province_data() + else: + area_data = self.get_city_data(area_name) + + if not area_data or 'birth_population' not in area_data or 'total_population' not in area_data: + return {} + + birth_rates = {} + for year in self.years: + year_str = str(year) + if year_str in area_data['birth_population'] and year_str in area_data['total_population']: + birth_pop = area_data['birth_population'][year_str] + total_pop = area_data['total_population'][year_str] + + # 注意:总人口单位是万人,出生人口单位是个,需要统一单位 + if total_pop > 0 and birth_pop > 0: + birth_rate = (birth_pop / (total_pop * 10000)) * 1000 # 千分比 + birth_rates[year] = birth_rate + + return birth_rates + + def save_results_to_file(self, results, filename): + """将统计结果保存到文件""" + # 创建结果目录 + result_dir = os.path.join(os.path.dirname(self.data_file), '../Results') + os.makedirs(result_dir, exist_ok=True) + + # 生成带时间戳的文件名 + timestamp = datetime.now().strftime('%Y%m%d_%H%M%S') + full_filename = f"{filename}_{timestamp}.txt" + full_path = os.path.join(result_dir, full_filename) + + # 保存结果 + with open(full_path, 'w', encoding='utf-8') as f: + f.write(f"人口统计结果 - 生成时间:{datetime.now().strftime('%Y-%m-%d %H:%M:%S')}\n\n") + for key, value in results.items(): + if isinstance(value, dict): + f.write(f"{key}:\n") + for k, v in value.items(): + f.write(f" {k}: {v}\n") + else: + f.write(f"{key}: {value}\n") + + print(f"统计结果已保存至:{full_path}") + return full_path + +# 主函数演示如何使用这个类 +if __name__ == "__main__": + # 数据文件路径 + data_file = os.path.join(os.path.dirname(__file__), '../Data/RenKou.json') + + # 创建统计类实例 + stats = PopulationStatistics(data_file) + + # 检查数据是否成功加载 + if not stats.data: + print("无法加载数据,程序退出。") + exit(1) + + # 主菜单 + print("云南省人口数据统计分析工具") + print("========================") + + while True: + print("\n请选择要执行的统计分析:") + print("1. 查看云南省历年总人口统计") + print("2. 查看昆明市历年总人口统计") + print("3. 分析云南省城镇化率趋势") + print("4. 分析昆明市城镇化率趋势") + print("5. 比较2023年各城市人口数量") + print("6. 计算云南省2020-2023年人口增长率") + print("7. 分析云南省出生率趋势") + print("8. 分析昆明市出生率趋势") + print("9. 导出所有统计结果") + print("0. 退出程序") + + choice = input("请输入您的选择(0-9):") + + if choice == '0': + print("感谢使用,再见!") + break + + elif choice == '1': + result = stats.calculate_total_population_by_year('province') + print("\n云南省历年总人口统计(单位:万人):") + for year, population in result.items(): + print(f"{year}年: {population}") + + elif choice == '2': + result = stats.calculate_total_population_by_year('city') + print("\n昆明市历年总人口统计(单位:万人):") + for year, population in result.items(): + print(f"{year}年: {population}") + + elif choice == '3': + result = stats.calculate_urbanization_trend('云南省') + print("\n云南省历年城镇化率(单位:%):") + for year, rate in result.items(): + print(f"{year}年: {rate}") + + elif choice == '4': + result = stats.calculate_urbanization_trend('昆明市') + print("\n昆明市历年城镇化率(单位:%):") + for year, rate in result.items(): + print(f"{year}年: {rate}") + + elif choice == '5': + result = stats.compare_city_populations(2023) + print("\n2023年各城市人口数量排名(单位:万人):") + for i, (city, population) in enumerate(result.items(), 1): + print(f"{i}. {city}: {population}") + + elif choice == '6': + rate = stats.calculate_population_growth('云南省', 2020, 2023) + if rate is not None: + print(f"\n云南省2020-2023年人口增长率: {rate:.2f}%") + else: + print("\n无法计算人口增长率") + + elif choice == '7': + result = stats.analyze_birth_rate('云南省') + print("\n云南省历年出生率(单位:‰):") + for year, rate in result.items(): + print(f"{year}年: {rate:.2f}") + + elif choice == '8': + result = stats.analyze_birth_rate('昆明市') + print("\n昆明市历年出生率(单位:‰):") + for year, rate in result.items(): + print(f"{year}年: {rate:.2f}") + + elif choice == '9': + # 收集所有统计结果 + all_results = { + "云南省历年总人口统计(万人)": stats.calculate_total_population_by_year('province'), + "昆明市历年总人口统计(万人)": stats.calculate_total_population_by_year('city'), + "云南省历年城镇化率(%)": stats.calculate_urbanization_trend('云南省'), + "昆明市历年城镇化率(%)": stats.calculate_urbanization_trend('昆明市'), + "2023年各城市人口数量排名(万人)": stats.compare_city_populations(2023), + "云南省2020-2023年人口增长率(%)": stats.calculate_population_growth('云南省', 2020, 2023), + "云南省历年出生率(‰)": stats.analyze_birth_rate('云南省'), + "昆明市历年出生率(‰)": stats.analyze_birth_rate('昆明市') + } + + # 保存结果到文件 + file_path = stats.save_results_to_file(all_results, "population_statistics") + print(f"\n所有统计结果已保存至文件:{file_path}") + + else: + print("\n无效的选择,请重新输入。") + + # 等待用户按Enter键继续 + input("\n按Enter键继续...") \ No newline at end of file diff --git a/Test/read_population_data.py b/Test/read_population_data.py new file mode 100644 index 0000000..5d6fec3 --- /dev/null +++ b/Test/read_population_data.py @@ -0,0 +1,52 @@ +import json +import os + +# 获取脚本所在目录 +script_dir = os.path.dirname(os.path.abspath(__file__)) +# 构建数据文件的绝对路径 +file_path = os.path.join(script_dir, '../Data/RenKou.json') + +# 读取JSON数据 +with open(file_path, 'r', encoding='utf-8') as f: + population_data = json.load(f) + +# 查找云南省的数据 +for area in population_data: + if area.get('area_name') == '云南省': + yunnan_data = area + break + +# 提取2023年的人口数据 +year = '2023' + +# 总人口(万人) +total_population = yunnan_data.get('total_population', {}).get(year, 0) + +# 新生人口(万人,注意原数据是整数,需要转换为万人) +birth_population = yunnan_data.get('birth_population', {}).get(year, 0) +# 转换为万人(如果是整数) +if isinstance(birth_population, int): + birth_population = round(birth_population / 10000, 1) + +# 城镇人口(万人) +urban_population = yunnan_data.get('urban_population', {}).get(year, 0) + +# 乡村人口(万人) +rural_population = yunnan_data.get('rural_population', {}).get(year, 0) + +# 城镇化率(%) +urbanization_rate = yunnan_data.get('urbanization_rate', {}).get(year, 0) + +# 打印结果 +print("云南省 2023年人口概览") +print("-------------------") +print(f"总人口 {total_population:,} 万人") +print(f"新生人口 {birth_population} 万人") +print(f"城镇人口 {urban_population:,} 万人") +print(f"乡村人口 {rural_population:,} 万人") +print(f"城镇化率 {urbanization_rate:.2f} %") + +# 验证数据一致性 +if abs(total_population - (urban_population + rural_population)) > 0.01: + print("\n注意:总人口与城镇人口+乡村人口存在差异") + print(f"差异值: {abs(total_population - (urban_population + rural_population)):.2f} 万人") \ No newline at end of file diff --git a/Test/test_education_interfaces.py b/Test/test_education_interfaces.py new file mode 100644 index 0000000..157e21a --- /dev/null +++ b/Test/test_education_interfaces.py @@ -0,0 +1,166 @@ +import requests +import json +import time + +# API基础URL +BASE_URL = "http://localhost:8100/RuYuanZaiYuan" +EDUCATION_DATA_BASE_URL = "http://localhost:8100/EducationData" + +# 支持的教育阶段 +test_education_stages = [ + ("preschool", "学前"), + ("primary", "小学"), + ("junior", "初中"), + ("senior", "高中") +] + +# 测试年份 +test_years = [2023, 2022, 2024] + + +def test_school_chart_interface(): + """测试获取教育阶段图表数据接口""" + print("\n===== 测试 /school/chart 接口 =====") + + for stage_code, stage_name in test_education_stages: + url = f"{BASE_URL}/school/chart?education_stage={stage_code}" + print(f"\n测试 {stage_name}({stage_code}) 数据:") + + try: + response = requests.get(url) + response.raise_for_status() # 如果状态码不是200,抛出异常 + + data = response.json() + print(f"响应状态码: {response.status_code}") + print(f"响应数据: {json.dumps(data, ensure_ascii=False, indent=2)}") + + # 验证返回数据的基本结构 + assert "xAxis_data" in data, "返回数据缺少xAxis_data字段" + assert "series_data_0" in data, "返回数据缺少series_data_0字段(城区数据)" + assert "series_data_1" in data, "返回数据缺少series_data_1字段(镇区数据)" + assert "series_data_2" in data, "返回数据缺少series_data_2字段(乡村数据)" + assert "series_data_3" in data, "返回数据缺少series_data_3字段(总人数数据)" + assert "series_data_4" in data, "返回数据缺少series_data_4字段(2022年基数数据)" + assert "education_stage" in data, "返回数据缺少education_stage字段" + assert data["education_stage"] == stage_name, f"教育阶段名称不匹配,期望: {stage_name},实际: {data['education_stage']}" + + print(f"✅ {stage_name} 数据验证通过") + + except requests.exceptions.RequestException as e: + print(f"❌ 请求失败: {e}") + except AssertionError as e: + print(f"❌ 数据验证失败: {e}") + + # 添加短暂延迟,避免请求过于频繁 + time.sleep(0.5) + + +# @router.get("/school/inschool/chart") +# async def get_in_school_chart_config( +# education_stage: str = Query(default="preschool", pattern="^(preschool|primary|junior|senior)$", +# description="教育阶段: preschool(学前), primary(小学), junior(初中), senior(高中)") +# ): +# return RuYuanZaiYuanModel.generate_in_school_education_config(education_stage) +# + + +def test_education_data_by_year(): + """测试获取指定年份教育数据接口""" + print("\n===== 测试 /EducationData/byYear 接口 =====") + + # 测试不同年份的数据 + for year in test_years: + url = f"{EDUCATION_DATA_BASE_URL}/byYear?year={year}" + print(f"\n测试 {year} 年数据:") + + try: + response = requests.get(url) + response.raise_for_status() # 如果状态码不是200,抛出异常 + + data = response.json() + print(f"响应状态码: {response.status_code}") + print(f"响应数据: {json.dumps(data, ensure_ascii=False, indent=2)}") + + # 验证返回数据的基本结构 + assert "code" in data, "返回数据缺少code字段" + assert "message" in data, "返回数据缺少message字段" + assert "data" in data, "返回数据缺少data字段" + assert data["code"] == 200, f"状态码不匹配,期望: 200,实际: {data['code']}" + assert isinstance(data["data"], list), "data字段应为列表类型" + + # 验证数据内容 + if data["data"]: + # 检查每个数据项的结构 + for item in data["data"]: + assert "education_stage" in item, "数据项缺少education_stage字段" + assert "school_count" in item, "数据项缺少school_count字段" + assert "teacher_count_10k" in item, "数据项缺少teacher_count_10k字段" + assert "enrollment_count_10k" in item, "数据项缺少enrollment_count_10k字段" + assert "admission_count_10k" in item, "数据项缺少admission_count_10k字段" + + # 检查数值类型 + assert isinstance(item["school_count"], (int, float)), "school_count应为数值类型" + assert isinstance(item["teacher_count_10k"], (int, float)), "teacher_count_10k应为数值类型" + assert isinstance(item["enrollment_count_10k"], (int, float)), "enrollment_count_10k应为数值类型" + assert isinstance(item["admission_count_10k"], (int, float)), "admission_count_10k应为数值类型" + + print(f"✅ {year} 年数据验证通过,共包含 {len(data['data'])} 个教育阶段的数据") + else: + print(f"⚠️ {year} 年未返回数据") + + except requests.exceptions.RequestException as e: + print(f"❌ 请求失败: {e}") + except AssertionError as e: + print(f"❌ 数据验证失败: {e}") + + # 添加短暂延迟,避免请求过于频繁 + time.sleep(0.5) + + # 测试边界值 + print("\n===== 测试边界值 =====") + + # 测试最小值年份 + min_year = 2015 + url = f"{EDUCATION_DATA_BASE_URL}/byYear?year={min_year}" + print(f"\n测试最小值年份 {min_year}:") + try: + response = requests.get(url) + response.raise_for_status() + print(f"响应状态码: {response.status_code}") + print(f"✅ 最小值年份测试通过") + except requests.exceptions.RequestException as e: + print(f"❌ 请求失败: {e}") + + # 测试最大值年份 + max_year = 2028 + url = f"{EDUCATION_DATA_BASE_URL}/byYear?year={max_year}" + print(f"\n测试最大值年份 {max_year}:") + try: + response = requests.get(url) + response.raise_for_status() + print(f"响应状态码: {response.status_code}") + print(f"✅ 最大值年份测试通过") + except requests.exceptions.RequestException as e: + print(f"❌ 请求失败: {e}") + + # 测试超出范围的年份 + invalid_year = 2030 + url = f"{EDUCATION_DATA_BASE_URL}/byYear?year={invalid_year}" + print(f"\n测试超出范围的年份 {invalid_year}:") + try: + response = requests.get(url) + if response.status_code == 422: # FastAPI的验证错误状态码 + print(f"响应状态码: {response.status_code}") + print(f"✅ 超出范围年份正确返回验证错误") + else: + print(f"❌ 期望状态码422,实际: {response.status_code}") + except requests.exceptions.RequestException as e: + print(f"❌ 请求失败: {e}") + + +if __name__ == "__main__": + # 测试原有接口 + # test_school_chart_interface() + + # 测试新添加的教育数据接口 + test_education_data_by_year() \ No newline at end of file diff --git a/Test/test_population_data_interface.py b/Test/test_population_data_interface.py new file mode 100644 index 0000000..74879ad --- /dev/null +++ b/Test/test_population_data_interface.py @@ -0,0 +1,124 @@ +import requests +import json +import time + +# API基础URL +EDUCATION_DATA_BASE_URL = "http://localhost:8100/EducationData" + +# 测试年份 +test_years = [2023, 2022, 2024] + + +def test_population_data_by_year(): + """测试获取指定年份人口数据接口""" + print("\n===== 测试 /EducationData/populationByYear 接口 =====") + + # 测试不同年份的数据 + for year in test_years: + url = f"{EDUCATION_DATA_BASE_URL}/populationByYear?year={year}" + print(f"\n测试 {year} 年人口数据:") + + try: + response = requests.get(url) + response.raise_for_status() # 如果状态码不是200,抛出异常 + + data = response.json() + print(f"响应状态码: {response.status_code}") + print(f"响应数据: {json.dumps(data, ensure_ascii=False, indent=2)}") + + # 验证返回数据的基本结构 + assert "code" in data, "返回数据缺少code字段" + assert "message" in data, "返回数据缺少message字段" + assert "data" in data, "返回数据缺少data字段" + assert data["code"] == 200, f"状态码不匹配,期望: 200,实际: {data['code']}" + + # 验证数据内容 + if data["data"]: + # 检查数据项的结构 + population_data = data["data"] + assert "year" in population_data, "数据缺少year字段" + assert "total_population" in population_data, "数据缺少total_population字段" + assert "birth_population" in population_data, "数据缺少birth_population字段" + assert "urban_population" in population_data, "数据缺少urban_population字段" + assert "rural_population" in population_data, "数据缺少rural_population字段" + assert "urbanization_rate" in population_data, "数据缺少urbanization_rate字段" + + # 检查数值类型 + assert isinstance(population_data["year"], int), "year应为整数类型" + assert isinstance(population_data["total_population"], (int, float)), "total_population应为数值类型" + assert isinstance(population_data["birth_population"], (int, float)), "birth_population应为数值类型" + assert isinstance(population_data["urban_population"], (int, float)), "urban_population应为数值类型" + assert isinstance(population_data["rural_population"], (int, float)), "rural_population应为数值类型" + assert isinstance(population_data["urbanization_rate"], (int, float)), "urbanization_rate应为数值类型" + + # 检查年份是否匹配 + assert population_data["year"] == year, f"年份不匹配,期望: {year},实际: {population_data['year']}" + + print(f"✅ {year} 年人口数据验证通过") + else: + print(f"⚠️ {year} 年未返回人口数据") + + except requests.exceptions.RequestException as e: + print(f"❌ 请求失败: {e}") + except AssertionError as e: + print(f"❌ 数据验证失败: {e}") + + # 添加短暂延迟,避免请求过于频繁 + time.sleep(0.5) + + # 测试边界值 + print("\n===== 测试边界值 =====") + + # 测试最小值年份 + min_year = 2015 + url = f"{EDUCATION_DATA_BASE_URL}/populationByYear?year={min_year}" + print(f"\n测试最小值年份 {min_year}:") + try: + response = requests.get(url) + response.raise_for_status() + data = response.json() + print(f"响应状态码: {response.status_code}") + if data["code"] == 200 or data["code"] == 404: + print(f"✅ 最小值年份测试通过") + else: + print(f"❌ 状态码异常: {data['code']}") + except requests.exceptions.RequestException as e: + print(f"❌ 请求失败: {e}") + + # 测试最大值年份 + max_year = 2028 + url = f"{EDUCATION_DATA_BASE_URL}/populationByYear?year={max_year}" + print(f"\n测试最大值年份 {max_year}:") + try: + response = requests.get(url) + response.raise_for_status() + data = response.json() + print(f"响应状态码: {response.status_code}") + if data["code"] == 200 or data["code"] == 404: + print(f"✅ 最大值年份测试通过") + else: + print(f"❌ 状态码异常: {data['code']}") + except requests.exceptions.RequestException as e: + print(f"❌ 请求失败: {e}") + + # 测试超出范围的年份 + invalid_year = 2030 + url = f"{EDUCATION_DATA_BASE_URL}/populationByYear?year={invalid_year}" + print(f"\n测试超出范围的年份 {invalid_year}:") + try: + response = requests.get(url) + if response.status_code == 422: # FastAPI的验证错误状态码 + print(f"响应状态码: {response.status_code}") + print(f"✅ 超出范围年份正确返回验证错误") + else: + data = response.json() + print(f"响应状态码: {response.status_code}") + print(f"响应数据: {json.dumps(data, ensure_ascii=False, indent=2)}") + print(f"❌ 期望状态码422,实际: {response.status_code}") + except requests.exceptions.RequestException as e: + print(f"❌ 请求失败: {e}") + + +if __name__ == "__main__": + # 测试新添加的人口数据接口 + test_population_data_by_year() \ No newline at end of file diff --git a/Tools/T3_SchoolCount.py b/Tools/T3_SchoolCount.py index b8b7102..eb8e719 100644 --- a/Tools/T3_SchoolCount.py +++ b/Tools/T3_SchoolCount.py @@ -74,7 +74,7 @@ def main(): }, # 初中教育 - 'junior_high_schools': { + 'junior_schools': { 'years': [2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024], 'columns': [ {'year': 2015, 'urban': 'CF', 'town': 'CG', 'rural': 'CH'}, @@ -92,7 +92,7 @@ def main(): }, # 普通高中教育 - 'senior_high_schools': { + 'senior_schools': { 'years': [2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024], 'columns': [ {'year': 2015, 'urban': 'DT', 'town': 'DU', 'rural': 'DV'}, diff --git a/Tools/T7_TeacherCount.py b/Tools/T7_TeacherCount.py index 8e12c46..4ae027b 100644 --- a/Tools/T7_TeacherCount.py +++ b/Tools/T7_TeacherCount.py @@ -53,7 +53,7 @@ EDUCATION_STAGES = { {'year': 2024, 'total_staff': 'EZ', 'urban_staff': 'FA', 'town_staff': 'FB', 'rural_staff': 'FC', 'total_teacher': 'FD', 'urban_teacher': 'FE', 'town_teacher': 'FF', 'rural_teacher': 'FG'} ] }, - 'junior_high_teachers': { + 'junior_teachers': { 'years': [2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024], 'columns': [ {'year': 2015, 'total_staff': 'FH', 'urban_staff': 'FI', 'town_staff': 'FJ', 'rural_staff': 'FK', 'total_teacher': 'FL', 'urban_teacher': 'FM', 'town_teacher': 'FN', 'rural_teacher': 'FO'}, @@ -68,7 +68,7 @@ EDUCATION_STAGES = { {'year': 2024, 'total_staff': 'IB', 'urban_staff': 'IC', 'town_staff': 'ID', 'rural_staff': 'IE', 'total_teacher': 'IF', 'urban_teacher': 'IG', 'town_teacher': 'IH', 'rural_teacher': 'II'} ] }, - 'senior_high_teachers': { + 'senior_teachers': { 'years': [2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024], 'columns': [ {'year': 2015, 'total_staff': 'IJ', 'urban_staff': 'IK', 'town_staff': 'IL', 'rural_staff': 'IM', 'total_teacher': 'IN', 'urban_teacher': 'IO', 'town_teacher': 'IP', 'rural_teacher': 'IQ'}, diff --git a/static/RuYuanZaiYuanCount.html b/static/RuYuanZaiYuanCount.html deleted file mode 100644 index 37ebc92..0000000 --- a/static/RuYuanZaiYuanCount.html +++ /dev/null @@ -1,135 +0,0 @@ - - -
- - -