Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Find information and address details for a Brazilian postal code
ResourceFunction["BrazilPostcodeLookup"][code] returns a Dataset of address data for a given Brazilian postal code code. |
"cep" Brazilian zip code number (CEP - Código de Endereçamento Postal) "logradouro" street or avenue name "complemento" additional optional data "bairro" neighborhood or city name "localidade" county "uf" state name code (acronym) "ibge" official geographical brazilian id (IBGE - Instituto Brasileiro de Geografia e Estatística
) "gia" Brazilian regional tax code "ddd" local area phone code "siafi" another IBGE code
Lookup data for a given postal code from downtown São Paulo downtown:
In[1]:= |
Out[1]= |
Get data for MASP (Museu de Arte de São Paulo):
In[2]:= |
Out[2]= |
Get CEP data for the capital Brazilia (Palácio do Planalto region):
In[3]:= |
Out[3]= |
Get address data for UNICAMP (Universidade Estadual de Campinas):
In[4]:= |
Out[4]= |
The default web service used is ViaCEP; fields are returned in Brazilian Portuguese:
In[5]:= |
Out[5]= |
Specifying the WEB Service BrazilAPI returns less data but we get the geo location:
In[6]:= |
Out[6]= |
Show the geo location:
In[7]:= |
Out[7]= |
Convert the geo location from a string to numbers:
In[8]:= |
Out[8]= |
View as a GeoGraphics:
In[9]:= |
For incorrect or unknown CEP numbers an error is returned:
In[10]:= |
Out[10]= |
In[11]:= |
Out[11]= |
Get the Insper college address from Open Street Map:
In[12]:= |
Out[12]= |
Get the full address:
In[13]:= |
Out[13]= |
Look for the CEP number by pattern:
In[14]:= |
Out[14]= |
Finally, get the CEP info:
In[15]:= |
Out[15]= |
Display the region within 1km of USP (Universidade de São Paulo) college:
In[16]:= |
This work is licensed under a Creative Commons Attribution 4.0 International License