@@ -27,7 +27,7 @@ def download_zip_file():
2727 for recurso in r ["resources" ]:
2828 if recurso ["format" ] == "CSV" :
2929 download_url = recurso ["url" ]
30- print (
30+ log (
3131 f"Baixando { download_url } em { anatel_constants .INPUT_PATH .value } "
3232 )
3333
@@ -65,7 +65,6 @@ def unzip_file():
6565# ! TASK MICRODADOS
6666def clean_csv_microdados (ano , semestre , table_id ):
6767 log ("Download dos dados..." )
68- log (anatel_constants .URL .value )
6968 os .system (f"mkdir -p { anatel_constants .INPUT_PATH .value } " )
7069
7170 df = pd .read_csv (
@@ -74,8 +73,6 @@ def clean_csv_microdados(ano, semestre, table_id):
7473 encoding = "utf-8" ,
7574 )
7675
77- log ("Renomeando as colunas:" )
78-
7976 df .rename (
8077 columns = anatel_constants .RENAME_COLUMNS_MICRODADOS .value , inplace = True
8178 )
@@ -103,8 +100,6 @@ def clean_csv_microdados(ano, semestre, table_id):
103100
104101# ! TASK BRASIL
105102def clean_csv_brasil (table_id ):
106- log ("Abrindo os dados do Brasil..." )
107-
108103 densidade = pd .read_csv (
109104 f"{ anatel_constants .INPUT_PATH .value } Densidade_Telefonia_Movel.csv" ,
110105 sep = ";" ,
@@ -131,7 +126,6 @@ def clean_csv_brasil(table_id):
131126 .str .replace ("," , "." )
132127 .astype (float )
133128 )
134- log ("Salvando os dados do Brasil..." )
135129
136130 densidade_brasil .to_csv (
137131 f"{ anatel_constants .TABLES_OUTPUT_PATH .value [table_id ]} densidade_brasil.csv" ,
@@ -144,7 +138,6 @@ def clean_csv_brasil(table_id):
144138
145139# ! TASK UF
146140def clean_csv_uf (table_id ):
147- log ("Abrindo os dados por UF..." )
148141 densidade = pd .read_csv (
149142 f"{ anatel_constants .INPUT_PATH .value } Densidade_Telefonia_Movel.csv" ,
150143 sep = ";" ,
@@ -169,7 +162,6 @@ def clean_csv_uf(table_id):
169162 .str .replace ("," , "." )
170163 .astype (float )
171164 )
172- log ("Salvando dados por UF" )
173165 densidade_uf .to_csv (
174166 f"{ anatel_constants .TABLES_OUTPUT_PATH .value [table_id ]} densidade_uf.csv" ,
175167 index = False ,
@@ -181,7 +173,6 @@ def clean_csv_uf(table_id):
181173
182174# ! TASK MUNICIPIO
183175def clean_csv_municipio (table_id ):
184- log ("Abrindo os dados por município..." )
185176 densidade = pd .read_csv (
186177 f"{ anatel_constants .INPUT_PATH .value } Densidade_Telefonia_Movel.csv" ,
187178 sep = ";" ,
@@ -203,7 +194,6 @@ def clean_csv_municipio(table_id):
203194 .str .replace ("," , "." )
204195 .astype (float )
205196 )
206- log ("Salvando os dados por município..." )
207197 densidade_municipio .to_csv (
208198 f"{ anatel_constants .TABLES_OUTPUT_PATH .value [table_id ]} densidade_municipio.csv" ,
209199 index = False ,
0 commit comments