Skip to content

Commit

Permalink
pkg basics
Browse files Browse the repository at this point in the history
  • Loading branch information
Robinlovelace committed Sep 19, 2018
1 parent a1ac6b6 commit c071d70
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 0 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
^README\.Rmd$
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.Rproj.user
.Rhistory
.RData
.Ruserdata
*geojson*
42 changes: 42 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
output: github_document
---

<!-- README.md is generated from README.Rmd. Please edit that file -->

```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```

geobench is a place to put data (in the releases) and code (in any language) to test performance.

It relies on the `bench` package for testing and datasets uploaded into the releases.

## Pre-requisites

This section lists the software that needs to be installed to run these benchmarks.
It will likely evolve over time.

### R packages

- `sf`

## Set-up

The code in this section only needs to run once, or at least each time a new dataset is added to the benchmarks.

### Large point dataset covering UK

```{r, eval=FALSE}
stplanr::dl_stats19()
ac = stplanr::read_stats19_ac() # 214 mb compressed data
ac = ac[!is.na(ac$Latitude), ]
ac_sf = sf::st_as_sf(ac[ c("Accident_Severity", "Longitude", "Latitude")], coords = c("Longitude", "Latitude"))
sf::write_sf(ac_sf, "ac.geojson") # 228 MB .geojson file
zip("ac.geojson.zip", "ac.geojson") # 14 MB
piggyback::pb_upload("ac.geojson.zip")
```

13 changes: 13 additions & 0 deletions geobench.Rproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Version: 1.0

RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default

EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8

RnwWeave: Sweave
LaTeX: pdfLaTeX

0 comments on commit c071d70

Please sign in to comment.