knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

sgat

The goal of sgat package is to retrieve information from Google's searches' "Popular Times" and geolocation and mobility reports.

Installation

You can install the released version of sgat package from CRAN with:

install.packages("sgat")

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("matiaspoullain/sgat")

Example

Always start by initializing the driver, once per session:

library(sgat)
initialization_sgat()

This package was created to use it on restaurants, bars, etc... located in Ushuaia city, Tierra del Fuego, Argentina. You can retrieve a vector of them by using the next code:

restaurants <- ushuaia_restaurants()
head(restaurants)

You can retrieve the information from some of these restaurants. The searches are not restricted to Ushuaia, but remember to be specific in your searches, specially if the location you are looking for is far away:

bar_1 <- sgat("coutume, 47 rue de babylone, 75007 paris, france")
head(bar_1)

Although, some other Google searches doesn't have the wanted information. In that case, NULL is returned:

bar_2 <- sgat("Moustacchio, San Martín 298, Ushuaia", tiempo.espera = 20)
bar_2

You also can search for the information from a single day of the week:

bar_3 <- sgat_day("coutume, 47 rue de babylone, 75007 paris, france", "martes")
head(bar_3)

A new function was added which let's the user to search for the most popular places of a city or area according to Tripadvisor:

pinamar <- tripadvisor_places("Pinamar, Argentina", 10)
pinamar

You can also retrieve mobility information of any available countries. They can be found with:

countries_codes

The mobility information can be found using the \code{\link{mobility_var}} function. Here is an example for Argentina:

argentina <- mobility_var("AR")
argentina


matiaspoullain/sgat documentation built on Aug. 13, 2022, 4:21 a.m.