Skip to content

Commit

Permalink
minor fix if input data has no CEP or muni
Browse files Browse the repository at this point in the history
  • Loading branch information
rafapereirabr committed Dec 11, 2024
1 parent 9b190b3 commit 4973618
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/geocode.R
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,11 @@ geocode <- function(input_table,
# Narrow search scope in cnefe to municipalities and zip codes present in input
input_ceps <- unique(input_padrao$cep)
input_ceps <- input_ceps[!is.na(input_ceps)]
if(is.null(input_ceps)){ input_ceps <- "*"}

input_municipio <- unique(input_padrao$municipio)
input_municipio <- input_municipio[!is.na(input_municipio)]
if(is.null(input_municipio)){ input_municipio <- "*"}

query_filter_cnefe_municipios <- sprintf("
CREATE TEMPORARY TABLE filtered_cnefe_cep AS
Expand Down

0 comments on commit 4973618

Please sign in to comment.