Learn R Programming

pleiades (version 0.3.0)

pl_gist: Make an interactive map to view in the browser as a GitHub gist

Description

Make an interactive map to view in the browser as a GitHub gist

Usage

pl_gist(x, file = NULL, description = "", public = TRUE, browse = TRUE, ...)

Arguments

x

Output from pl_places()

file

(character) File name (without file extension) for your geojson file. Default is 'gistmap'.

description

(character) Description for the Github gist, or leave to default (=no description)

public

(logical) Whether gist is public (default: TRUE)

browse

(logical) If TRUE (default) the map opens in your default browser.

...

Curl options, see curl::curl_options()

Value

Creates a gist on your GitHub account

Details

There are two ways to authorise gistr to work with your GitHub account:

  • Generate a personal access token at https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token and record in the GITHUB_PAT envar.

  • Interactively login into your GitHub account and authorise with OAuth

Using the GITHUB_PAT option is recommended.

Examples

Run this code
# NOT RUN {
x <- pl_places(place_id = 462471)
pl_gist(x)
# }

Run the code above in your browser using DataLab