Skip to content

Commit 880d12b

Browse files
committed
closes #346
1 parent 1eec960 commit 880d12b

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

r-package/DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Depends:
3232
R (>= 3.5.0)
3333
Imports:
3434
curl,
35+
dplyr (>= 0.8-3),
3536
data.table,
3637
httr (>= 1.4.1),
3738
methods,
@@ -41,7 +42,6 @@ Suggests:
4142
arrow (>= 15.0.1),
4243
censobr (>= 0.3.2),
4344
covr,
44-
dplyr (>= 0.8-3),
4545
ggplot2 (>= 3.3.1),
4646
knitr,
4747
rmarkdown,

r-package/NEWS.md

+4
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@
66
- Function `read_urban_area()` now has a new parameter `code_state`, which will allow users to filter selected states. Closes #338
77
- Function `read_metro_area()` now has a new parameter `code_state`, which will allow users to filter selected states. Closes #338
88

9+
**Bug fix**
10+
- 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.
11+
912
**New data**
1013
- schools for 2023
1114
- health facilities for 202303
15+
- census tracts for 2020 and 2022
1216

1317

1418
# geobr v1.8.2

r-package/R/utils.R

+2-1
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,8 @@ load_gpkg <- function(temps=NULL){
283283

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

288289
# closes issue 284
289290
col1 <- names(temp_sf)[1]

0 commit comments

Comments
 (0)