Skip to content

Commit

Permalink
Add 'manhattan' dataset
Browse files Browse the repository at this point in the history
  • Loading branch information
crazycapivara committed Nov 24, 2018
1 parent 9172438 commit f03603d
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 2 deletions.
8 changes: 6 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
Package: h3forr
Title: An R Interface to H3
Version: 0.1.2
Version: 0.1.3
Date: 2018-11-23
Authors@R: person("Stefan", "Kuethe", role = c("aut", "cre"), email = "[email protected]")
Maintainer: Stefan Kuethe <[email protected]>
Description: Provides R bindings for H3 <https://uber.github.io/h3/>,
Uber's hexagonal hierarchical spatial indexing system.
URL: https://github.com/crazycapivara/h3forr/
BugReports: https://github.com/crazycapivara/h3forr/issues/
License: MIT + file LICENSE
Depends: R (>= 3.3)
Imports:
V8,
magrittr,
purrr
purrr,
tibble
Suggests:
sf,
testthat
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,4 @@ export(polyfill)
export(say_hello)
importFrom(magrittr,"%<>%")
importFrom(magrittr,"%>%")
importFrom(tibble,tibble)
14 changes: 14 additions & 0 deletions R/data.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#' @importFrom tibble tibble
NULL

#' Persons in manhattan
#'
#' @format a tibble with 13987 rows and 3 variables:
#' \describe{
#' \item{lng}{longitude}
#' \item{lat}{latitude}
#' \item{sex}{1: male, 2: female}
#' }
#'
#' @source \url{https://raw.githubusercontent.com/uber-common/deck.gl-data/master/examples/scatterplot/manhattan.json}
"manhattan"
15 changes: 15 additions & 0 deletions data-raw/manhatten.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
library(jsonlite)
library(tibble)

data_url <- paste0(
"https://raw.githubusercontent.com/",
"uber-common/deck.gl-data/",
"master/examples/scatterplot/manhattan.json"
)

manhattan <- data_url %>%
read_json(simplifyVector = TRUE) %>%
as_tibble()

names(manhattan) <- c("lng", "lat", "sex")
# manhattan <- as.matrix(manhattan)
Binary file added data/manhattan.rda
Binary file not shown.
22 changes: 22 additions & 0 deletions man/manhattan.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f03603d

Please sign in to comment.