radius: Geographic radius search

radiusR Documentation

Geographic radius search

Description

Use this widget to find people who live or work "near" a given location, for instance to aid with event planning or when a development officer is about to take a trip. Note: this widget uses a web-based geocoder to geocode the "location" that you type in. If you encounter issues, or just want to be sure, you can always use the latitude and longitude arguments to specify exactly where the center of your search should be.

Usage

lives_near(
  location,
  miles,
  latitude = NULL,
  longitude = NULL,
  include_alternate = FALSE,
  include_past = FALSE,
  include_seasonal = FALSE,
  include_student_local = FALSE,
  include_student_permanent = FALSE,
  type = "home"
)

works_near(
  location,
  miles,
  latitude = NULL,
  longitude = NULL,
  include_alternate = FALSE,
  include_past = FALSE,
  include_self_employed = TRUE,
  type = "business"
)

Arguments

location

A (quoted) string describing a place (see examples)

miles

The radius of the search, all addresses within this many miles of location will be returned

latitude

If you already know the lat/long of your search location, then you can enter them directly rather than entering an address in location

longitude

(see above)

include_past

include past/former addresses? Defaults to FALSE

include_seasonal

for lives_near: include seasonal addresses? Defaults to FALSE

include_student_local

for lives_near: include student local address? Defaults to FALSE

include_student_permanent

for lives_near: include student permanent address? Defaults to FALSE

type

Will be either "home" or "business". Advanced users can specify individual address type codes

include_self_employed

for works_near: include self-employed business addresses? Defaults to TRUE

Value

A disco definition of type entity_id

See Also

address

Examples

## find everyone within 10 miles of campus
lives_near("UC Berkeley", miles = 10)

## can always use exact addresses
lives_near("1995 University Ave., Berkeley, CA 94720", miles = 15.5)

## if you already know the lat/long, you can enter them directly:
works_near(lat = 37.87238, lon = -122.2542, miles = 10)


tarakc02/discoveryengine documentation built on Sept. 26, 2023, 12:17 a.m.