TSC API

Top level functions to interact with the TSC API.

handle_http_status()

Emit a specific warning messages depending on HTTP status

print(<tsc_api_response>)

S3 print method for 'tsc_api_response'.

tsc_GET()

Return GeoJSON features from a TSC API endpoint

tsc_POST()

Send a POST request to TSC's API

tsc_chunk_post()

POST data to a TSC API serializer in chunks

tsc_occ_obs_post()

Post a list of records to TSC API endpoint "occ-observation/bulk_create"

tsc_parse()

Parse a tsc_api_response into a tibble

WACensus API

Top level functions to interact with the WACensus API.

gs_getWFS()

Return a GeoJSON FeatureCollection from an OGC WFS 2.0.0 endpoint

upsert_geojson()

Upsert GeoJSON into TSC API endpoints

CKAN helpers

Top level functions to interact with the CKAN API and file resources.

ckan_works()

Check whether CKAN is accessible with given credentials

dl_mdbzip()

Download, extract and open a zipped Access database from a CKAN dataset.

upload_file_to_ckan()

Upload a file to an existing CKAN resource ID or skip if file is missing

upload_to_ckan()

Create or update a CKAN resource.

Data

Included example datasets for use in testing and as templates for data import.

areas

TSC Areas as tibble

areas_gj

TSC Areas as GeoJSON

cae_res

TSC Community occurrences with their Polygon representation, unparsed

phys_sample

TSC Occurrence Observations of type "Physical Sample"

tae_res

TSC Taxon occurrences with their Point representation, unparsed

Settings

Configuration of tscr.

tsc_settings() get_tsc_api_url() get_tsc_api_token() get_tsc_test_api_url() get_tsc_test_api_token() get_tsc_verbose()

Get TSC settings

tsc_setup()

Configure default TSC settings

Helpers

Helper methods used by other tscr functions.

get_more()

Decide whether the given download limit has been reached

tsc_msg_abort()

rlang::abort() with a red error message with a cross symbol

tsc_msg_info()

Print a blue info message with an info symbol

tsc_msg_noop()

Print a green noop message with a filled circle symbol

tsc_msg_success()

Print a green success message with a tick symbol

tsc_msg_warn()

rlang::warn() with a yellow warning message with a warning symbol

tsc_online()

Check whether API token is set and TSC is online

tsc_works()

Check whether API token is set and TSC is online