Skip to contents

Get comments from a Felt map as a data frame or simple feature object. The results include a comment_url column based on the comment ID value.

Usage

get_felt_comments(
  map_id,
  flatten = TRUE,
  geometry = TRUE,
  crs = NULL,
  simplifyVector = TRUE,
  token = NULL
)

Arguments

map_id

A Felt map URL, map ID string, or a named list with a id and type element. If map_id is a list, it must be equivalent to the output from get_felt_map() where the list includes a "id" string and a "type" string with the value "map".

flatten

If TRUE (default) and comments do not include replies, flatten the structure of the results so each row contains a comment and a location. If FALSE, comments are included in a list column of data frames.

geometry

If TRUE (default), return a sf object. If FALSE, return a data frame.

crs

Coordinate reference system to return (if geometry is TRUE), Default: NULL

simplifyVector

Passed to httr2::resp_body_json(), Default: TRUE

token

Felt personal access token

Value

A data frame or simple feature object (with a list column of comments if flatten is FALSE).

Details

See Felt API documentation on the endpoint for exporting comments.