-
-
Save mribeirodantas/be2743746c2a96bde0c60c25702cac79 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mobility %>% | |
filter(country == 'Brazil') %>% | |
select(-c('updated_at')) %>% | |
# Updating state names | |
mutate(region = case_when(region == 'State of Acre' ~ 'AC', | |
region == 'State of Amapá' ~'AP', | |
region == 'State of Espírito Santo' ~ 'ES', | |
region == 'State of Maranhão' ~ 'MA', | |
region == 'State of Mato Grosso do Sul' ~ 'MS', | |
region == 'State of Paraná' ~ 'PR', | |
region == 'State of Pará' ~ 'PA', | |
region == 'State of Piauí' ~ 'PI', | |
region == 'State of Rio Grande do Sul' ~ 'RS', | |
region == 'State of Rondônia' ~ 'RO', | |
region == 'State of Santa Catarina' ~ 'SC', | |
region == 'State of São Paulo' ~ 'SP', | |
region == 'Federal District' ~ 'DF', | |
region == 'State of Alagoas' ~ 'AL', | |
region == 'State of Amazonas' ~ 'AM', | |
region == 'State of Ceará' ~ 'CE', | |
region == 'State of Goiás' ~ 'GO', | |
region == 'State of Mato Grosso' ~ 'MT', | |
region == 'State of Minas Gerais' ~ 'MG', | |
region == 'State of Paraíba' ~ 'PB', | |
region == 'State of Pernambuco' ~ 'PE', | |
region == 'State of Rio Grande do Norte' ~ 'RN', | |
region == 'State of Rio de Janeiro' ~ 'RJ', | |
region == 'State of Roraima' ~ 'RR', | |
region == 'State of Sergipe' ~ 'SE', | |
region == 'State of Bahia' ~ 'BA', | |
region == 'State of Tocantins' ~ 'TO')) -> mobility |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment