Package 'algo'

Title: Implement an Address Search Auto Completion Menu on 'Shiny' Text Inputs Using the 'Algolia Places' 'Javascript' Library
Description: Allows the user to implement an address search auto completion menu on 'shiny' text inputs. This is done using the 'Algolia Places' 'JavaScript' library. See <https://community.algolia.com/places/>.
Authors: Mohamed El Fodil Ihaddaden [aut, cre], Algolia contributors [ctb, cph] (algolia places javascript library developers)
Maintainer: Mohamed El Fodil Ihaddaden <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2024-10-29 04:16:17 UTC
Source: https://github.com/feddelegrand7/algo

Help Index


Implement the Algolia Places address search-autocompletion menu on shiny text inputs

Description

In order to use this function, the user must get an application ID and an API key from the Algolia website and store them within her environment (please refer to the package's vignette). He must also put the use_algolia() function at the beginning of her shiny ui.

Usage

algo(element, type = "address", language = "en_US", countries = NULL)

Arguments

element

the shiny text element that will be used for the Algolia Places autocompletion menu

type

Restrict the search results to a specific type. The user can choose from "city", "country", "address", "busStop", "trainStation", "townhall" and airport. Defaults to "address".

language

Get the results in a specific language. The user can pass two letters language codes (ISO 639-1). Defaults to "en_US"

countries

Change the countries to search in. The user can pass a vector of two letters country codes (ISO 639-1). Defaults to the whole world.

Value

An address search-autocompletion menu on shiny text inputs


Enable the Algolia Places JavaScript library

Description

The function activates the capabilities of the Algolia Places JavaScript library. The user must put it at the beginning of her shiny ui. This function works only when the user has set an application ID and an API key, collected from the Algolia website, within her R environment (please refer to the vignette).

Usage

use_algolia()

Value

called for the side effect of activating the Algolia Places JavaScript library