Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
dcooley committed Jun 19, 2020
1 parent 5b2c380 commit 7144aa7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 53 deletions.
24 changes: 0 additions & 24 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -177,30 +177,6 @@ microbenchmark(
# sf 1867.6840 1867.6840 1958.7968 1958.7968 2049.9097 2049.9097 2
```

### Does it work?

I've written a [lot of tests](https://github.com/SymbolixAU/geojsonsf/tree/master/tests/testthat) to try and capture all eventualities. But if you find a mistake please let me know.

Here's a quick visual check to see the output of the above benchmark data

```{r, eval = F}
library(googleway)
set_key("GOOGLE_MAP_KEY")
gsf <- geojson_sf(geo)
google_map() %>%
add_polygons(gsf[!gsf$STATE %in% c("02","15","72"), ],
fill_colour = "CENSUSAREA",
stroke_weight = 0)
```

```{r, echo = FALSE}
knitr::include_graphics("./man/figures/GeoJSONSF.png")
```






33 changes: 4 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ sf
# geometry type: GEOMETRY
# dimension: XY
# bbox: xmin: -1 ymin: -1 xmax: 100 ymax: 1
# z_range: zmin: 0 zmax: 0
# m_range: mmin: 0 mmax: 0
# CRS: EPSG:4326
# z_range: zmin: NA zmax: NA
# m_range: mmin: NA mmax: NA
# CRS: 4326
# id geometry
# 1 NA POINT (0 0)
# 2 NA LINESTRING (-1 -1, 1 1)
Expand Down Expand Up @@ -168,8 +168,7 @@ sf_geojson(sf, simplify = F)
### How fast is it?

This benchmark shows a comparison with `library(sf)` for converting a
string of GeoJSON of 3,221 counties in the US in to an `sf`
object
string of GeoJSON of 3,221 counties in the US in to an `sf` object

``` r
myurl <- "http://eric.clst.org/assets/wiki/uploads/Stuff/gz_2010_us_050_00_500k.json"
Expand All @@ -193,27 +192,3 @@ microbenchmark(
# geojsonsf 709.2268 709.2268 722.0626 722.0626 734.8984 734.8984 2
# sf 1867.6840 1867.6840 1958.7968 1958.7968 2049.9097 2049.9097 2
```

### Does it work?

I’ve written a [lot of
tests](https://github.com/SymbolixAU/geojsonsf/tree/master/tests/testthat)
to try and capture all eventualities. But if you find a mistake please
let me know.

Here’s a quick visual check to see the output of the above benchmark
data

``` r
library(googleway)
set_key("GOOGLE_MAP_KEY")

gsf <- geojson_sf(geo)

google_map() %>%
add_polygons(gsf[!gsf$STATE %in% c("02","15","72"), ],
fill_colour = "CENSUSAREA",
stroke_weight = 0)
```

<img src="./man/figures/GeoJSONSF.png" width="100%" />

0 comments on commit 7144aa7

Please sign in to comment.