Title: | Extract Information from Google's "Popular Times" |
---|---|
Description: | Once you've identified a real life place, such as a shop, a restaurant, a bar, etc. use this package to simulate a Google search and retrieve its "Popular Times" and geographic location information and save them in Comma-Separated Values files. This package also downloads a list of restaurants and bars of Ushuaia city, Argentina. |
Authors: | Matias Poullain [aut, cre] |
Maintainer: | Matias Poullain <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.91 |
Built: | 2025-01-24 03:39:42 UTC |
Source: | https://github.com/matiaspoullain/sgat |
A data frame containing all posibles countries codes to be used in mobility_var
and their respective countries names
diamonds.
countries_codes
countries_codes
A data frame with 136 rows and 2 columns:
Countries codes to be used in mobility_var
Names of the countries or regions
https://www.google.com/covid19/mobility/
Automated server creation
initialization_sgat()
initialization_sgat()
"Driver connection"
## Not run: initialization_sgat() ## End(Not run)
## Not run: initialization_sgat() ## End(Not run)
Download mobility variation data from one or many countries
mobility_var(country.code)
mobility_var(country.code)
country.code |
Character class country code, vector of countries codes or "All". Countries codes can be found in "countries.codes". If "All", data from all countries will be downloaded |
Data frame with information of the mobility variations grouped by country, sub-region, date and type of activity
## Not run: argentina <- mobility_var("AR") head(argentina) northAmerica <- mobility_var(c("CA", "US", "MX")) head(northAmerica) allCountries <- mobility_var("All") head(allCountries) ## End(Not run)
## Not run: argentina <- mobility_var("AR") head(argentina) northAmerica <- mobility_var(c("CA", "US", "MX")) head(northAmerica) allCountries <- mobility_var("All") head(allCountries) ## End(Not run)
sgat_day
on every day of the week and finally save the retrieved data as a csv file. If you are looking for the "Popular Times" information for a single weekday use sgat_day
instead.Iteration over sgat_day
on every day of the week and finally save the retrieved data as a csv file. If you are looking for the "Popular Times" information for a single weekday use sgat_day
instead.
sgat(lugar.a.buscar, tiempo.espera = 10, carpeta.guardado = NULL)
sgat(lugar.a.buscar, tiempo.espera = 10, carpeta.guardado = NULL)
lugar.a.buscar |
What you want to search in Google |
tiempo.espera |
Time measure of how much time you think it's sufficient given your internet connection to load a Google search page and not finding the information, |
carpeta.guardado |
Name of the directory where the csv files will be saved. If the directory doesn't exist, it will be created automatically. |
Data frame with retrieved information for all weekdays
## Not run: museo <- sgat(lugar.a.buscar = "museo nacional de bellas artes, buenos aires, argentina") head(museo) ## End(Not run)
## Not run: museo <- sgat(lugar.a.buscar = "museo nacional de bellas artes, buenos aires, argentina") head(museo) ## End(Not run)
sgat
instead.Opens firefox, searches in Google lugar.a.buscar place on the dia.semana weekday. Then it retrieves the "Popular Times" and geolocation information. If the search finds said information, the function returns a data.frame, if not, NULL. If you are looking the "Popular Times" information for the whole week use sgat
instead.
sgat_day(lugar.a.buscar, dia.semana, tiempo.espera = 10)
sgat_day(lugar.a.buscar, dia.semana, tiempo.espera = 10)
lugar.a.buscar |
What you want to search in Google |
dia.semana |
Day of the week from when you want to retrieve the "Popular Times" information |
tiempo.espera |
Time measure of how much time you think it's sufficient given your internet connection to load a Google search page and not finding the information, |
dataframe with retrieved information for single weekday
## Not run: museo.miercoles <- sgat_day("museo nacional de bellas artes, buenos aires, argentina", "miercoles") head(museo.miercoles) ## End(Not run)
## Not run: museo.miercoles <- sgat_day("museo nacional de bellas artes, buenos aires, argentina", "miercoles") head(museo.miercoles) ## End(Not run)
Search for the n most popular places in a city according to Tripadvisor
tripadvisor_places(ciudad, n.resultados = Inf)
tripadvisor_places(ciudad, n.resultados = Inf)
ciudad |
City or area where you want the places' information |
n.resultados |
Maximum number of results to retrieve. If not specified, all results will be retrieved |
Character vector with the names of the most popular places of the searched city or area according to Tripadvisor
## Not run: tripadvisor_places("Pinamar, Argentina", 10) ## End(Not run)
## Not run: tripadvisor_places("Pinamar, Argentina", 10) ## End(Not run)
Retrieves a vector of Ushuaian's restaurants and bar's names and adresses, ready for unambiguous Google searches.
ushuaia_restaurants()
ushuaia_restaurants()
Vector of restaurants and bars in Ushuaia city, Tierra del Fuego, Argentina
restaurants <- ushuaia_restaurants() head(restaurants)
restaurants <- ushuaia_restaurants() head(restaurants)