diff --git a/体测单位/农工党延庆支部.ipynb b/体测单位/农工党延庆支部.ipynb index 2985206..4dbe9d1 100644 --- a/体测单位/农工党延庆支部.ipynb +++ b/体测单位/农工党延庆支部.ipynb @@ -53,12 +53,27 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "id": "dc0a78bb-ce82-4f6d-ba53-8bd9655f39af", "metadata": { + "execution": { + "iopub.execute_input": "2023-11-28T08:21:51.973825Z", + "iopub.status.busy": "2023-11-28T08:21:51.973366Z", + "iopub.status.idle": "2023-11-28T08:21:52.110628Z", + "shell.execute_reply": "2023-11-28T08:21:52.110182Z", + "shell.execute_reply.started": "2023-11-28T08:21:51.973788Z" + }, "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "26\n" + ] + } + ], "source": [ "import json\n", "import csv\n", @@ -72,7 +87,7 @@ "\n", "\n", "list1 = []\n", - "filename = 'data/Survey_20231121.csv'\n", + "filename = 'data/Survey_20231128.csv'\n", "with open(filename,'r',newline='') as csv_file:\n", " fl = csv.reader(csv_file,delimiter=',')\n", " header = next(fl) \n", @@ -116,12 +131,33 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "id": "5b646b5d-c4f6-4d37-9510-30fcbef44855", "metadata": { + "execution": { + "iopub.execute_input": "2023-11-28T08:22:06.586472Z", + "iopub.status.busy": "2023-11-28T08:22:06.586205Z", + "iopub.status.idle": "2023-11-28T08:22:06.590979Z", + "shell.execute_reply": "2023-11-28T08:22:06.590514Z", + "shell.execute_reply.started": "2023-11-28T08:22:06.586440Z" + }, "tags": [] }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "13501017366 程大庆\n", + "13910270600 袁正东\n", + "13501017663 李志玖\n", + "13901363461 陈学军\n", + "13911795921 祁向东\n", + "18600419150 鲁兴隆\n", + "17316020604 刘凡\n" + ] + } + ], "source": [ "import json\n", "import csv\n", @@ -133,7 +169,7 @@ "\n", "\n", "list1 = []\n", - "filename = 'data/Survey_20231121.csv'\n", + "filename = 'data/Survey_20231128.csv'\n", "with open(filename,'r',newline='') as csv_file:\n", " fl = csv.reader(csv_file,delimiter=',')\n", " header = next(fl) \n", diff --git a/体测单位/北海炼化.ipynb b/体测单位/北海炼化.ipynb index 596ad44..0eb2d3b 100644 --- a/体测单位/北海炼化.ipynb +++ b/体测单位/北海炼化.ipynb @@ -1183,9 +1183,16 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 133, "id": "c0128f52-8697-4258-aba0-89a522fb9cc0", "metadata": { + "execution": { + "iopub.execute_input": "2023-11-29T10:28:13.359331Z", + "iopub.status.busy": "2023-11-29T10:28:13.359037Z", + "iopub.status.idle": "2023-11-29T10:28:13.575720Z", + "shell.execute_reply": "2023-11-29T10:28:13.575244Z", + "shell.execute_reply.started": "2023-11-29T10:28:13.359308Z" + }, "tags": [] }, "outputs": [], @@ -1864,15 +1871,15 @@ }, { "cell_type": "code", - "execution_count": 132, + "execution_count": 135, "id": "2e5ae18e-c153-4cdf-825e-f969080eea16", "metadata": { "execution": { - "iopub.execute_input": "2023-11-28T03:01:47.337951Z", - "iopub.status.busy": "2023-11-28T03:01:47.337489Z", - "iopub.status.idle": "2023-11-28T03:01:47.391606Z", - "shell.execute_reply": "2023-11-28T03:01:47.390188Z", - "shell.execute_reply.started": "2023-11-28T03:01:47.337914Z" + "iopub.execute_input": "2023-11-29T10:35:01.457310Z", + "iopub.status.busy": "2023-11-29T10:35:01.456843Z", + "iopub.status.idle": "2023-11-29T10:35:01.509548Z", + "shell.execute_reply": "2023-11-29T10:35:01.508047Z", + "shell.execute_reply.started": "2023-11-29T10:35:01.457255Z" }, "tags": [] }, @@ -1881,10 +1888,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "719\n", - "506 陆进生\n", - "617 张升坚\n", - "566 高越\n" + "719\n" ] } ], diff --git a/体测单位/天津石化.ipynb b/体测单位/天津石化.ipynb index b473935..75f41c1 100644 --- a/体测单位/天津石化.ipynb +++ b/体测单位/天津石化.ipynb @@ -4,8 +4,8 @@ "cell_type": "markdown", "id": "e764be85-0ddf-4055-abd6-de2990e75db8", "metadata": { - "jp-MarkdownHeadingCollapsed": true, - "tags": [] + "tags": [], + "toc-hr-collapsed": true }, "source": [ "# 第一次体测" @@ -2369,28 +2369,12 @@ }, { "cell_type": "code", - "execution_count": 92, + "execution_count": null, "id": "91fbc553-da7c-4c1e-bcf3-944dc59204b6", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-14T06:24:29.017502Z", - "iopub.status.busy": "2023-11-14T06:24:29.016683Z", - "iopub.status.idle": "2023-11-14T06:24:29.082247Z", - "shell.execute_reply": "2023-11-14T06:24:29.081478Z", - "shell.execute_reply.started": "2023-11-14T06:24:29.017425Z" - }, "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[]\n", - "ok\n" - ] - } - ], + "outputs": [], "source": [ "import os,sys,shutil\n", "import json\n", @@ -2550,28 +2534,12 @@ }, { "cell_type": "code", - "execution_count": 279, + "execution_count": null, "id": "35d1738a-1ec1-4764-bcbd-c1333fac6bfd", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-16T10:17:00.510134Z", - "iopub.status.busy": "2023-11-16T10:17:00.509670Z", - "iopub.status.idle": "2023-11-16T10:17:00.551276Z", - "shell.execute_reply": "2023-11-16T10:17:00.549886Z", - "shell.execute_reply.started": "2023-11-16T10:17:00.510096Z" - }, "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "['12167', 'ptv_022_sh', '', '边晓睿', '3145586', '{\"gender\":\"f\",\"psy1\":4,\"psy2\":4,\"psy3\":4,\"psy4\":4,\"psy5\":4,\"psy6\":4,\"psy7\":3,\"psy8\":4,\"psy9\":4,\"psy10\":4,\"psy11\":4,\"psy12\":3,\"psy13\":3,\"psy14\":2,\"psy15\":4,\"psy16\":3,\"psy17\":4,\"psy18\":3,\"psy19\":4,\"psy20\":4,\"psy21\":4,\"psy22\":4,\"psy23\":4,\"psy24\":4,\"psy25\":4,\"psy26\":4,\"psy27\":0,\"psy28\":0,\"psy29\":0,\"psy30\":1,\"psy31\":1,\"psy32\":0,\"psy33\":1,\"psy34\":0,\"psy35\":1,\"psy36\":1,\"psy37\":1,\"psy38\":0,\"psy39\":0,\"psy40\":0,\"psy41\":5,\"psy42\":5,\"psy43\":5,\"psy44\":5,\"tcm1\":1,\"tcm2\":4,\"tcm3\":3,\"tcm4\":2,\"tcm5\":3,\"tcm6\":4,\"tcm7\":2,\"tcm8\":5,\"tcm9\":2,\"tcm10\":2,\"tcm11\":4,\"tcm12\":1,\"tcm13\":4,\"tcm14\":1,\"tcm15\":5,\"tcm16\":2,\"tcm17\":1,\"tcm18\":4,\"tcm19\":3,\"tcm20\":1,\"tcm21\":1,\"tcm22\":3,\"tcm23\":1,\"tcm24\":4,\"tcm25\":2,\"tcm26\":5,\"tcm27\":3,\"tcm28\":5,\"tcm29\":4,\"tcm30\":2,\"tcm31\":5,\"tcm32\":1,\"tcm33\":1,\"tcm34\":1,\"tcm35\":1,\"tcm36\":5,\"tcm37\":3,\"tcm38\":2,\"tcm39\":5,\"tcm40\":2,\"tcm41\":1,\"tcm42\":3,\"tcm43\":1,\"tcm44\":3,\"tcm45\":1,\"tcm46\":5,\"tcm47\":5,\"tcm48\":2,\"tcm49\":2,\"tcm50\":3,\"tcm51\":2,\"tcm52\":2,\"tcm53\":1,\"tcm54\":3,\"tcm55\":2,\"tcm56\":2,\"tcm57\":2,\"tcm58\":1,\"tcm59\":1,\"tcm60\":3,\"spine1\":1,\"spine2\":1,\"spine3\":2,\"spine4\":1,\"spine5\":2,\"spine6\":2,\"spine7\":2,\"spine8\":2,\"spine9\":1,\"spine10\":2,\"spine11\":1,\"spine12\":2,\"spine13\":2,\"spine14\":2,\"spine15\":1,\"spine16\":1,\"spine17\":2,\"spine18\":2,\"spine19\":2,\"spine20\":2,\"spine21\":1,\"spine23\":2,\"spine24\":1,\"spine25\":2,\"spine26\":2}', '2023-11-13 14:25:18']\n", - "['12168', 'ptv_022_sh', '', '孙海红', '1733738', '{\"gender\":\"f\",\"psy1\":3,\"psy2\":3,\"psy3\":2,\"psy4\":3,\"psy5\":3,\"psy6\":4,\"psy7\":3,\"psy8\":3,\"psy9\":4,\"psy10\":3,\"psy11\":4,\"psy12\":4,\"psy13\":3,\"psy14\":3,\"psy15\":3,\"psy16\":4,\"psy17\":4,\"psy18\":4,\"psy19\":4,\"psy20\":4,\"psy21\":3,\"psy22\":4,\"psy23\":4,\"psy24\":4,\"psy25\":4,\"psy26\":4,\"psy27\":0,\"psy28\":0,\"psy29\":0,\"psy30\":0,\"psy31\":0,\"psy32\":0,\"psy33\":1,\"psy34\":1,\"psy35\":0,\"psy36\":0,\"psy37\":0,\"psy38\":0,\"psy39\":0,\"psy40\":1,\"psy41\":4,\"psy42\":4,\"psy43\":4,\"psy44\":4,\"tcm1\":2,\"tcm2\":4,\"tcm3\":4,\"tcm4\":3,\"tcm5\":1,\"tcm6\":3,\"tcm7\":1,\"tcm8\":4,\"tcm9\":1,\"tcm10\":1,\"tcm11\":4,\"tcm12\":3,\"tcm13\":4,\"tcm14\":1,\"tcm15\":3,\"tcm16\":3,\"tcm17\":3,\"tcm18\":3,\"tcm19\":3,\"tcm20\":3,\"tcm21\":2,\"tcm22\":2,\"tcm23\":2,\"tcm24\":1,\"tcm25\":1,\"tcm26\":1,\"tcm27\":3,\"tcm28\":1,\"tcm29\":3,\"tcm30\":2,\"tcm31\":2,\"tcm32\":2,\"tcm33\":2,\"tcm34\":3,\"tcm35\":5,\"tcm36\":3,\"tcm37\":2,\"tcm38\":2,\"tcm39\":2,\"tcm40\":1,\"tcm41\":2,\"tcm42\":1,\"tcm43\":1,\"tcm44\":3,\"tcm45\":3,\"tcm46\":3,\"tcm47\":2,\"tcm49\":2,\"tcm50\":2,\"tcm48\":2,\"tcm51\":2,\"tcm52\":2,\"tcm53\":3,\"tcm54\":3,\"tcm55\":1,\"tcm56\":1,\"tcm57\":1,\"tcm58\":2,\"tcm59\":1,\"tcm60\":5,\"spine1\":2,\"spine2\":1,\"spine3\":1,\"spine4\":1,\"spine5\":2,\"spine6\":2,\"spine7\":2,\"spine8\":2,\"spine9\":1,\"spine10\":2,\"spine11\":2,\"spine12\":2,\"spine13\":2,\"spine14\":2,\"spine15\":2,\"spine16\":2,\"spine17\":2,\"spine18\":2,\"spine19\":1,\"spine20\":2,\"spine21\":2,\"spine23\":2,\"spine24\":1,\"spine25\":1,\"spine26\":2}', '2023-11-13 14:32:18']\n" - ] - } - ], + "outputs": [], "source": [ "import json\n", "import csv\n", @@ -2660,28 +2628,12 @@ }, { "cell_type": "code", - "execution_count": 280, + "execution_count": null, "id": "cc9e1717-f445-49a9-a770-c103da603434", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-16T10:18:15.998767Z", - "iopub.status.busy": "2023-11-16T10:18:15.998303Z", - "iopub.status.idle": "2023-11-16T10:18:16.660154Z", - "shell.execute_reply": "2023-11-16T10:18:16.658708Z", - "shell.execute_reply.started": "2023-11-16T10:18:15.998730Z" - }, "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "3145586 边晓睿 {\"errmsg\":\"ok\"}\n", - "1733738 孙海红 {\"errmsg\":\"ok\"}\n" - ] - } - ], + "outputs": [], "source": [ "import requests\n", "import json\n", @@ -2751,7 +2703,6 @@ "shell.execute_reply": "2023-10-25T02:50:57.004773Z", "shell.execute_reply.started": "2023-10-25T02:50:56.997463Z" }, - "jp-MarkdownHeadingCollapsed": true, "tags": [] }, "source": [ @@ -2848,31 +2799,12 @@ }, { "cell_type": "code", - "execution_count": 87, + "execution_count": null, "id": "006afc6c-2b1f-4edf-be1b-5f60e2029ee8", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-14T05:31:33.869705Z", - "iopub.status.busy": "2023-11-14T05:31:33.869187Z", - "iopub.status.idle": "2023-11-14T05:31:33.963951Z", - "shell.execute_reply": "2023-11-14T05:31:33.963038Z", - "shell.execute_reply.started": "2023-11-14T05:31:33.869655Z" - }, "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "0~255分人数:1641人,男性:1334人,女性:307人\n", - "256~332分人数:1544人,男性:941人,女性:603人\n", - "333~367分人数:354人,男性:191人,女性:163人\n", - "368~500分人数:118人,男性:39人,女性:79人\n", - "3657\n" - ] - } - ], + "outputs": [], "source": [ "import json\n", "\n", @@ -2915,34 +2847,12 @@ }, { "cell_type": "code", - "execution_count": 88, + "execution_count": null, "id": "949e4c3c-023d-44a4-b99e-c5460da61161", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-14T05:32:00.827469Z", - "iopub.status.busy": "2023-11-14T05:32:00.826734Z", - "iopub.status.idle": "2023-11-14T05:32:00.923421Z", - "shell.execute_reply": "2023-11-14T05:32:00.922591Z", - "shell.execute_reply.started": "2023-11-14T05:32:00.827429Z" - }, "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "20~24岁平均成绩:2.45分,人数:581人,男性:384人\n", - "25~29岁平均成绩:2.56分,人数:369人,男性:252人\n", - "30~34岁平均成绩:2.56分,人数:211人,男性:144人\n", - "35~39岁平均成绩:2.67分,人数:414人,男性:281人\n", - "40~44岁平均成绩:2.7分,人数:318人,男性:188人\n", - "45~49岁平均成绩:2.71分,人数:563人,男性:310人\n", - "50~54岁平均成绩:2.63分,人数:849人,男性:594人\n", - "55~69岁平均成绩:2.46分,人数:352人,男性:352人\n" - ] - } - ], + "outputs": [], "source": [ "nld = [[20,24],[25,29],[30,34],[35,39],[40,44],[45,49],[50,54],[55,69]]\n", "\n", @@ -2975,34 +2885,12 @@ }, { "cell_type": "code", - "execution_count": 86, + "execution_count": null, "id": "721977d3-5816-4bf6-82fc-26fd170e5454", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-14T05:29:45.231085Z", - "iopub.status.busy": "2023-11-14T05:29:45.230706Z", - "iopub.status.idle": "2023-11-14T05:29:45.291777Z", - "shell.execute_reply": "2023-11-14T05:29:45.290397Z", - "shell.execute_reply.started": "2023-11-14T05:29:45.231052Z" - }, "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "20~24岁平均成绩:2.42分,人数:322人\n", - "25~29岁平均成绩:2.54分,人数:120人\n", - "30~34岁平均成绩:2.61分,人数:21人\n", - "35~39岁平均成绩:2.23分,人数:47人\n", - "40~44岁平均成绩:2.46分,人数:57人\n", - "45~49岁平均成绩:2.4分,人数:156人\n", - "50~54岁平均成绩:2.39分,人数:335人\n", - "55~80岁平均成绩:2.5分,人数:225人\n" - ] - } - ], + "outputs": [], "source": [ "import json\n", "\n", @@ -3075,29 +2963,12 @@ }, { "cell_type": "code", - "execution_count": 90, + "execution_count": null, "id": "7155f2c2-0719-4558-aa3b-629fb70194d6", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-14T05:32:38.731026Z", - "iopub.status.busy": "2023-11-14T05:32:38.730664Z", - "iopub.status.idle": "2023-11-14T05:32:38.802327Z", - "shell.execute_reply": "2023-11-14T05:32:38.801563Z", - "shell.execute_reply.started": "2023-11-14T05:32:38.730994Z" - }, "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "平均成绩:2.4823分,男性:2505人\n", - "平均成绩:2.8604分,女性:1152人\n", - "平均成绩:2.6014分,总体:3657人\n" - ] - } - ], + "outputs": [], "source": [ "import json\n", "\n", @@ -3232,36 +3103,12 @@ }, { "cell_type": "code", - "execution_count": 91, + "execution_count": null, "id": "5ed284c6-1a1c-43ab-92a8-b3c411cd77a1", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-14T05:34:30.789468Z", - "iopub.status.busy": "2023-11-14T05:34:30.789112Z", - "iopub.status.idle": "2023-11-14T05:34:30.903912Z", - "shell.execute_reply": "2023-11-14T05:34:30.903118Z", - "shell.execute_reply.started": "2023-11-14T05:34:30.789436Z" - }, "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "BMI 3.54 3634\n", - "肺活量 3.37 3569\n", - "握力 1.29 3592\n", - "坐位体前屈 2.85 3142\n", - "纵跳 2.0 3198\n", - "俯卧撑 2.57 2082\n", - "一分钟仰卧起坐 3.94 757\n", - "单脚站立 2.01 3523\n", - "选择反应时 2.97 3613\n", - "台阶指数 2.58 1496\n" - ] - } - ], + "outputs": [], "source": [ "with open(filename,'r') as fl:\n", " dict1 = json.load(fl) \n", @@ -3452,27 +3299,12 @@ }, { "cell_type": "code", - "execution_count": 80, + "execution_count": null, "id": "518a1e40-d383-4d78-a4ea-224ddab49b79", "metadata": { - "execution": { - "iopub.execute_input": "2023-11-14T04:54:34.744376Z", - "iopub.status.busy": "2023-11-14T04:54:34.744069Z", - "iopub.status.idle": "2023-11-14T04:54:36.013106Z", - "shell.execute_reply": "2023-11-14T04:54:36.012373Z", - "shell.execute_reply.started": "2023-11-14T04:54:34.744349Z" - }, "tags": [] }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "3657\n" - ] - } - ], + "outputs": [], "source": [ "import json\n", "import openpyxl\n", @@ -3494,6 +3326,7 @@ " daoban = sheet.cell(n, 6).value\n", " if str(code) in dict1.keys() and daoban == '倒班':\n", " dict2[str(code)] = dict1[str(code)]\n", + "print(len(dict2))\n", "filename = 'data/data_天津231017_倒班.json'\n", "with open(filename,'w') as fl:\n", " json.dump(dict2, fl) \n", @@ -3526,10 +3359,8 @@ "outputs": [], "source": [ "import json\n", - "import openpyxl\n", "\n", - "\n", - "filename = 'data/data_天津231017.json'\n", + "filename = 'data/data_天津231017_非倒班.json'\n", "with open(filename,'r') as fl:\n", " dict1 = json.load(fl)\n", "\n", @@ -3551,10 +3382,475 @@ " print(i,k,v['name'])" ] }, + { + "cell_type": "markdown", + "id": "dc51915d-7593-411c-8730-4ee9445ebd51", + "metadata": {}, + "source": [ + "### 对比倒班及非倒班人员得分" + ] + }, + { + "cell_type": "code", + "execution_count": 312, + "id": "096bb641-c000-490b-bd77-296fb0395dc8", + "metadata": { + "execution": { + "iopub.execute_input": "2023-11-28T12:54:35.962454Z", + "iopub.status.busy": "2023-11-28T12:54:35.961990Z", + "iopub.status.idle": "2023-11-28T12:54:36.084684Z", + "shell.execute_reply": "2023-11-28T12:54:36.084138Z", + "shell.execute_reply.started": "2023-11-28T12:54:35.962418Z" + }, + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "南港烯烃部 {'非倒班': [13882, 681, 5591], '倒班': [0, 0, 0]}\n", + "消防支队 {'非倒班': [1420, 72, 558], '倒班': [0, 0, 0]}\n", + "化工部 {'非倒班': [9833, 498, 3792], '倒班': [483, 24, 185]}\n", + "炼油部 {'非倒班': [12059, 548, 4459], '倒班': [13153, 643, 5046]}\n", + "电仪部 {'非倒班': [2162, 110, 885], '倒班': [4206, 212, 1744]}\n", + "物资采购中心 {'非倒班': [1736, 84, 643], '倒班': [0, 0, 0]}\n", + "化验计量部 {'非倒班': [3561, 185, 1368], '倒班': [5241, 284, 2065]}\n", + "运输销售部 {'非倒班': [3316, 188, 1341], '倒班': [203, 11, 78]}\n", + "原油储运部 {'非倒班': [2561, 125, 1002], '倒班': [949, 53, 397]}\n", + "公司机关 {'非倒班': [2364, 112, 883], '倒班': [0, 0, 0]}\n", + "南港乙烯项目管理部 {'非倒班': [325, 15, 124], '倒班': [0, 0, 0]}\n", + "党委党校(培训中心) {'非倒班': [1011, 48, 360], '倒班': [0, 0, 0]}\n", + "聚醚部 {'非倒班': [2036, 96, 744], '倒班': [263, 16, 118]}\n", + "装备研究院 {'非倒班': [1028, 48, 378], '倒班': [0, 0, 0]}\n", + "热电部 {'非倒班': [3849, 187, 1419], '倒班': [4409, 225, 1700]}\n", + "行政事务中心 {'非倒班': [851, 41, 322], '倒班': [0, 0, 0]}\n", + "烯烃部 {'非倒班': [3501, 165, 1268], '倒班': [3007, 155, 1182]}\n", + "水务部 {'非倒班': [5790, 293, 2196], '倒班': [1807, 103, 760]}\n", + "信息档案管理中心 {'非倒班': [1384, 60, 485], '倒班': [0, 0, 0]}\n", + "研究院 {'非倒班': [2225, 101, 788], '倒班': [0, 0, 0]}\n" + ] + } + ], + "source": [ + "import json\n", + "\n", + "items = ['BMI','肺活量','握力','坐位体前屈','纵跳','俯卧撑','一分钟仰卧起坐','单脚站立','选择反应时','台阶指数'] \n", + "\n", + "filename = 'data/data_天津231017_非倒班.json'\n", + "with open(filename,'r') as fl:\n", + " dict1 = json.load(fl)\n", + "\n", + "dict3 = {}\n", + "for k, v in dict1.items():\n", + " unit = v['unit']\n", + " dict3.setdefault(unit,{})\n", + " dict3[unit].setdefault('非倒班',[0,0,0])\n", + " dict3[unit].setdefault('倒班',[0,0,0])\n", + " for k1,v1 in v['fits'].items():\n", + " if k1 in items:\n", + " dict3[unit]['非倒班'][0] = dict3[unit]['非倒班'][0]+ v1['score']\n", + " dict3[unit]['非倒班'][2]+=1\n", + " dict3[unit]['非倒班'][1] +=1\n", + "filename = 'data/data_天津231017_倒班.json'\n", + "with open(filename,'r') as fl:\n", + " dict1 = json.load(fl)\n", + "\n", + "for k, v in dict1.items():\n", + " unit = v['unit']\n", + " dict3.setdefault(unit,{})\n", + " dict3[unit].setdefault('非倒班',[0,0])\n", + " dict3[unit].setdefault('倒班',[0,0])\n", + " for k1,v1 in v['fits'].items():\n", + " if k1 in items:\n", + " dict3[unit]['倒班'][0] = dict3[unit]['倒班'][0]+ v1['score']\n", + " dict3[unit]['倒班'][2] +=1\n", + " dict3[unit]['倒班'][1] +=1\n", + "\n", + "for k ,v in dict3.items():\n", + " print(k,v)" + ] + }, + { + "cell_type": "markdown", + "id": "ce2c7879-308c-45aa-aaeb-2323b3a060be", + "metadata": {}, + "source": [ + "### 划分年龄段" + ] + }, { "cell_type": "code", "execution_count": null, - "id": "54b2abad-9891-4e06-93b7-ca5c0659ea49", + "id": "c1b68d99-e8c1-455a-973f-20f4c1fd58a2", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "import json\n", + "import openpyxl\n", + "\n", + "\n", + "filename = 'data/data_天津231017.json'\n", + "with open(filename,'r') as fl:\n", + " dict1 = json.load(fl)\n", + "nld ={'20':[20,29],'30':[30,39],'40':[40,49],'50':[50,69]}\n", + "for k,v in nld.items():\n", + " age_min = v[0]\n", + " age_max = v[1]\n", + " for k1,v1 in dict1.items():\n", + " if v1['age'] >=v[0] and v1['age']<=v[1]:\n", + " dict1[k1]['nld'] = k\n", + "\n", + "filename = 'data/data_天津_nld.json' \n", + "with open(filename,'w') as fl:\n", + " json.dump(dict1, fl) \n", + " " + ] + }, + { + "cell_type": "markdown", + "id": "eb35716c-cd5a-476b-95d0-b326bfa04963", + "metadata": {}, + "source": [ + "### 上肢、下肢力量分析(男)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "6a8cfab1-c99b-4376-9ad2-4ae096dd4866", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "import json\n", + "\n", + "filename = 'data/data_天津_nld.json' \n", + "with open(filename,'r') as fl:\n", + " dict1 = json.load(fl)\n", + "\n", + "list1 = ['20','30','40','50']\n", + "shangzhi = ['握力','俯卧撑']\n", + "xiazhi = ['纵跳','闭眼单脚站立']\n", + "zongrenshu = 0\n", + "ruo = 0\n", + "for item in list1:\n", + " print(item)\n", + " renshu = 0\n", + " ruo = 0\n", + " \n", + " for k, v in dict1.items():\n", + " if v['nld'] == item and v['sex']=='男':\n", + " renshu+=1\n", + " n =0\n", + " defen = 0\n", + " for k1, v1 in v['fits'].items():\n", + " if k1 in xiazhi:\n", + " n+=1\n", + " defen =defen+v1['score']\n", + " if n>0 and (defen/n)<3:\n", + " ruo+=1\n", + " print(renshu,ruo)\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " " + ] + }, + { + "cell_type": "markdown", + "id": "6f83db87-9844-41dc-bf43-789c3367f411", + "metadata": {}, + "source": [ + "### 上肢、下肢力量分析(女)" + ] + }, + { + "cell_type": "code", + "execution_count": 295, + "id": "2cb586f9-cdf1-4b51-8900-50416b5f0ae5", + "metadata": { + "execution": { + "iopub.execute_input": "2023-11-28T11:55:13.064209Z", + "iopub.status.busy": "2023-11-28T11:55:13.063792Z", + "iopub.status.idle": "2023-11-28T11:55:13.118894Z", + "shell.execute_reply": "2023-11-28T11:55:13.118359Z", + "shell.execute_reply.started": "2023-11-28T11:55:13.064179Z" + }, + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "20\n", + "506 301\n", + "30\n", + "222 97\n", + "40\n", + "583 305\n", + "50\n", + "284 169\n" + ] + } + ], + "source": [ + "import json\n", + "\n", + "filename = 'data/data_天津_nld.json' \n", + "with open(filename,'r') as fl:\n", + " dict1 = json.load(fl)\n", + "\n", + "list1 = ['20','30','40','50']\n", + "shangzhi = ['握力']\n", + "xiazhi = ['纵跳','闭眼单脚站立']\n", + "zongrenshu = 0\n", + "ruo = 0\n", + "for item in list1:\n", + " print(item)\n", + " renshu = 0\n", + " ruo = 0\n", + " \n", + " for k, v in dict1.items():\n", + " if v['nld'] == item and v['sex']=='女':\n", + " renshu+=1\n", + " n =0\n", + " defen = 0\n", + " for k1, v1 in v['fits'].items():\n", + " if k1 in xiazhi:\n", + " n+=1\n", + " defen =defen+v1['score']\n", + " if n>0 and (defen/n)<3:\n", + " ruo+=1\n", + " print(renshu,ruo)\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "dd822864-0226-40c1-b385-cd146f6972c9", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "import json\n", + "\n", + "filename = 'data/data_天津_nld.json' \n", + "with open(filename,'r') as fl:\n", + " dict1 = json.load(fl)\n", + "\n", + "for k ,v in dict1.items():\n", + " if v['sex'] == '男' and '握力' in v['fits'].keys():\n", + " print(v['name'],v['nld'],v['fits']['握力']['mark'],v['fits']['握力']['score'])\n", + " " + ] + }, + { + "cell_type": "markdown", + "id": "1015b957-448a-4029-827f-3abc3c0e9173", + "metadata": {}, + "source": [ + "### 弱项分析(男)" + ] + }, + { + "cell_type": "code", + "execution_count": 302, + "id": "d3ea1ddb-db7a-4b4f-a23c-6951e88df2ff", + "metadata": { + "execution": { + "iopub.execute_input": "2023-11-28T12:15:45.478108Z", + "iopub.status.busy": "2023-11-28T12:15:45.477633Z", + "iopub.status.idle": "2023-11-28T12:15:45.604185Z", + "shell.execute_reply": "2023-11-28T12:15:45.603612Z", + "shell.execute_reply.started": "2023-11-28T12:15:45.478072Z" + }, + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "20\n", + "BMI 3.0\n", + "肺活量 3.65\n", + "握力 1.25\n", + "坐位体前屈 2.65\n", + "纵跳 2.29\n", + "俯卧撑 2.51\n", + "单脚站立 1.76\n", + "选择反应时 2.53\n", + "台阶指数 2.2\n", + "30\n", + "BMI 2.85\n", + "肺活量 3.44\n", + "握力 1.17\n", + "坐位体前屈 2.54\n", + "纵跳 2.57\n", + "俯卧撑 2.77\n", + "单脚站立 1.9\n", + "选择反应时 2.84\n", + "台阶指数 2.59\n", + "40\n", + "BMI 3.31\n", + "肺活量 3.13\n", + "握力 1.39\n", + "坐位体前屈 2.72\n", + "纵跳 1.83\n", + "俯卧撑 2.64\n", + "单脚站立 1.93\n", + "选择反应时 3.15\n", + "台阶指数 2.79\n", + "50\n", + "BMI 3.71\n", + "肺活量 2.99\n", + "握力 1.52\n", + "坐位体前屈 3.05\n", + "纵跳 1.18\n", + "俯卧撑 2.27\n", + "单脚站立 1.73\n", + "选择反应时 3.18\n", + "台阶指数 3.04\n" + ] + } + ], + "source": [ + "import json\n", + "\n", + "items = ['BMI','肺活量','握力','坐位体前屈','纵跳','俯卧撑','一分钟仰卧起坐','单脚站立','选择反应时','台阶指数'] \n", + "\n", + "\n", + "filename = 'data/data_天津_nld.json' \n", + "with open(filename,'r') as fl:\n", + " dict1 = json.load(fl)\n", + "\n", + "list1 = ['20','30','40','50']\n", + "\n", + "for nld in list1:\n", + " \n", + " print(nld)\n", + " for item in items:\n", + " n =0\n", + " defen = 0\n", + " for k, v in dict1.items():\n", + " \n", + " if v['nld'] == nld and v['sex']=='男' and item in v['fits'].keys():\n", + " n+=1\n", + " defen =defen+ v['fits'][item]['score']\n", + " if n>0:\n", + " print(item,round(defen/n,2)) " + ] + }, + { + "cell_type": "markdown", + "id": "727fda65-7268-44f5-b953-285c86602254", + "metadata": {}, + "source": [ + "### 弱项分析(女)" + ] + }, + { + "cell_type": "code", + "execution_count": 303, + "id": "723b50a1-60f1-4001-8b30-6f77c6a4b460", + "metadata": { + "execution": { + "iopub.execute_input": "2023-11-28T12:18:25.287183Z", + "iopub.status.busy": "2023-11-28T12:18:25.286772Z", + "iopub.status.idle": "2023-11-28T12:18:25.407362Z", + "shell.execute_reply": "2023-11-28T12:18:25.406892Z", + "shell.execute_reply.started": "2023-11-28T12:18:25.287153Z" + }, + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "20\n", + "BMI 3.82\n", + "肺活量 3.43\n", + "握力 1.38\n", + "坐位体前屈 3.08\n", + "纵跳 2.21\n", + "一分钟仰卧起坐 3.66\n", + "单脚站立 1.87\n", + "选择反应时 2.41\n", + "台阶指数 2.47\n", + "30\n", + "BMI 4.05\n", + "肺活量 3.57\n", + "握力 1.25\n", + "坐位体前屈 3.0\n", + "纵跳 2.62\n", + "一分钟仰卧起坐 4.18\n", + "单脚站立 2.22\n", + "选择反应时 2.96\n", + "台阶指数 2.92\n", + "40\n", + "BMI 4.18\n", + "肺活量 3.38\n", + "握力 1.37\n", + "坐位体前屈 3.0\n", + "纵跳 2.07\n", + "一分钟仰卧起坐 3.99\n", + "单脚站立 2.58\n", + "选择反应时 3.13\n", + "台阶指数 2.93\n", + "50\n", + "BMI 4.13\n", + "肺活量 3.22\n", + "握力 1.28\n", + "坐位体前屈 3.22\n", + "纵跳 1.48\n", + "一分钟仰卧起坐 3.71\n", + "单脚站立 2.79\n", + "选择反应时 3.4\n", + "台阶指数 3.71\n" + ] + } + ], + "source": [ + "import json\n", + "\n", + "items = ['BMI','肺活量','握力','坐位体前屈','纵跳','俯卧撑','一分钟仰卧起坐','单脚站立','选择反应时','台阶指数'] \n", + "\n", + "\n", + "filename = 'data/data_天津_nld.json' \n", + "with open(filename,'r') as fl:\n", + " dict1 = json.load(fl)\n", + "\n", + "list1 = ['20','30','40','50']\n", + "\n", + "for nld in list1:\n", + " \n", + " print(nld)\n", + " for item in items:\n", + " n =0\n", + " defen = 0\n", + " for k, v in dict1.items():\n", + " \n", + " if v['nld'] == nld and v['sex']=='女' and item in v['fits'].keys():\n", + " n+=1\n", + " defen =defen+ v['fits'][item]['score']\n", + " if n>0:\n", + " print(item,round(defen/n,2))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "62278ae0-be57-4f7c-85d6-cfb9cf61e341", "metadata": {}, "outputs": [], "source": []