Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
For #32, fixes the issue installation issue: * Installation instructions work and are straightforward, however it would be helpful to add some information about MapBox, and that an API key is needed for some functions. Also note that for some functions, there are packages that will need to be installed separately as they are not installed automatically (i.e., are in `Suggests` - `ceramic`, `ggdist`, etc.)
  • Loading branch information
Robinlovelace committed Aug 17, 2021
1 parent 4826f1d commit 327d5f4
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 1 deletion.
15 changes: 15 additions & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,21 @@ Install the development version from [GitHub](https://github.com/) with:
remotes::install_github("itsleeds/slopes")
```

If you do not already have DEM data and want to make use of the package's ability to download them using the `ceramic` package, install the package with suggested dependencies as follows:

```{r, eval=FALSE}
# install.packages("remotes")
remotes::install_github("itsleeds/slopes", dependencies = "Suggests")
```

Furthermore, you will need to add a MapBox API key to be able to get DEM datasets, by signing up and registering for a key at https://account.mapbox.com/access-tokens/ and then following these steps:

```{r, eval=FALSE}
usethis::edit_r_environ()
# Type in (register on the mapbox website):
MAPBOX_API_KEY=xxxxx
```

## Usage

Load the package in the usual way:
Expand Down
22 changes: 21 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,26 @@ Install the development version from [GitHub](https://github.com/) with:
remotes::install_github("itsleeds/slopes")
```

If you do not already have DEM data and want to make use of the
package’s ability to download them using the `ceramic` package, install
the package with suggested dependencies as follows:

``` r
# install.packages("remotes")
remotes::install_github("itsleeds/slopes", dependencies = "Suggests")
```

Furthermore, you will need to add a MapBox API key to be able to get DEM
datasets, by signing up and registering for a key at
<https://account.mapbox.com/access-tokens/> and then following these
steps:

``` r
usethis::edit_r_environ()
# Type in (register on the mapbox website):
MAPBOX_API_KEY=xxxxx
```

## Usage

Load the package in the usual way:
Expand Down Expand Up @@ -149,4 +169,4 @@ lisbon_route_3d_auto = slope_3d(lisbon_route)
plot_slope(lisbon_route_3d_auto)
```

<img src="man/figures/README-unnamed-chunk-10-1.png" width="100%" />
<img src="man/figures/README-unnamed-chunk-12-1.png" width="100%" />
Binary file modified man/figures/README-dem-lisbon-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-plot_slope-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-route-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified man/figures/README-slope-vis-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 327d5f4

Please sign in to comment.