Skip to content

Commit

Permalink
closes #346
Browse files Browse the repository at this point in the history
  • Loading branch information
rafapereirabr committed Apr 18, 2024
1 parent 1eec960 commit 880d12b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion r-package/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Depends:
R (>= 3.5.0)
Imports:
curl,
dplyr (>= 0.8-3),
data.table,
httr (>= 1.4.1),
methods,
Expand All @@ -41,7 +42,6 @@ Suggests:
arrow (>= 15.0.1),
censobr (>= 0.3.2),
covr,
dplyr (>= 0.8-3),
ggplot2 (>= 3.3.1),
knitr,
rmarkdown,
Expand Down
4 changes: 4 additions & 0 deletions r-package/NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@
- Function `read_urban_area()` now has a new parameter `code_state`, which will allow users to filter selected states. Closes #338
- Function `read_metro_area()` now has a new parameter `code_state`, which will allow users to filter selected states. Closes #338

**Bug fix**
- Using `data.table::rbindlist()` to rind data was throwing errors when some observations were of class `POLYGONS` and others were `MULTIPOLYGONS`. This has now been replaced with `dplyr::bind_rows()` at a very small performance penalty. Closes #346.

**New data**
- schools for 2023
- health facilities for 202303
- census tracts for 2020 and 2022


# geobr v1.8.2
Expand Down
3 changes: 2 additions & 1 deletion r-package/R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,8 @@ load_gpkg <- function(temps=NULL){

# read files and pile them up
files <- lapply(X=temps, FUN= sf::st_read, quiet=TRUE)
temp_sf <- sf::st_as_sf(data.table::rbindlist(files, fill = TRUE)) # do.call('rbind', files)
# temp_sf <- sf::st_as_sf(data.table::rbindlist(files, fill = TRUE)) # do.call('rbind', files)
temp_sf <- dplyr::bind_rows(files)

# closes issue 284
col1 <- names(temp_sf)[1]
Expand Down

0 comments on commit 880d12b

Please sign in to comment.