Closed MatthieuStigler closed 2 years ago
Thanks for the heads up. The number of columns are the same. It seems there is a conflic the class of column five. I'll fix this in the next round of updates / fixes.
In the meantime, I would suggest you donwload the data for anther year. If, however, you need to use 2001 data, this code here is a way around this issue:
library(geobr)
library(sf)
library(data.table)
# download states
states <- read_state(year=2001)
# separately download the municipities of each state
munis_list <- lapply( X = states$abbrev_state,
FUN = function(i) { read_municipality(code_muni = i, year = 2001) }
)
# rbind all municipalities
munis <- rbindlist(munis_list)
# back to sf
munis <- st_sf(munis)
thanks for your quick answer, and for suggesting a workaround!
Hi @MatthieuStigler . This issue has now been fixed. No need to reinstall geobr. Simply restart your R session and it should work fine. Please let me know if the problem persists. Closing this issue for now
Nice, I can confirm it is working, thanks!
I notice geobr::download_metadata()
doesn't work anymore... is that on purpose?
download_metadata()
is intended as an internal function and it is not exported anymore. If case you really need to use it, you can run geobr:::download_metadata()
, with three :::
.
If you would like to know all datasets available in the geobr package, you can use the list_geobr()
function.
ps. I do not recommend using download_metadata()
. As of today, geobr downloads data sets from two two separate servers. If one server fails, geobr automatically downloads the data from the second server. However, this does not work if you manually use the url links in the metadata table.
Hi
Thanks for the nice package! It seems that there is a problem with
geobr::read_municipality(year = 2001, simplified = TRUE)
, but just for year 2001? Other years in [2000, 2020] seemed fine! Is it possible this year has less columns?Thanks!
This happens with version
1.6.5
Created on 2022-02-08 by the reprex package (v2.0.1)