Skip to content

Commit

Permalink
Merge pull request #11 from joelgombin/vignette
Browse files Browse the repository at this point in the history
new vignette
  • Loading branch information
joelgombin authored May 30, 2017
2 parents 2b710f5 + 1532778 commit 218326f
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.Rhistory
.Rproj.user/
.Rproj.user
inst/doc
5 changes: 4 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ Imports:
purrr,
magrittr
Suggests:
testthat
testthat,
knitr,
rmarkdown
RoxygenNote: 6.0.1
Encoding: UTF-8
URL: http://github.com/joelgombin/banR
BugReports: http://github.com/joelgombin/banR/issues
VignetteBuilder: knitr
44 changes: 44 additions & 0 deletions vignettes/banR.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: "BanR"
author: "Vignette Author"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Vignette Title}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---

```{r setup}
library("dplyr")
library("banR")
```

* `geocode()` takes a single address and return a tibble

```{r geocode}
geocode(query = "8 boulevard du port") %>%
glimpse()
```

* `reverse_geocode()` takes a couple of latitude and longitude and returns a tibble

```{r reverse}
reverse_geocode(long = 2.37, lat = 48.357) %>%
glimpse()
```


* `ban_geocode()` takes a data frame as input with name and code insee and returns a geocoded data frame

```{r geocode-df}
data("paris2012")
paris2012 %>%
slice(1:10) %>%
mutate(adresse = paste(numero, voie, nom),
code_insee = paste0("751", arrondissement)) %>%
ban_geocode(adresse, code_insee = "code_insee") %>%
glimpse()
```

0 comments on commit 218326f

Please sign in to comment.