This commit is contained in:
512song committed 2023-10-10 20:58:37 +08:00
1 parent 3017b0ab48
commit 1033d6ca9d
4 files changed
+532 -97

No files matched your search

@@ -1 +1 @@
{"3532380": {"name": "鲁天笑", "sex": "男", "unit": "消防支队", "sub_unit": "党群(综合)科", "birth": "2001-02-15"}, "3532377": {"name": "白泽远", "sex": "男", "unit": "消防支队", "sub_unit": "党群(综合)科", "birth": "2001-08-24"}, "3532560": {"name": "张昊天", "sex": "男", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "2002-04-13"}, "3532569": {"name": "王冬", "sex": "男", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "2001-03-02"}, "3532539": {"name": "卢凯", "sex": "男", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "2001-10-16"}, "3532570": {"name": "孔佑琦", "sex": "男", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "2002-07-02"}, "3532501": {"name": "杨婉婷", "sex": "女", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "2001-01-03"}, "3532579": {"name": "田林燕", "sex": "女", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "2001-03-09"}, "3532542": {"name": "顾辰羽", "sex": "男", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "2000-06-07"}, "3532535": {"name": "贾炜昂", "sex": "男", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "1995-04-12"}, "3532583": {"name": "赵永杰", "sex": "男", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "2001-01-27"}, "3532578": {"name": "姚腾帅", "sex": "男", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "1999-12-26"}, "3532500": {"name": "杨鹏昊", "sex": "男", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "2002-01-31"}, "3532561": {"name": "赵娜", "sex": "女", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "2001-06-21"}, "3532549": {"name": "王维毅", "sex": "男", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "2001-04-02"}, "3532523": {"name": "刘梦凡", "sex": "男", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "2001-03-30"}, "3532552": {"name": "李祎炜", "sex": "男", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "1999-10-27"}, "3532525": {"name": "郝云倩", "sex": "女", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "1998-08-16"}, "3532581": {"name": "黄子豪", "sex": "男", "unit": "电仪部", "sub_unit": "控制系统运维室", "birth": "2001-11-03"}, "3532512": {"name": "张士垚", "sex": "男", "unit": "电仪部", "sub_unit": "控制系统运维室", "birth": "2002-12-06"}, "3532490": {"name": "王华清", "sex": "男", "unit": "电仪部", "sub_unit": "控制系统运维室", "birth": "2001-08-18"}, "3532528": {"name": "武旭", "sex": "男", "unit": "电仪部", "sub_unit": "控制系统运维室", "birth": "2001-12-24"}, "3532534": {"name": "王宇晨", "sex": "男", "unit": "电仪部", "sub_unit": "控制系统运维室", "birth": "1998-08-19"}, "3532530": {"name": "魏晨硕", "sex": "男", "unit": "电仪部", "sub_unit": "电仪作业四区", "birth": "2003-03-28"}, "3532550": {"name": "刘欣", "sex": "女", "unit": "电仪部", "sub_unit": "电仪作业四区", "birth": "2002-03-28"}, "3532557": {"name": "徐铭远", "sex": "男", "unit": "电仪部", "sub_unit": "电仪作业四区", "birth": "2001-05-03"}, "3532584": {"name": "许泽龙", "sex": "男", "unit": "电仪部", "sub_unit": "电仪作业四区", "birth": "2000-06-24"}, "3532567": {"name": "黄丹", "sex": "女", "unit": "电仪部", "sub_unit": "电仪作业四区", "birth": "2001-08-20"}, "3532582": {"name": "刘洋", "sex": "男", "unit": "电仪部", "sub_unit": "电仪作业四区", "birth": "2001-09-01"}, "3532572": {"name": "赵联杰", "sex": "男", "unit": "电仪部", "sub_unit": "电仪作业三区", "birth": "2001-10-17"}, "3532505": {"name": "龚向荣", "sex": "男", "unit": "电仪部", "sub_unit": "电仪作业三区", "birth": "2002-01-20"}, "3532548": {"name": "徐世昊", "sex": "男", "unit": "电仪部", "sub_unit": "电仪作业二区", "birth": "2001-05-10"}, "3532532": {"name": "刘新贺", "sex": "男", "unit": "电仪部", "sub_unit": "电仪作业二区", "birth": "2000-10-15"}, "3532554": {"name": "杨奥旭", "sex": "女", "unit": "电仪部", "sub_unit": "电仪作业二区", "birth": "2001-02-20"}, "3532551": {"name": "杨超壹", "sex": "男", "unit": "电仪部", "sub_unit": "电仪作业二区", "birth": "2001-10-17"}, "3532565": {"name": "李瀚文", "sex": "男", "unit": "电仪部", "sub_unit": "仪表作业一区", "birth": "2002-02-09"}, "3532563": {"name": "温志伟", "sex": "男", "unit": "电仪部", "sub_unit": "仪表作业一区", "birth": "2002-02-14"}, "3532577": {"name": "徐圣尧", "sex": "男", "unit": "电仪部", "sub_unit": "仪表作业一区", "birth": "2001-09-24"}, "3532543": {"name": "张俊晴", "sex": "女", "unit": "电仪部", "sub_unit": "仪表作业一区", "birth": "2001-01-13"}, "3532544": {"name": "严梓沛", "sex": "女", "unit": "电仪部", "sub_unit"Line truncated
{"3532380": {"name": "鲁天笑", "sex": "男", "unit": "消防支队", "sub_unit": "党群(综合)科", "birth": "2001-02-15"}, "3532377": {"name": "白泽远", "sex": "男", "unit": "消防支队", "sub_unit": "党群(综合)科", "birth": "2001-08-24"}, "3532560": {"name": "张昊天", "sex": "男", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "2002-04-13"}, "3532569": {"name": "王冬", "sex": "男", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "2001-03-02"}, "3532539": {"name": "卢凯", "sex": "男", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "2001-10-16"}, "3532570": {"name": "孔佑琦", "sex": "男", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "2002-07-02"}, "3532501": {"name": "杨婉婷", "sex": "女", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "2001-01-03"}, "3532579": {"name": "田林燕", "sex": "女", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "2001-03-09"}, "3532542": {"name": "顾辰羽", "sex": "男", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "2000-06-07"}, "3532535": {"name": "贾炜昂", "sex": "男", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "1995-04-12"}, "3532583": {"name": "赵永杰", "sex": "男", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "2001-01-27"}, "3532578": {"name": "姚腾帅", "sex": "男", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "1999-12-26"}, "3532500": {"name": "杨鹏昊", "sex": "男", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "2002-01-31"}, "3532561": {"name": "赵娜", "sex": "女", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "2001-06-21"}, "3532549": {"name": "王维毅", "sex": "男", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "2001-04-02"}, "3532523": {"name": "刘梦凡", "sex": "男", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "2001-03-30"}, "3532552": {"name": "李祎炜", "sex": "男", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "1999-10-27"}, "3532525": {"name": "郝云倩", "sex": "女", "unit": "电仪部", "sub_unit": "电仪南港分部", "birth": "1998-08-16"}, "3532581": {"name": "黄子豪", "sex": "男", "unit": "电仪部", "sub_unit": "控制系统运维室", "birth": "2001-11-03"}, "3532512": {"name": "张士垚", "sex": "男", "unit": "电仪部", "sub_unit": "控制系统运维室", "birth": "2002-12-06"}, "3532490": {"name": "王华清", "sex": "男", "unit": "电仪部", "sub_unit": "控制系统运维室", "birth": "2001-08-18"}, "3532528": {"name": "武旭", "sex": "男", "unit": "电仪部", "sub_unit": "控制系统运维室", "birth": "2001-12-24"}, "3532534": {"name": "王宇晨", "sex": "男", "unit": "电仪部", "sub_unit": "控制系统运维室", "birth": "1998-08-19"}, "3532530": {"name": "魏晨硕", "sex": "男", "unit": "电仪部", "sub_unit": "电仪作业四区", "birth": "2003-03-28"}, "3532550": {"name": "刘欣", "sex": "女", "unit": "电仪部", "sub_unit": "电仪作业四区", "birth": "2002-03-28"}, "3532557": {"name": "徐铭远", "sex": "男", "unit": "电仪部", "sub_unit": "电仪作业四区", "birth": "2001-05-03"}, "3532584": {"name": "许泽龙", "sex": "男", "unit": "电仪部", "sub_unit": "电仪作业四区", "birth": "2000-06-24"}, "3532567": {"name": "黄丹", "sex": "女", "unit": "电仪部", "sub_unit": "电仪作业四区", "birth": "2001-08-20"}, "3532582": {"name": "刘洋", "sex": "男", "unit": "电仪部", "sub_unit": "电仪作业四区", "birth": "2001-09-01"}, "3532572": {"name": "赵联杰", "sex": "男", "unit": "电仪部", "sub_unit": "电仪作业三区", "birth": "2001-10-17"}, "3532505": {"name": "龚向荣", "sex": "男", "unit": "电仪部", "sub_unit": "电仪作业三区", "birth": "2002-01-20"}, "3532548": {"name": "徐世昊", "sex": "男", "unit": "电仪部", "sub_unit": "电仪作业二区", "birth": "2001-05-10"}, "3532532": {"name": "刘新贺", "sex": "男", "unit": "电仪部", "sub_unit": "电仪作业二区", "birth": "2000-10-15"}, "3532554": {"name": "杨奥旭", "sex": "女", "unit": "电仪部", "sub_unit": "电仪作业二区", "birth": "2001-02-20"}, "3532551": {"name": "杨超壹", "sex": "男", "unit": "电仪部", "sub_unit": "电仪作业二区", "birth": "2001-10-17"}, "3532565": {"name": "李瀚文", "sex": "男", "unit": "电仪部", "sub_unit": "仪表作业一区", "birth": "2002-02-09"}, "3532563": {"name": "温志伟", "sex": "男", "unit": "电仪部", "sub_unit": "仪表作业一区", "birth": "2002-02-14"}, "3532577": {"name": "徐圣尧", "sex": "男", "unit": "电仪部", "sub_unit": "仪表作业一区", "birth": "2001-09-24"}, "3532543": {"name": "张俊晴", "sex": "女", "unit": "电仪部", "sub_unit": "仪表作业一区", "birth": "2001-01-13"}, "3532544": {"name": "严梓沛", "sex": "女", "unit": "电仪部", "sub_unit"Line truncated
+475 -40
View File
@@ -414,27 +414,10 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"id": "edcd9c2d-7254-493d-82e0-55556700330b",
"metadata": {
"execution": {
"iopub.execute_input": "2023-08-16T08:53:29.466349Z",
"iopub.status.busy": "2023-08-16T08:53:29.465563Z",
"iopub.status.idle": "2023-08-16T08:53:30.567398Z",
"shell.execute_reply": "2023-08-16T08:53:30.566465Z",
"shell.execute_reply.started": "2023-08-16T08:53:29.466307Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<class 'str'>\n",
"{\"errmsg\":\"ok\"}\n"
]
}
],
"metadata": {},
"outputs": [],
"source": [
"import requests\n",
"import json\n",
@@ -467,27 +450,10 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"id": "0b528b37-18f5-4b05-bfad-73be35b120cc",
"metadata": {
"execution": {
"iopub.execute_input": "2023-08-26T01:22:01.984551Z",
"iopub.status.busy": "2023-08-26T01:22:01.983645Z",
"iopub.status.idle": "2023-08-26T01:22:02.822718Z",
"shell.execute_reply": "2023-08-26T01:22:02.821896Z",
"shell.execute_reply.started": "2023-08-26T01:22:01.984511Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"<class 'str'>\n",
"{\"errmsg\":\"ok\"}\n"
]
}
],
"metadata": {},
"outputs": [],
"source": [
"import requests\n",
"import json\n",
@@ -837,6 +803,475 @@
" sheet.append(row)\n",
"wb.save(filename) "
]
},
{
"cell_type": "markdown",
"id": "2ae502e4-e8ec-4786-8593-ca8835c0b215",
"metadata": {},
"source": [
"## 分析三月数据"
]
},
{
"cell_type": "code",
"execution_count": 26,
"id": "bc0e659e-b072-4ffc-9a9f-951c61ad22b9",
"metadata": {
"execution": {
"iopub.execute_input": "2023-10-10T11:12:02.250010Z",
"iopub.status.busy": "2023-10-10T11:12:02.249552Z",
"iopub.status.idle": "2023-10-10T11:12:02.315587Z",
"shell.execute_reply": "2023-10-10T11:12:02.314268Z",
"shell.execute_reply.started": "2023-10-10T11:12:02.249973Z"
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"体重平均成绩:3.6196分,男性:184人\n",
"体重平均成绩:3.6765分,女性:204人\n",
"体重平均成绩:3.6495分,总体:388人\n",
"肺活量平均成绩:1.8865分,男性:185人\n",
"肺活量平均成绩:1.7122分,女性:205人\n",
"肺活量平均成绩:1.7949分,总体:390人\n",
"握力平均成绩:1.7838分,男性:185人\n",
"握力平均成绩:1.774分,女性:208人\n",
"握力平均成绩:1.7786分,总体:393人\n",
"坐位体前屈平均成绩:2.8764分,男性:178人\n",
"坐位体前屈平均成绩:2.9424分,女性:191人\n",
"坐位体前屈平均成绩:2.9106分,总体:369人\n",
"纵跳平均成绩:0.8421分,男性:57人\n",
"纵跳平均成绩:0.5513分,女性:78人\n",
"纵跳平均成绩:0.6741分,总体:135人\n",
"俯卧撑平均成绩:3.0333分,男性:30人\n",
"俯卧撑平均成绩:3.0333分,总体:30人\n",
"一分钟仰卧起坐平均成绩:3.2927分,女性:41人\n",
"一分钟仰卧起坐平均成绩:3.2927分,总体:41人\n",
"单脚站立平均成绩:1.6932分,男性:176人\n",
"单脚站立平均成绩:1.7135分,女性:192人\n",
"单脚站立平均成绩:1.7038分,总体:368人\n",
"选择反应时平均成绩:2.4725分,男性:182人\n",
"选择反应时平均成绩:2.2927分,女性:205人\n",
"选择反应时平均成绩:2.3773分,总体:387人\n",
"台阶指数平均成绩:3.475分,男性:40人\n",
"台阶指数平均成绩:3.6866分,女性:67人\n",
"台阶指数平均成绩:3.6075分,总体:107人\n"
]
}
],
"source": [
"import json\n",
"import openpyxl\n",
"\n",
"list1 = []\n",
"\n",
"wb = openpyxl.load_workbook('data/杨庙体测报告明细表.xlsx')\n",
"sheet = wb.active\n",
"items = ['bmi','lung','grip','flexion','balance','reaction']\n",
"dict1 = {}\n",
"for n in range(2, sheet.max_row+1):\n",
" if sheet.cell(n,1).value is not None:\n",
" code = int(sheet.cell(n, 1).value) \n",
" list1.append(str(code)) \n",
"\n",
"\n",
"items = ['体重','肺活量','握力','坐位体前屈','纵跳','俯卧撑','一分钟仰卧起坐','单脚站立','选择反应时','台阶指数']\n",
"filename = 'data/result_杨庙社区2303.json'\n",
"with open(filename,'r') as fl:\n",
" dict1 = json.load(fl) \n",
"\n",
"\n",
"for item in items:\n",
" m = 0\n",
" f = 0\n",
" score = 0\n",
" t_score = 0\n",
" for k,v in dict1.items():\n",
" if v['sex'] == 1 and item in v.keys() and k in list1:\n",
" #print(k)\n",
" \n",
" if v[item]['得分']!=\"\":\n",
" m = m +1\n",
" score = score+int(v[item]['得分'])\n",
" if m>0:\n",
" print(f'{item}平均成绩:{round(score/m,4)}分,男性:{m}人')\n",
" t_score = t_score + score\n",
" score = 0\n",
" for k,v in dict1.items():\n",
" if v['sex'] == 2 and item in v.keys() and k in list1:\n",
" \n",
" if v[item]['得分']!='':\n",
" f = f +1\n",
" score = score+int(v[item]['得分'])\n",
" if f >0:\n",
" print(f'{item}平均成绩:{round(score/f,4)}分,女性:{f}人')\n",
" t_score = t_score + score\n",
" if (f+m)>0:\n",
" print(f'{item}平均成绩:{round(t_score/(f+m),4)}分,总体:{f+m}人')\n",
" "
]
},
{
"cell_type": "code",
"execution_count": 37,
"id": "e35ed01c-9a45-4a3c-b391-1655223f0c08",
"metadata": {
"execution": {
"iopub.execute_input": "2023-10-10T11:23:00.446004Z",
"iopub.status.busy": "2023-10-10T11:23:00.445535Z",
"iopub.status.idle": "2023-10-10T11:23:00.495577Z",
"shell.execute_reply": "2023-10-10T11:23:00.494955Z",
"shell.execute_reply.started": "2023-10-10T11:23:00.445967Z"
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"男性:187人\n",
"女性:208人\n",
"总体:395人\n"
]
}
],
"source": [
"import json\n",
"import openpyxl\n",
"\n",
"list1 = []\n",
"\n",
"wb = openpyxl.load_workbook('data/杨庙体测报告明细表.xlsx')\n",
"sheet = wb.active\n",
"items = ['bmi','lung','grip','flexion','balance','reaction']\n",
"dict1 = {}\n",
"for n in range(2, sheet.max_row+1):\n",
" if sheet.cell(n,1).value is not None:\n",
" code = int(sheet.cell(n, 1).value) \n",
" list1.append(str(code)) \n",
"\n",
"\n",
"items = ['体重','肺活量','握力','坐位体前屈','纵跳','俯卧撑','一分钟仰卧起坐','单脚站立','选择反应时','台阶指数']\n",
"filename = 'data/result_杨庙社区2303.json'\n",
"with open(filename,'r') as fl:\n",
" dict1 = json.load(fl) \n",
"\n",
"\n",
"m =0\n",
"f =0\n",
"for k,v in dict1.items():\n",
" if v['sex'] == 1 and k in list1:\n",
" m = m +1\n",
"print(f'男性:{m}人')\n",
"\n",
"for k,v in dict1.items():\n",
" if v['sex'] == 2 and k in list1:\n",
" f = f +1\n",
"print(f'女性:{f}人')\n",
"\n",
"print(f'总体:{f+m}人')"
]
},
{
"cell_type": "code",
"execution_count": 28,
"id": "a3fd59cd-5b02-4b19-b91f-12aad60bcc97",
"metadata": {
"execution": {
"iopub.execute_input": "2023-10-10T11:15:19.155689Z",
"iopub.status.busy": "2023-10-10T11:15:19.155226Z",
"iopub.status.idle": "2023-10-10T11:15:19.226867Z",
"shell.execute_reply": "2023-10-10T11:15:19.225686Z",
"shell.execute_reply.started": "2023-10-10T11:15:19.155653Z"
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"76\n"
]
}
],
"source": [
"import json\n",
"import openpyxl\n",
"\n",
"list1 = []\n",
"\n",
"wb = openpyxl.load_workbook('data/杨庙体测报告明细表.xlsx')\n",
"sheet = wb.active\n",
"items = ['bmi','lung','grip','flexion','balance','reaction']\n",
"dict1 = {}\n",
"for n in range(2, sheet.max_row+1):\n",
" if sheet.cell(n,1).value is not None:\n",
" code = int(sheet.cell(n, 1).value) \n",
" list1.append(str(code)) \n",
"\n",
"\n",
"items = ['体重','肺活量','握力','坐位体前屈','纵跳','俯卧撑','一分钟仰卧起坐','单脚站立','选择反应时','台阶指数']\n",
"filename = 'data/result_杨庙社区2303.json'\n",
"with open(filename,'r') as fl:\n",
" dict1 = json.load(fl) \n",
"for item in list1:\n",
" if item not in dict1.keys():\n",
" print(item)"
]
},
{
"cell_type": "markdown",
"id": "55b49119-2d00-4b65-a5cb-4079c84ce188",
"metadata": {},
"source": [
"## 分析八月数据"
]
},
{
"cell_type": "code",
"execution_count": 46,
"id": "0550886e-f3d7-4366-acdc-98d2aa879f98",
"metadata": {
"execution": {
"iopub.execute_input": "2023-10-10T11:35:05.533094Z",
"iopub.status.busy": "2023-10-10T11:35:05.532623Z",
"iopub.status.idle": "2023-10-10T11:35:05.617045Z",
"shell.execute_reply": "2023-10-10T11:35:05.616118Z",
"shell.execute_reply.started": "2023-10-10T11:35:05.533057Z"
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"bmi平均成绩:3.7597分,男性:258人\n",
"bmi平均成绩:3.7911分,女性:316人\n",
"bmi平均成绩:3.777分,总体:574人\n",
"lung平均成绩:1.8803分,男性:259人\n",
"lung平均成绩:1.652分,女性:319人\n",
"lung平均成绩:1.7543分,总体:578人\n",
"grip平均成绩:1.5328分,男性:259人\n",
"grip平均成绩:1.5063分,女性:318人\n",
"grip平均成绩:1.5182分,总体:577人\n",
"flexion平均成绩:2.2923分,男性:260人\n",
"flexion平均成绩:2.511分,女性:319人\n",
"flexion平均成绩:2.4128分,总体:579人\n",
"balance平均成绩:2.082分,男性:244人\n",
"balance平均成绩:1.9628分,女性:296人\n",
"balance平均成绩:2.0167分,总体:540人\n",
"reaction平均成绩:1.9648分,男性:256人\n",
"reaction平均成绩:1.7453分,女性:318人\n",
"reaction平均成绩:1.8432分,总体:574人\n"
]
}
],
"source": [
"import json\n",
"import openpyxl\n",
"\n",
"list1 = []\n",
"\n",
"wb = openpyxl.load_workbook('data/杨庙测试2023年8月报告明细表.xlsx')\n",
"sheet = wb.active\n",
"items = ['bmi','lung','grip','flexion','balance','reaction']\n",
"dict1 = {}\n",
"for n in range(2, sheet.max_row+1):\n",
" if sheet.cell(n,1).value is not None:\n",
" code = int(sheet.cell(n, 1).value) \n",
" list1.append(str(code)) \n",
"filename = 'data/result_杨庙2308.json'\n",
"with open(filename,'r') as fl:\n",
" dict1 = json.load(fl) \n",
" \n",
"for item in items: \n",
" m = 0\n",
" f = 0\n",
" score = 0\n",
" t_score = 0\n",
" for k,v in dict1.items():\n",
" if v['gender'] == 'male' and item in v['fit'].keys() and k in list1:\n",
" #print(k)\n",
" \n",
" if v['fit'][item]['score']!=\"\":\n",
" m = m +1\n",
" score = score+int(v['fit'][item]['score'])\n",
" if m>0:\n",
" print(f'{item}平均成绩:{round(score/m,4)}分,男性:{m}人')\n",
" t_score = t_score + score\n",
" score = 0\n",
" for k,v in dict1.items():\n",
" if v['gender'] == 'female' and item in v['fit'].keys() and k in list1:\n",
" \n",
" if v['fit'][item]['score']!=\"\":\n",
" f = f +1\n",
" score = score+int(v['fit'][item]['score'])\n",
" if f >0:\n",
" print(f'{item}平均成绩:{round(score/f,4)}分,女性:{f}人')\n",
" t_score = t_score + score\n",
" if (f+m)>0:\n",
" print(f'{item}平均成绩:{round(t_score/(f+m),4)}分,总体:{f+m}人')"
]
},
{
"cell_type": "code",
"execution_count": 45,
"id": "775e5a8b-6384-4d67-bbda-c5655dba05d3",
"metadata": {
"execution": {
"iopub.execute_input": "2023-10-10T11:34:53.146506Z",
"iopub.status.busy": "2023-10-10T11:34:53.146035Z",
"iopub.status.idle": "2023-10-10T11:34:53.228193Z",
"shell.execute_reply": "2023-10-10T11:34:53.227372Z",
"shell.execute_reply.started": "2023-10-10T11:34:53.146468Z"
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"579\n",
"男性:260人\n",
"女性:319人\n",
"总体:579人\n"
]
}
],
"source": [
"import json\n",
"import openpyxl\n",
"\n",
"list1 = []\n",
"\n",
"wb = openpyxl.load_workbook('data/杨庙测试2023年8月报告明细表.xlsx')\n",
"sheet = wb.active\n",
"items = ['bmi','lung','grip','flexion','balance','reaction']\n",
"\n",
"for n in range(2, sheet.max_row+1):\n",
" if sheet.cell(n,1).value is not None:\n",
" code = int(sheet.cell(n, 1).value) \n",
" list1.append(str(code)) \n",
"\n",
"\n",
"items = ['体重','肺活量','握力','坐位体前屈','纵跳','俯卧撑','一分钟仰卧起坐','单脚站立','选择反应时','台阶指数']\n",
"filename = 'data/杨庙社区人员信息2307.json'\n",
"with open(filename,'r') as fl:\n",
" dict1 = json.load(fl) \n",
"print(len(list1))\n",
"\n",
"m =0\n",
"f =0\n",
"for k,v in dict1.items():\n",
" if v['sex'] == '男' and k in list1:\n",
" m = m +1\n",
"print(f'男性:{m}人')\n",
"\n",
"for k,v in dict1.items():\n",
" if v['sex'] == '女' and k in list1:\n",
" f = f +1\n",
"print(f'女性:{f}人')\n",
"\n",
"print(f'总体:{f+m}人')"
]
},
{
"cell_type": "code",
"execution_count": 43,
"id": "33984dce-b540-4f60-a100-6399f43d9df8",
"metadata": {
"execution": {
"iopub.execute_input": "2023-10-10T11:33:29.904700Z",
"iopub.status.busy": "2023-10-10T11:33:29.904220Z",
"iopub.status.idle": "2023-10-10T11:33:29.960744Z",
"shell.execute_reply": "2023-10-10T11:33:29.960314Z",
"shell.execute_reply.started": "2023-10-10T11:33:29.904662Z"
},
"tags": []
},
"outputs": [],
"source": [
"import json\n",
"import openpyxl\n",
"\n",
"list1 = []\n",
"\n",
"wb = openpyxl.load_workbook('data/杨庙测试2023年8月报告明细表.xlsx')\n",
"sheet = wb.active\n",
"items = ['bmi','lung','grip','flexion','balance','reaction']\n",
"dict1 = {}\n",
"for n in range(2, sheet.max_row+1):\n",
" if sheet.cell(n,1).value is not None:\n",
" code = int(sheet.cell(n, 1).value) \n",
" list1.append(str(code)) \n",
"\n",
"\n",
"items = ['体重','肺活量','握力','坐位体前屈','纵跳','俯卧撑','一分钟仰卧起坐','单脚站立','选择反应时','台阶指数']\n",
"filename = 'data/result_杨庙2308.json'\n",
"with open(filename,'r') as fl:\n",
" dict1 = json.load(fl) \n",
"for item in list1:\n",
" if item not in dict1.keys():\n",
" print(item)"
]
},
{
"cell_type": "code",
"execution_count": 44,
"id": "a74b5034-9613-49ca-ba65-c82a443b143b",
"metadata": {
"execution": {
"iopub.execute_input": "2023-10-10T11:34:15.953655Z",
"iopub.status.busy": "2023-10-10T11:34:15.953183Z",
"iopub.status.idle": "2023-10-10T11:34:16.028478Z",
"shell.execute_reply": "2023-10-10T11:34:16.028017Z",
"shell.execute_reply.started": "2023-10-10T11:34:15.953618Z"
},
"tags": []
},
"outputs": [],
"source": [
"import json\n",
"import openpyxl\n",
"\n",
"list1 = []\n",
"\n",
"wb = openpyxl.load_workbook('data/杨庙测试2023年8月报告明细表.xlsx')\n",
"sheet = wb.active\n",
"items = ['bmi','lung','grip','flexion','balance','reaction']\n",
"dict1 = {}\n",
"for n in range(2, sheet.max_row+1):\n",
" if sheet.cell(n,1).value is not None:\n",
" code = int(sheet.cell(n, 1).value) \n",
" if str(code) not in list1:\n",
" list1.append(str(code))\n",
" else:\n",
" print(code)\n",
"\n",
"\n",
"items = ['体重','肺活量','握力','坐位体前屈','纵跳','俯卧撑','一分钟仰卧起坐','单脚站立','选择反应时','台阶指数']\n",
"filename = 'data/result_杨庙2308.json'\n",
"with open(filename,'r') as fl:\n",
" dict1 = json.load(fl) \n",
"for item in list1:\n",
" if item not in dict1.keys():\n",
" print(item)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "22e1e0cf-5620-47d4-8034-03149fcd0b00",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
+56 -56
View File
@@ -1505,15 +1505,15 @@
},
{
"cell_type": "code",
"execution_count": 123,
"execution_count": 130,
"id": "25283932-c03a-4a34-a59d-314fc64d8fbd",
"metadata": {
"execution": {
"iopub.execute_input": "2023-10-09T10:22:43.137273Z",
"iopub.status.busy": "2023-10-09T10:22:43.136815Z",
"iopub.status.idle": "2023-10-09T10:22:43.957465Z",
"shell.execute_reply": "2023-10-09T10:22:43.957002Z",
"shell.execute_reply.started": "2023-10-09T10:22:43.137237Z"
"iopub.execute_input": "2023-10-10T12:39:27.543756Z",
"iopub.status.busy": "2023-10-10T12:39:27.543268Z",
"iopub.status.idle": "2023-10-10T12:39:28.398000Z",
"shell.execute_reply": "2023-10-10T12:39:28.397533Z",
"shell.execute_reply.started": "2023-10-10T12:39:27.543691Z"
},
"tags": []
},
@@ -1600,15 +1600,15 @@
},
{
"cell_type": "code",
"execution_count": 126,
"execution_count": 131,
"id": "e26b88fc-c75b-4c1e-82ea-5017370afa9b",
"metadata": {
"execution": {
"iopub.execute_input": "2023-10-09T10:23:43.811222Z",
"iopub.status.busy": "2023-10-09T10:23:43.811009Z",
"iopub.status.idle": "2023-10-09T10:23:44.131830Z",
"shell.execute_reply": "2023-10-09T10:23:44.131363Z",
"shell.execute_reply.started": "2023-10-09T10:23:43.811207Z"
"iopub.execute_input": "2023-10-10T12:41:27.569636Z",
"iopub.status.busy": "2023-10-10T12:41:27.569374Z",
"iopub.status.idle": "2023-10-10T12:41:27.782945Z",
"shell.execute_reply": "2023-10-10T12:41:27.782483Z",
"shell.execute_reply.started": "2023-10-10T12:41:27.569618Z"
},
"tags": []
},
@@ -1617,8 +1617,8 @@
"name": "stdout",
"output_type": "stream",
"text": [
"3734\n",
"3734\n"
"4285\n",
"4285\n"
]
}
],
@@ -1641,7 +1641,7 @@
"with open(filename,'r') as fl:\n",
" dict1 = json.load(fl) \n",
"\n",
"filename = 'data/places_result_20231009.csv'\n",
"filename = 'data/places_result_20231010.csv'\n",
"with open(filename,'r',newline='') as csv_file:\n",
" fl = csv.reader(csv_file,delimiter=',')\n",
" header = next(fl) \n",
@@ -1680,15 +1680,15 @@
},
{
"cell_type": "code",
"execution_count": 127,
"execution_count": 132,
"id": "0a6ea33d-c112-4ed8-9366-3376e55a5731",
"metadata": {
"execution": {
"iopub.execute_input": "2023-10-09T10:24:01.741956Z",
"iopub.status.busy": "2023-10-09T10:24:01.741745Z",
"iopub.status.idle": "2023-10-09T10:24:02.865227Z",
"shell.execute_reply": "2023-10-09T10:24:02.864718Z",
"shell.execute_reply.started": "2023-10-09T10:24:01.741941Z"
"iopub.execute_input": "2023-10-10T12:42:03.028266Z",
"iopub.status.busy": "2023-10-10T12:42:03.028052Z",
"iopub.status.idle": "2023-10-10T12:42:04.256630Z",
"shell.execute_reply": "2023-10-10T12:42:04.256048Z",
"shell.execute_reply.started": "2023-10-10T12:42:03.028251Z"
},
"tags": []
},
@@ -1724,7 +1724,7 @@
" else:\n",
" list2.append('') \n",
" list1.append(list2)\n",
"filename = 'data/天津石化体测情况(截至20231009).xlsx'\n",
"filename = 'data/天津石化体测情况(截至20231010).xlsx'\n",
"wb = openpyxl.Workbook()\n",
"sheet = wb.active\n",
"sheet.append(title)\n",
@@ -1744,15 +1744,15 @@
},
{
"cell_type": "code",
"execution_count": 128,
"execution_count": 133,
"id": "589a5d44-605d-41a1-a981-7ec7258305ed",
"metadata": {
"execution": {
"iopub.execute_input": "2023-10-09T10:24:24.064948Z",
"iopub.status.busy": "2023-10-09T10:24:24.064737Z",
"iopub.status.idle": "2023-10-09T10:24:24.154113Z",
"shell.execute_reply": "2023-10-09T10:24:24.153633Z",
"shell.execute_reply.started": "2023-10-09T10:24:24.064934Z"
"iopub.execute_input": "2023-10-10T12:42:09.998748Z",
"iopub.status.busy": "2023-10-10T12:42:09.998539Z",
"iopub.status.idle": "2023-10-10T12:42:10.041458Z",
"shell.execute_reply": "2023-10-10T12:42:10.040968Z",
"shell.execute_reply.started": "2023-10-10T12:42:09.998725Z"
},
"tags": []
},
@@ -1789,7 +1789,7 @@
" list2 = [k,v['人数']]\n",
" list1.append(list2)\n",
"\n",
"filename = 'data/天津部门未测试情况(截至20231009).xlsx'\n",
"filename = 'data/天津部门未测试情况(截至20231010).xlsx'\n",
"wb = openpyxl.Workbook()\n",
"sheet = wb.active\n",
"sheet.append(title)\n",
@@ -1864,15 +1864,15 @@
},
{
"cell_type": "code",
"execution_count": 129,
"execution_count": 134,
"id": "e47c361d-a047-4932-b24e-fdcf65cb8a73",
"metadata": {
"execution": {
"iopub.execute_input": "2023-10-09T10:24:59.225268Z",
"iopub.status.busy": "2023-10-09T10:24:59.224878Z",
"iopub.status.idle": "2023-10-09T10:24:59.477252Z",
"shell.execute_reply": "2023-10-09T10:24:59.476787Z",
"shell.execute_reply.started": "2023-10-09T10:24:59.225236Z"
"iopub.execute_input": "2023-10-10T12:51:09.048918Z",
"iopub.status.busy": "2023-10-10T12:51:09.048454Z",
"iopub.status.idle": "2023-10-10T12:51:09.451615Z",
"shell.execute_reply": "2023-10-10T12:51:09.451038Z",
"shell.execute_reply.started": "2023-10-10T12:51:09.048881Z"
},
"tags": []
},
@@ -1881,26 +1881,26 @@
"name": "stdout",
"output_type": "stream",
"text": [
"党委党校(培训中心)未测试人员名单(截至20231009)生产成功!\n",
"研究院未测试人员名单(截至20231009)生产成功!\n",
"原油储运部未测试人员名单(截至20231009)生产成功!\n",
"烯烃部未测试人员名单(截至20231009)生产成功!\n",
"化验计量部未测试人员名单(截至20231009)生产成功!\n",
"水务部未测试人员名单(截至20231009)生产成功!\n",
"消防支队未测试人员名单(截至20231009)生产成功!\n",
"公司机关未测试人员名单(截至20231009)生产成功!\n",
"聚醚部未测试人员名单(截至20231009)生产成功!\n",
"装备研究院未测试人员名单(截至20231009)生产成功!\n",
"电仪部未测试人员名单(截至20231009)生产成功!\n",
"行政事务中心未测试人员名单(截至20231009)生产成功!\n",
"运输销售部未测试人员名单(截至20231009)生产成功!\n",
"南港乙烯项目管理部未测试人员名单(截至20231009)生产成功!\n",
"热电部未测试人员名单(截至20231009)生产成功!\n",
"化工部未测试人员名单(截至20231009)生产成功!\n",
"南港烯烃部未测试人员名单(截至20231009)生产成功!\n",
"信息档案管理中心未测试人员名单(截至20231009)生产成功!\n",
"物资采购中心未测试人员名单(截至20231009)生产成功!\n",
"炼油部未测试人员名单(截至20231009)生产成功!\n"
"党委党校(培训中心)未测试人员名单(截至20231010)生产成功!\n",
"研究院未测试人员名单(截至20231010)生产成功!\n",
"原油储运部未测试人员名单(截至20231010)生产成功!\n",
"烯烃部未测试人员名单(截至20231010)生产成功!\n",
"化验计量部未测试人员名单(截至20231010)生产成功!\n",
"水务部未测试人员名单(截至20231010)生产成功!\n",
"消防支队未测试人员名单(截至20231010)生产成功!\n",
"公司机关未测试人员名单(截至20231010)生产成功!\n",
"装备研究院未测试人员名单(截至20231010)生产成功!\n",
"聚醚部未测试人员名单(截至20231010)生产成功!\n",
"电仪部未测试人员名单(截至20231010)生产成功!\n",
"运输销售部未测试人员名单(截至20231010)生产成功!\n",
"行政事务中心未测试人员名单(截至20231010)生产成功!\n",
"南港乙烯项目管理部未测试人员名单(截至20231010)生产成功!\n",
"热电部未测试人员名单(截至20231010)生产成功!\n",
"化工部未测试人员名单(截至20231010)生产成功!\n",
"南港烯烃部未测试人员名单(截至20231010)生产成功!\n",
"信息档案管理中心未测试人员名单(截至20231010)生产成功!\n",
"物资采购中心未测试人员名单(截至20231010)生产成功!\n",
"炼油部未测试人员名单(截至20231010)生产成功!\n"
]
}
],
@@ -1914,7 +1914,7 @@
"unit = set()\n",
"for k, v in dict1.items():\n",
" unit.add(v['unit'])\n",
"rq = '20231009'\n",
"rq = '20231010'\n",
"filename = 'data/天津石化人员名单2023.json'\n",
"with open(filename,'r') as fl:\n",
" dict2 = json.load(fl)\n",