윤영준 윤영준 2023-07-24
fixed wierd function and script names
@584216fc3bb94458fd04b1295971bcd29f3a0670
소상공인데이터_코드/소상공인데이터/cluster_counts.py (Renamed from 소상공인데이터_코드/소상공인데이터/main_cluster.py)
--- 소상공인데이터_코드/소상공인데이터/main_cluster.py
+++ 소상공인데이터_코드/소상공인데이터/cluster_counts.py
No changes
소상공인데이터_코드/소상공인데이터/get_survival_rate.py (Renamed from 소상공인데이터_코드/소상공인데이터/main.py)
--- 소상공인데이터_코드/소상공인데이터/main.py
+++ 소상공인데이터_코드/소상공인데이터/get_survival_rate.py
@@ -10,9 +10,8 @@
     return filtered
 
 
-def show(starting_year, ending_year, city='영천시', extrafilter=None):
+def get_survival_rate(starting_year, ending_year, city='영천시', extrafilter=None):
     '''
-
     :param starting_year:
     :param ending_year:
     :param city:
@@ -59,7 +58,7 @@
         print('경북', gb)
 
     if len(df_ycity_survive[df_ycity_survive['위도'] > 0]):
-        print('영천', yc)
+        print(city, yc)
 
     return gb, yc
 
@@ -106,7 +105,7 @@
 
 for j, year in enumerate([ df_2020, df_2021, df_2022]):
     print("전체")
-    show(df_2019, year)
+    get_survival_rate(df_2019, year, '상주시')
     # print("편의점")
     # show(df_2019, year, '영천시', extra_filter)
     # print("편의점X")
@@ -118,7 +117,7 @@
         exfil = [['상권업종대분류명', '소매', True],
                  ['상권업종중분류명', emd, True],
                  ['행정동명', '서부동', True]]
-        gb, yc = show(df_2019, year, '영천시', exfil)
+        gb, yc = get_survival_rate(df_2019, year, '상주시', exfil)
         csv_out[i] = yc
     csv_out = pd.DataFrame(csv_out, index=sector)
     csv_out_out = pd.concat((csv_out_out, csv_out), axis=1)
Add a comment
List