Bladeren bron

mvp: 城市调整

Signed-off-by: binren <zhangbr@elab-plus.com>
binren 5 jaren geleden
bovenliggende
commit
fbc9196a85
1 gewijzigde bestanden met toevoegingen van 9 en 9 verwijderingen
  1. 9 9
      mvp.py

+ 9 - 9
mvp.py

@@ -372,8 +372,8 @@ class Mvp:
             城市 年龄 人群分类 模块名称 分数
         :return:
         """
-        import json
-        print(json.dumps(scores, ensure_ascii=False))
+        # import json
+        # print(json.dumps(scores, ensure_ascii=False))
         modules = self.module_scores[crowd]
         result = []
         for key in modules.keys():
@@ -496,25 +496,25 @@ class Mvp:
             print('获取所有case的数据...')
             # for city in self.citys:
             for cy in self.city_list:
-                for age in self.age_list:
+                for age_1 in self.age_list:
                     for crowd_type in self.crowd:
-                        if age == '85-89年生' and cy == '上海市':
+                        if age_1 == '85-89年生' and cy == '上海市':
                             print('上海市85后数据导入人工值,无需计算...')
                             pass
                         else:
                             # print(' {}{}'.format(city, age))
                             # people_uuids = self.get_people_uuid_by_type(crowd_type)
-                            people_uuids = self.people_filter(cy, age, crowd)
+                            people_uuids = self.people_filter(cy, age_1, crowd)
                             behavior_data = None
                             if len(people_uuids) > 0:
-                                print('{}-{}-{}'.format(cy, age, crowd_type))
-                                datas = self.behavior_tag_init(cy, age, people_uuids)
+                                print('{}-{}-{}'.format(cy, age_1, crowd_type))
+                                datas = self.behavior_tag_init(cy, age_1, people_uuids)
                                 data_start.append(datas)
-                                all_data, behavior_data_1 = self.calculation_standard_score(datas, cy, age, crowd_type)
+                                all_data, behavior_data_1 = self.calculation_standard_score(datas, cy, age_1, crowd_type)
                                 result.append(all_data)
                                 behavior_data = behavior_data_1
                             if behavior_data:
-                                module_scores.extend(self.module_score(crowd_type, cy, age, behavior_data))
+                                module_scores.extend(self.module_score(crowd_type, cy, age_1, behavior_data))
         # data_list = []
         # for e in data_start:
         #     for key in e.keys():