Skip to content

z error when reading geojson data #1592

@yeedle

Description

@yeedle

I'm trying to read the nytimes' elections dataset by using st_read. After downloading and extracting the file, I get the following error (sf version 0.9-7):

> data <- read_sf("~Downloads/precincts-with-results.geojson")
Error in CPL_get_z_range(obj, 3) : z error - expecting three columns;
System details platform x86_64-pc-linux-gnu

arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 3
minor 6.3
year 2020
month 02
day 29
svn rev 77875
language R
version.string R version 3.6.3 (2020-02-29)
nickname Holding the Windsock

sessionInfo() R version 3.6.3 (2020-02-29) Platform: x86_64-pc-linux-gnu (64-bit) Running under: elementary OS 0.4.1 Loki

Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0

locale:
[1] LC_CTYPE=en_US.UTF-8
[2] LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8
[6] LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8
[8] LC_NAME=C
[9] LC_ADDRESS=C
[10] LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8
[12] LC_IDENTIFICATION=C

attached base packages:
[1] stats graphics grDevices utils datasets
[6] methods base

other attached packages:
[1] forcats_0.5.0 stringr_1.4.0 dplyr_1.0.2
[4] purrr_0.3.4 readr_1.4.0 tidyr_1.1.2
[7] tibble_3.0.4 ggplot2_3.3.2 tidyverse_1.3.0
[10] sf_0.9-7

loaded via a namespace (and not attached):
[1] Rcpp_1.0.5 cellranger_1.1.0
[3] pillar_1.4.7 compiler_3.6.3
[5] dbplyr_1.4.4 class_7.3-17
[7] tools_3.6.3 lubridate_1.7.9
[9] jsonlite_1.7.2 lifecycle_0.2.0
[11] gtable_0.3.0 pkgconfig_2.0.3
[13] rlang_0.4.9 reprex_0.3.0
[15] DBI_1.1.1 cli_2.2.0
[17] rstudioapi_0.13 haven_2.3.1
[19] e1071_1.7-4 withr_2.3.0
[21] xml2_1.3.2 httr_1.4.2
[23] fs_1.5.0 hms_0.5.3
[25] generics_0.0.2 vctrs_0.3.6
[27] classInt_0.4-3 grid_3.6.3
[29] tidyselect_1.1.0 glue_1.4.2
[31] R6_2.5.0 fansi_0.4.1
[33] readxl_1.3.1 modelr_0.1.8
[35] blob_1.2.1 magrittr_2.0.1
[37] backports_1.2.0 scales_1.1.1
[39] ellipsis_0.3.1 units_0.6-7
[41] rvest_0.3.6 assertthat_0.2.1
[43] colorspace_2.0-0 KernSmooth_2.23-17
[45] stringi_1.5.3 munsell_0.5.0
[47] broom_0.7.1 crayon_1.3.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions