Access the Felt API

Upload, download, and edit internet maps with the Felt API (< https://developers.felt.com/rest-api/getting-started>). Allows users to create new maps, edit existing maps, and extract data. Provides tools for working with layers, which represent geographic data, and elements, which are interactive annotations. Spatial data accessed from the API is transformed to work with 'sf'.


feltr

R-CMD-check

feltr offers an R interface to the Felt API. You can create new maps, edit existing maps, and extract data. feltr includes tools for working with layers, which represent geographic data, and elements, which are interactive annotations. Spatial data accessed from the API is transformed to work with ‘sf’.

Installation

You can install the stable version of feltr from CRAN with:

install.package('feltr')

You can install the development version of feltr from GitHub with:

remotes::install_github('christopherkenny/feltr')

API Key

An API key can be obtained by signing into your Felt account and looking under Account Settings at the Integrations tab. Once obtained, it can be loaded for persistent use with feltr::set_felt_key('YOUR KEY', install = TRUE, r_env = file.path(Sys.getenv('HOME'), '.Renviron')).

Example

We can create a map, add some data to it, and even delete it.

library(feltr)
## create a map
map <- felt_create_map(title = 'feltr README')

Then we can add some data to it from a URL.

felt_add_map_layers_url(
  map_id = map$id, 
  url = 'https://www.rocklandgis.com/portal/sharing/rest/content/items/73fc78cb0fb04580b4788937fe5ee697/data',
  name = 'Parks'
)
#> # A tibble: 0 × 6
#> # ℹ 6 variables: name <chr>, status <chr>, progress <dbl>, id <chr>,
#> #   type <chr>, relationships <list>

Finally, we can even delete the map from R.

felt_delete_map(map_id = map$id)
#> [1] 204

This returns a 204 on success.

Related Packages

  • feltr: There is another R package by Eli Pousson with the same name available on GitHub.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("feltr")

0.1.0 by Christopher T. Kenny, 10 months ago


https://github.com/christopherkenny/feltr, https://christophertkenny.com/feltr/


Browse source code at https://github.com/cran/feltr


Authors: Christopher T. Kenny [aut, cre] (ORCID:


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports cli, curl, dplyr, fs, geojsonsf, httr2, jsonlite, purrr, rlang, sf, stringr, tibble, tidyr

Suggests httptest2, testthat


See at CRAN