Skip to content

Commit 3ac025c

Browse files
Merge pull request #12 from crazycapivara/develop
Develop
2 parents 42dcb51 + 2a5c595 commit 3ac025c

File tree

77 files changed

+33005
-54
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+33005
-54
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
inst/doc
12
.Rhistory
23
.RData
34
.Rproj.user

DESCRIPTION

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: h3
22
Title: R bindings for H3
3-
Version: 0.1.1
4-
Date: 2019-02-01
3+
Version: 3.3.0
4+
Date: 2019-02-17
55
Authors@R: person("Stefan","Kuethe", role = c("aut", "cre"), email = "crazycapivara@gmail.com")
66
Maintainer: Stefan Kuethe <crazycapivara@gmail.com>
77
Description: Provides R bindings for H3 <https://uber.github.io/h3/>,
@@ -21,5 +21,10 @@ Imports:
2121
tibble
2222
Suggests:
2323
sf,
24-
testthat
24+
testthat,
25+
knitr,
26+
rmarkdown,
27+
leaflet,
28+
dplyr
2529
RoxygenNote: 6.1.0
30+
VignetteBuilder: knitr

NEWS.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# h3 3.3.0
2+
3+
* Added `pkgdown` site.
4+
* Added `Get started` vignette.
5+
16
# h3 0.1.1
27

38
* Added a `NEWS.md` file to track changes to the package.

R/h3_hierachy.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
#' Get the parent of the given hexagon at a particular resolution.
2-
#' @inheritParams h3_to_geo
2+
#' @param h3_index character scalar representing a valid H3 index
33
#' @param res resolution of parent
4-
#' @return character
4+
#' @return character scalar
55
#' @export
66
h3_to_parent <- function(h3_index, res) {
77
rcpp_h3_to_parent(h3_index, res)
88
}
99

1010
#' Get the children of the given hexagon at a particular resolution.
11-
#' @inheritParams h3_to_geo
11+
#' @inheritParams h3_to_parent
1212
#' @param res resolution of children
13-
#' @return character
13+
#' @return character vector
1414
#' @export
1515
h3_to_children <- function(h3_index, res) {
1616
rcpp_h3_to_children(h3_index, res)

README.Rmd

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ Then you can run:
4444
git clone https://github.com/crazycapivara/h3-r.git
4545
pushd h3-r
4646
chmod +x install-h3c.sh
47+
# Install H3 C Library
4748
./install-h3c.sh
48-
# R -q -e 'devtools::install()'
49+
# Install H3 for R
50+
R -q -e 'devtools::install()'
4951
popd
5052
rm -rf h3-r
5153
```
@@ -95,3 +97,9 @@ h3_to_geo_boundary_sf(neighbors) %>%
9597
h3_set_to_multi_polygon(neighbors) %>%
9698
sf::st_geometry() %>% plot(col = "green")
9799
```
100+
101+
## Run tests
102+
103+
```{r tests}
104+
devtools::test()
105+
```

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,10 @@ Then you can run:
3434
git clone https://github.com/crazycapivara/h3-r.git
3535
pushd h3-r
3636
chmod +x install-h3c.sh
37+
# Install H3 C Library
3738
./install-h3c.sh
38-
# R -q -e 'devtools::install()'
39+
# Install H3 for R
40+
R -q -e 'devtools::install()'
3941
popd
4042
rm -rf h3-r
4143
```
@@ -79,7 +81,7 @@ h3_to_geo_sf(h3_index)
7981
# Get the vertices of the hexagon
8082
h3_to_geo_boundary(h3_index)
8183
#> [[1]]
82-
#> [,1] [,2]
84+
#> lat lng
8385
#> [1,] 37.34110 -122.0416
8486
#> [2,] 37.35290 -122.0340
8587
#> [3,] 37.36352 -122.0428
@@ -121,3 +123,18 @@ h3_set_to_multi_polygon(neighbors) %>%
121123
```
122124

123125
<img src="man/figures/README-h3-algorithms-2.png" width="400px" />
126+
127+
Run tests
128+
---------
129+
130+
``` r
131+
devtools::test()
132+
#> Loading h3
133+
#> Testing h3
134+
#> H3 hierachy: ....
135+
#> H3 indexing: .....
136+
#> H3 misc: ..
137+
#> H3 traversal: .....
138+
#>
139+
#> DONE ======================================================================
140+
```

docs/LICENSE-text.html

Lines changed: 4 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/articles/h3.html

Lines changed: 284 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/articles/h3_files/Proj4Leaflet-0.7.2/proj4-compressed.js

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)