wastd_parse: Parse a 'wastd_api_response' into a tibble

View source: R/wastd_parse.R

wastd_parseR Documentation

Parse a wastd_api_response into a tibble

Description

From a wastd_api_response, turn the key payload (default: "features") into a tibble:tibble, and tidyr::unnest_wider the tibble into columns equivalent to the fields of the WAStD API serializer. If GeoJSON is found, the keys geometry (including coordinates) will remain unchanged, but the key properties will be unnested.

Usage

wastd_parse(wastd_api_response, payload = "data")

Arguments

wastd_api_response

A wastd_api_response from WAStD

payload

(chr) The name of the key containing the parsed httr::content() from the WAStD API call

Details

\lifecycle

stable

Value

A tibble with one row per record and columns corresponding to each record's fields.

See Also

Other api: build_auth(), download_minimal_wastd_turtledata(), download_wastd_sites(), download_wastd_turtledata(), download_wastd_users(), export_wastd_turtledata(), filter_wastd_turtledata_area(), filter_wastd_turtledata_seasons(), filter_wastd_turtledata(), handle_http_status(), wastd_GET(), wastd_POST(), wastd_bulk_post(), wastd_chunk_post(), wastd_create_update_skip(), wastd_post_one()


parksandwildlife/wastdr documentation built on Nov. 17, 2022, 4:52 p.m.