Package 'refuge'

Title: Locate Trans and Intersex-Friendly Toilets
Description: Access the 'Refuge' API, a web-application for locating trans and intersex-friendly restrooms, including unisex and accessible restrooms. Includes data on the location of restrooms, along with directions, comments, user ratings and amenities. Coverage is global, but data is most comprehensive in the United States. See <https://www.refugerestrooms.org/api/docs/> for full API documentation.
Authors: Evan Odell [aut, cre] (ORCID: <https://orcid.org/0000-0003-1845-808X>)
Maintainer: Evan Odell <[email protected]>
License: MIT + file LICENSE
Version: 0.3.3
Built: 2026-05-28 10:17:08 UTC
Source: https://github.com/evanodell/refuge

Help Index


All refuge restrooms

Description

All listed refuge restrooms, ordered by date added or last updated, with the most recent additions and updates at the top.

Usage

rfg_all_restrooms(
  accessible = FALSE,
  unisex = FALSE,
  verbose = TRUE,
  tidy = FALSE
)

Arguments

accessible

If TRUE, only returns restrooms that meet the Americans with Disability Act standards for accessibility. Defaults to FALSE.

unisex

If TRUE, only returns unisex restrooms. Defaults to FALSE.

verbose

If TRUE, prints query progress. Defaults to TRUE.

tidy

If TRUE, makes USA state names more consistent. The internal function focuses on correcting known errors and mistakes, if incorrect state data is supplied that cannot be corrected. Defaults to FALSE.

Details

Note that the API does not standardise or validate the names of states, cities, countries, etc, and so this data may need to be cleaned and organised.

Value

A tibble with details on all listed bathrooms.

Examples

## Not run: 
a <- rfg_all_restrooms(accessible = TRUE, unisex = TRUE)

## End(Not run)

Bathrooms by dates

Description

Requests all records on bathrooms created or updated on or after a given date.

Usage

rfg_date(
  date = NULL,
  accessible = FALSE,
  unisex = FALSE,
  updated = FALSE,
  verbose = TRUE,
  tidy = FALSE
)

Arguments

date

A date in "yyyy-mm-dd" format, or any format that can be coerced to a date with as.Date().

accessible

If TRUE, only returns restrooms that meet the Americans with Disability Act standards for accessibility. Defaults to FALSE.

unisex

If TRUE, only returns unisex restrooms. Defaults to FALSE.

updated

If TRUE, returns all bathrooms updated or added since the given date. Defaults to FALSE, which only returns bathrooms added since the given date.

verbose

If TRUE, prints query progress. Defaults to TRUE.

tidy

If TRUE, makes USA state names more consistent. The internal function focuses on correcting known errors and mistakes, if incorrect state data is supplied that cannot be corrected. Defaults to FALSE.

Value

A tibble with all bathrooms recorded or updated on or after the given date.

Examples

## Not run: 
q <- rfg_date("2017-11-04")

## End(Not run)

Bathroom locations

Description

Given a pair of coordinates (latitude and longitude), finds any nearby bathrooms, subject to other parameters.

Usage

rfg_location(
  lat,
  lng,
  accessible = FALSE,
  unisex = FALSE,
  verbose = TRUE,
  tidy = FALSE
)

Arguments

lat

Location latitude

lng

Location longitude

accessible

If TRUE, only returns restrooms that meet the Americans with Disability Act standards for accessibility. Defaults to FALSE.

unisex

If TRUE, only returns unisex restrooms. Defaults to FALSE.

verbose

If TRUE, prints query progress. Defaults to TRUE.

tidy

If TRUE, makes USA state names more consistent. The internal function focuses on correcting known errors and mistakes, if incorrect state data is supplied that cannot be corrected. Defaults to FALSE.

Value

A tibble with details of any and all nearby refuge bathrooms.

Examples

## Not run: 
c <- rfg_location(lat = 39, lng = -75)

## End(Not run)