ipeaGIT / geobr

Easy access to official spatial data sets of Brazil in R and Python
https://ipeagit.github.io/geobr/
786 stars 118 forks source link

refactor function cep_to_state #265

Closed aspeddro closed 1 year ago

aspeddro commented 2 years ago

This PR refactor cep_to_state function.

rafapereirabr commented 2 years ago

Hi @aspeddro . Thank you for your contribution and pleace accept my apologies for taking so much time to get back to you. The code of the function looks much nicer now. However, the new function does not pass the tests in test-cep_to_state.R.

The function should be able to throw an informative error message in these situations below:

cep_to_state(cep = 'aaaa') 
cep_to_state() 
rafapereirabr commented 1 year ago

I've added a few checks that were missing. Thanks!