diff --git a/dags/business/business/community/estate_charge_ranking.py b/dags/business/business/community/estate_charge_ranking.py index 2927cf8..5e50b2e 100644 --- a/dags/business/business/community/estate_charge_ranking.py +++ b/dags/business/business/community/estate_charge_ranking.py @@ -16,7 +16,7 @@ es206_client = ElasticSearchClient(host='192.168.0.206') index_name = "community_summary" path = "/opt/airflow/dags/repo/dags/business/business/community/data" -nextcloud_aim_file_path = '共享/财力评级/物业费等级分布图' +nextcloud_aim_file_path = '共享/财力评级/物业费等级图' save_path_prefix = "/home/airflow/data/community" save_png_path = save_path_prefix + "/estate_charge_ranking" @@ -119,8 +119,9 @@ def save_png(city=None): """ 生成财力评级图表 """ - sql = "select id, city, region, name, consumption_rating from community_summary where city='" + city + "'" - community_city = es206_client.scan_by_sql_to_data_frame(sql) + sql = "select id, city, region, name, estate_charge_ranking, estate_charge from community_summary where city='" + city + "'" + community_summary_df = es206_client.scan_by_sql_to_data_frame(sql) + community_city = filter_min_max(city, community_summary_df).copy() plt.subplot(2, 1, 1) community_city['estate_charge_ranking'].hist(bins=100) plt.xlabel('estate_charge_ranking')