--- 소상공인데이터_코드/소상공인데이터/main_cluster.py
+++ 소상공인데이터_코드/소상공인데이터/cluster_counts.py
No changes |
--- 소상공인데이터_코드/소상공인데이터/main.py
+++ 소상공인데이터_코드/소상공인데이터/get_survival_rate.py
... | ... | @@ -10,9 +10,8 @@ |
10 | 10 |
return filtered |
11 | 11 |
|
12 | 12 |
|
13 |
-def show(starting_year, ending_year, city='영천시', extrafilter=None): |
|
13 |
+def get_survival_rate(starting_year, ending_year, city='영천시', extrafilter=None): |
|
14 | 14 |
''' |
15 |
- |
|
16 | 15 |
:param starting_year: |
17 | 16 |
:param ending_year: |
18 | 17 |
:param city: |
... | ... | @@ -59,7 +58,7 @@ |
59 | 58 |
print('경북', gb) |
60 | 59 |
|
61 | 60 |
if len(df_ycity_survive[df_ycity_survive['위도'] > 0]): |
62 |
- print('영천', yc) |
|
61 |
+ print(city, yc) |
|
63 | 62 |
|
64 | 63 |
return gb, yc |
65 | 64 |
|
... | ... | @@ -106,7 +105,7 @@ |
106 | 105 |
|
107 | 106 |
for j, year in enumerate([ df_2020, df_2021, df_2022]): |
108 | 107 |
print("전체") |
109 |
- show(df_2019, year) |
|
108 |
+ get_survival_rate(df_2019, year, '상주시') |
|
110 | 109 |
# print("편의점") |
111 | 110 |
# show(df_2019, year, '영천시', extra_filter) |
112 | 111 |
# print("편의점X") |
... | ... | @@ -118,7 +117,7 @@ |
118 | 117 |
exfil = [['상권업종대분류명', '소매', True], |
119 | 118 |
['상권업종중분류명', emd, True], |
120 | 119 |
['행정동명', '서부동', True]] |
121 |
- gb, yc = show(df_2019, year, '영천시', exfil) |
|
120 |
+ gb, yc = get_survival_rate(df_2019, year, '상주시', exfil) |
|
122 | 121 |
csv_out[i] = yc |
123 | 122 |
csv_out = pd.DataFrame(csv_out, index=sector) |
124 | 123 |
csv_out_out = pd.concat((csv_out_out, csv_out), axis=1) |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?