Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

geo.filter for MT state not working #7

Open
dvictori opened this issue Apr 9, 2020 · 1 comment
Open

geo.filter for MT state not working #7

dvictori opened this issue Apr 9, 2020 · 1 comment

Comments

@dvictori
Copy link

dvictori commented Apr 9, 2020

Trying to get municipal soy planted area for a specific state. If I filter for MS state (geo.filter('State' = 50) it works. But for MT state (geo.filter('State' = 51), some other data comes in.

My test code:

library(sidrar)

# getting soy planted area for municipalities in MS state
dados <- get_sidra(1612,
                   variable = c(109),
                   geo = 'City',
                   geo.filter = list("State" = 50),
                   classific = 'c81',
                   category = list('2713'))

uf <- sapply(strsplit(dados$Município, " - "), function (x) x[2])
table(uf)

# uf
# MS 
# 79 

# now getting soy planted area for municipalities in MT state
dados <- get_sidra(1612,
                   variable = c(109),
                   geo = 'City',
                   geo.filter = list("State" = 51),
                   classific = 'c81',
                   category = list('2713'))

uf <- sapply(strsplit(dados$Município, " - "), function (x) x[2])
# data from MS and RO in the response
table(uf)

# uf
# MS  MT  RO 
# 55 141   1 
@zecojls
Copy link

zecojls commented Nov 17, 2020

Having the same issue with different tables, but I'm not sure if it's related to SIDRA or to the package's filtering method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants