0. Carga de librerías necesarias
# data analysis
library(dplyr) # grammar of data manipulation helping to resolve data manipulation difficulties
library(Hmisc) # useful functions for data analysis and high - level graphics
library(foreign) # read data stored by Minitab, SPSS, Stata
library(openxlsx) # open, read, write,and edit xlsx files
library(tidyverse) # collection of R packages designed for data science
# visualization
library(ggmap) # spatial data visualization
library(rgeoda) # spatial data analysis based on software GeoDa
library(ggplot2) # Grammar of graphics. System for declarative creating graphics
library(corrplot) # provides a visual exploratory tool on correlation matrix
library(RColorBrewer) # offers several color palettes
library(leaflet) # interactive maps
library(leafsync) # create small multiples of several leaflet web maps
library(htmltools) # tools for HTML generation and output
# others
library(rlang) # collection of frameworks and APIs for programming with R
library(classInt) # methods for choosing univariate class intervals for mapping or other graphic purposes
library(gridExtra) # to arrange and combine plots for easy comparison
library(knitr) # integrates computing and reporting
# Google Maps API
library(googleway) # provides a mechanism to access various Google Maps APIs, including plotting a Google Map from R and overlaying it with shapes and markers, and retrieving data from the places, directions, roads, distances, geocoding, elevation and timezone APIs
library(tm) # Asegúrate de cargar este paquete antes de usar 'Corpus'
6. Visualización en mapa interactivo
leaflet(data_top) %>% addTiles() %>%
addCircleMarkers(~lon, ~lat, popup = ~cafes, color = "green", radius = 15)
leaflet(data_bottom) %>% addTiles() %>%
addCircleMarkers(~lon, ~lat, popup = ~cafes, color = "red", radius = 15)
7. Análisis de Sentimiento (Sentiment Analysis)
reviews_top <- google_place_details(place_id = data_top$place_id[1], key = gmaps_key)
reviews_bot <- google_place_details(place_id = data_bottom$place_id[1], key = gmaps_key)
reviews_top
## $html_attributions
## list()
##
## $result
## $result$address_components
## long_name short_name
## 1 Local 8 Local 8
## 2 951 951
## 3 Avenida Pico Bolívar Av. Pico Bolívar
## 4 Las Puentes 10º Sector Las Puentes 10º Sector
## 5 San Nicolás de los Garza San Nicolás de los Garza
## 6 Nuevo León N.L.
## 7 Mexico MX
## 8 66460 66460
## types
## 1 subpremise
## 2 street_number
## 3 route
## 4 sublocality_level_1, sublocality, political
## 5 locality, political
## 6 administrative_area_level_1, political
## 7 country, political
## 8 postal_code
##
## $result$adr_address
## [1] "<span class=\"street-address\">Av. Pico Bolívar 951</span>-Local 8, <span class=\"extended-address\">Las Puentes 10º Sector</span>, <span class=\"postal-code\">66460</span> <span class=\"locality\">San Nicolás de los Garza</span>, <span class=\"region\">N.L.</span>, <span class=\"country-name\">Mexico</span>"
##
## $result$business_status
## [1] "OPERATIONAL"
##
## $result$curbside_pickup
## [1] TRUE
##
## $result$current_opening_hours
## $result$current_opening_hours$open_now
## [1] TRUE
##
## $result$current_opening_hours$periods
## close.date close.day close.time open.date open.day open.time
## 1 2025-05-11 0 1700 2025-05-11 0 1000
## 2 2025-05-05 1 2100 2025-05-05 1 0700
## 3 2025-05-06 2 2100 2025-05-06 2 0700
## 4 2025-05-07 3 2100 2025-05-07 3 0700
## 5 2025-05-08 4 2100 2025-05-08 4 0700
## 6 2025-05-09 5 2100 2025-05-09 5 0700
## 7 2025-05-10 6 1700 2025-05-10 6 1000
##
## $result$current_opening_hours$weekday_text
## [1] "Monday: 7:00 AM – 9:00 PM" "Tuesday: 7:00 AM – 9:00 PM"
## [3] "Wednesday: 7:00 AM – 9:00 PM" "Thursday: 7:00 AM – 9:00 PM"
## [5] "Friday: 7:00 AM – 9:00 PM" "Saturday: 10:00 AM – 5:00 PM"
## [7] "Sunday: 10:00 AM – 5:00 PM"
##
##
## $result$delivery
## [1] FALSE
##
## $result$dine_in
## [1] TRUE
##
## $result$formatted_address
## [1] "Av. Pico Bolívar 951-Local 8, Las Puentes 10º Sector, 66460 San Nicolás de los Garza, N.L., Mexico"
##
## $result$geometry
## $result$geometry$location
## $result$geometry$location$lat
## [1] 25.74284
##
## $result$geometry$location$lng
## [1] -100.2709
##
##
## $result$geometry$viewport
## $result$geometry$viewport$northeast
## $result$geometry$viewport$northeast$lat
## [1] 25.74422
##
## $result$geometry$viewport$northeast$lng
## [1] -100.2695
##
##
## $result$geometry$viewport$southwest
## $result$geometry$viewport$southwest$lat
## [1] 25.74152
##
## $result$geometry$viewport$southwest$lng
## [1] -100.2722
##
##
##
##
## $result$icon
## [1] "https://maps.gstatic.com/mapfiles/place_api/icons/v1/png_71/cafe-71.png"
##
## $result$icon_background_color
## [1] "#FF9E67"
##
## $result$icon_mask_base_uri
## [1] "https://maps.gstatic.com/mapfiles/place_api/icons/v2/cafe_pinlet"
##
## $result$name
## [1] "Amorian - Barra De Café"
##
## $result$opening_hours
## $result$opening_hours$open_now
## [1] TRUE
##
## $result$opening_hours$periods
## close.day close.time open.day open.time
## 1 0 1700 0 1000
## 2 1 2100 1 0700
## 3 2 2100 2 0700
## 4 3 2100 3 0700
## 5 4 2100 4 0700
## 6 5 2100 5 0700
## 7 6 1700 6 1000
##
## $result$opening_hours$weekday_text
## [1] "Monday: 7:00 AM – 9:00 PM" "Tuesday: 7:00 AM – 9:00 PM"
## [3] "Wednesday: 7:00 AM – 9:00 PM" "Thursday: 7:00 AM – 9:00 PM"
## [5] "Friday: 7:00 AM – 9:00 PM" "Saturday: 10:00 AM – 5:00 PM"
## [7] "Sunday: 10:00 AM – 5:00 PM"
##
##
## $result$photos
## height
## 1 3124
## 2 3512
## 3 3024
## 4 4000
## 5 4032
## 6 4080
## 7 4032
## 8 4000
## 9 3648
## 10 4032
## html_attributions
## 1 <a href="https://maps.google.com/maps/contrib/114821316621740777993">Amorian - Barra De Café</a>
## 2 <a href="https://maps.google.com/maps/contrib/114821316621740777993">Amorian - Barra De Café</a>
## 3 <a href="https://maps.google.com/maps/contrib/102917186141684532040">Iván Márquez</a>
## 4 <a href="https://maps.google.com/maps/contrib/106464295202899192581">Mariana Nohemi Lumbreras Reyes</a>
## 5 <a href="https://maps.google.com/maps/contrib/105870907151295064618">Andrea Torres</a>
## 6 <a href="https://maps.google.com/maps/contrib/110123376132722266512">Arturo Sánchez</a>
## 7 <a href="https://maps.google.com/maps/contrib/104175095122475628469">Matilde de leon</a>
## 8 <a href="https://maps.google.com/maps/contrib/115089920418965643685">Nadia Guadalupe De La Cruz Garcia</a>
## 9 <a href="https://maps.google.com/maps/contrib/111040827819759648660">Ale Cortez</a>
## 10 <a href="https://maps.google.com/maps/contrib/102829739202666023610">Krystal Marroquín</a>
## photo_reference
## 1 AeeoHcJyRInVy2ZZwLW36C4Dgxd7sExzclRWBuzYXLdEY_LsjNyx1S_V-n7ISSHOHNtfyJwwq-i1trxcfM0aquiDXysYRYKO5m1FWG_DpZNWcu-hPq-4hSwTyE2f4OWcd2xZVFWHdtzgr83KDaFWO-ULgidVjz-ntPMWtOLBUapFN7HW_WVc4i5sMv3USBgPrSFqo3LXgmV58hmGYhEOlN2o0j0ldrZYOpWISl4cZxvVWl48nEk06FBwRU45rUkipe9ILm75ia1Wt3xvGchT3V8-NQFBR0puwxyMgc1lgV_bW5pLBKUTz1Pj9zshP7TMrd5MIrYEU_PeLA8
## 2 AeeoHcL_DP0OwAl24LGalWosbtUElMrwZ-KWVsFJXu2wbMJTBff0NI_CTZPstnVU0OWDhOmpC06Q9OZYPeBTabcLSdoldomWKB9AL74oljmHUCoD8IYBrM9m-qZWqLy_OIEtMDxNE3uDX92KdnCgifg9k8sJesqYE7khkEhEatWsPerLsqA5MWgWAmA4bRgl086jm0mDExvRHqn7j-LBw5LyFgw2b8b_vdoX3Jjy3KpacqR45PEc05BQ4akqODQOaHFvwRELmOk169vPi43DCSJ2GLAH5HhA3T52tXYwHqWmE3IV59-E9VA43MQ98kkXsrcX7cTZL1g7i8s
## 3 AeeoHcI882uNJSxnXZHEIEzG38PAtaRDt21Y7O1qZRQFPxkz9wzF4cim_qjQdp3pERO0MH7pKmN5T0rPLcgEUnl9LqA7dfJpub5GAFCXfNB2_IR51kqADfiKOwtgUWZiw0atmwIGm3BCzen-JYQ364307_x7905rbz0xI6L_3Pd4zruyc0vz_W19pnoGJISkU6BbvCTwrRpzCdqBTeaeDsvKtbjjSEzHfUo2-8PjyvwBXKX3hyzI8yoBXkSW_GgmNurx45DHJFBlv7fPoq8ajYbCw_kg_aNc40m4A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eeoHcJa0vBu52aXdoSPSJhcgx_XDJcWC71xfR7u4chnV0UOLsDm7i25t5ZXkBu8YtHyQd_ud9bcsC44cqS2ZVKENjfr9cGbtqdTktTMa7AxOwxTXlGUvvNmTMU_XVekmsaCbWGFY1uwWY4xPZk3-LBAY6T5fG8tpaegrfZ0D7GnaycEoyjXiudt7ULpiHvFHJPPsCYZ8CIlGCjv6BkSa2gGhEanhyDTnBHiCbcR3ZAqgEx6PXTE-waEikaV4t_1TA3izz6qZvnz1r7fz_SglmFg4_kz4SlGYZevZBqy9zIoLfsl4Odu3z5HdNcB4jLypYgEVXWJr3r6NOCtTr2WKtSdKEcuy0z8_8E39uhObasZZs2R7Y-doUHCdjwIm7RVwn76IpsLHy2UxwCLApRsqXe_2KPzGMOpj-P7IVPwetPAYoTnOa6u979ZxcqwZDVbCXhQz-x5Oelunn6BZCsn95zIjGRy5Wy7mxWP3mWOzqJFAAaxqdB7K-krSVuo0PaQtfBfwHEPdDHlcXEzjTE_eyY9QMy7txBO-ZKI7klt0_1-m65JnpBWxzTzHJWs3LSGVnrMKihKBNf3dERvPwExkScvHWWwcL5B8M3-YmfZEn73C27a7BNIXRh2bkZbMcN6oCPBzjBnqw
## width
## 1 2517
## 2 3000
## 3 4032
## 4 3000
## 5 2268
## 6 3072
## 7 1816
## 8 3000
## 9 2736
## 10 3024
##
## $result$place_id
## [1] "ChIJcftURgyVYoYRyJvUaf5muzI"
##
## $result$plus_code
## $result$plus_code$compound_code
## [1] "PPVH+4M San Nicolás de los Garza, Nuevo Leon, Mexico"
##
## $result$plus_code$global_code
## [1] "75QXPPVH+4M"
##
##
## $result$rating
## [1] 4.9
##
## $result$reference
## [1] "ChIJcftURgyVYoYRyJvUaf5muzI"
##
## $result$reviews
## author_name
## 1 Fernando Rosas
## 2 Ale Cortez
## 3 Miriamtenoriomoran Tenorio moran
## 4 Ivon Márquez
## 5 Maria Gonzalez Moreno
## author_url language
## 1 https://www.google.com/maps/contrib/114218607882112803402/reviews en-US
## 2 https://www.google.com/maps/contrib/111040827819759648660/reviews en-US
## 3 https://www.google.com/maps/contrib/104656141222822926093/reviews es
## 4 https://www.google.com/maps/contrib/109138756091370151392/reviews es
## 5 https://www.google.com/maps/contrib/103637632303220566881/reviews en-US
## original_language
## 1 es
## 2 es
## 3 es
## 4 es
## 5 es
## profile_photo_url
## 1 https://lh3.googleusercontent.com/a-/ALV-UjVWB-3TR3eAWLiJ--kmCo0wwhz-T7OOYoFwCvHFNJOp3XnPp86Z5w=s128-c0x00000000-cc-rp-mo-ba5
## 2 https://lh3.googleusercontent.com/a-/ALV-UjVuvQMOEO4D_rpfDEmep7UU67FgNgC4CoMmx24dXdYDqn0uKdSB=s128-c0x00000000-cc-rp-mo
## 3 https://lh3.googleusercontent.com/a-/ALV-UjU5SDwVAeQKAZWgHRC36bOZv-O-Duus3aZ2RNjSkcwaqgy-YVAd=s128-c0x00000000-cc-rp-mo
## 4 https://lh3.googleusercontent.com/a-/ALV-UjXMFrvUjn3Zo37WZzXTslIMh5SJOi-c15Yzq007untjgd4645Jk=s128-c0x00000000-cc-rp-mo
## 5 https://lh3.googleusercontent.com/a/ACg8ocJ2RyVd6kQwASQINMUjWFzmdZb7sAyx6DjIpVDj8o7k_SMVFg=s128-c0x00000000-cc-rp-mo
## rating relative_time_description
## 1 4 2 weeks ago
## 2 5 a month ago
## 3 1 a month ago
## 4 5 a month ago
## 5 5 a month ago
## text
## 1 The staff is excellent, always friendly and attentive. They have a wide variety of extraction methods, such as V60, AeroPress, Kalita, Origami, among others, which is ideal for specialty coffee lovers.\n\nThe only downside is that the place is quite small, making it more suitable for one or two people, depending on where they sit. Still, it is worth visiting for the quality of the coffee and the good service.
## 2 I love this place, their coffee is delicious.\nYou also have a great variety of foods, and good music and the guys who work there are very friendly.\nA suitable place to go with someone to have a snack, and to go to work and study.
## 3 La actitud del personal puede marcar una gran diferencia en cómo los clientes perciben un lugar, sin importar qué tan bueno sea el ambiente o la calidad de los alimentos.\nQuiero compartir mi experiencia reciente en su establecimiento, ya que considero importante brindar retroalimentación constructiva. El día de nuestra visita, disfrutamos del ambiente agradable del lugar y de la calidad de los alimentos, pero desafortunadamente, el servicio que recibimos afectó nuestra experiencia de manera significativa.\n\nAl ingresar, intentamos ajustar una silla para acomodarnos mejor como familia, pero nos informaron que no era posible moverlas. A pesar de ello, respetamos las normas del lugar y nos acomodamos como se indicaba. Sin embargo, notamos una actitud grosera por parte del miembro del personal que nos atendió. Este comportamiento incluyó aventar las servilletas sobre la mesa y un tono molesto al entregar las bebidas, lo que nos hizo sentir incómodos.\n\nEntendemos que todos podemos tener días complicados, pero esperamos que nuestro comentario sea de utilidad para que puedan revisar estos aspectos y brindar una experiencia más agradable a todos los clientes.\n\nAgradecemos su atención y quedamos a disposición para cualquier aclaración. Nos encantaría regresar en el futuro y disfrutar del excelente potencial que tiene su cafetería.
## 4 Muy agradable lugar, super cómodo para platicar o trabajar, amabilidad y excelente servicio.\nDe los platillos ni hablar, muy rico sabor, me encantan los waffles y el matcha el más delicioso 🤤\nLo que también me agrada es que tiene muy amplio estacionamiento y que jamás pega el sol de frente.
## 5 Excellent place to go for a snack.\nTheir coffee is delicious and they have a wide variety of sweet and savory foods.\nIf customer service is very good, all the guys are always attentive and friendly.\nRecommended 100%
## time translated
## 1 1744859282 TRUE
## 2 1742366192 TRUE
## 3 1742431624 FALSE
## 4 1742504314 FALSE
## 5 1742365015 TRUE
##
## $result$serves_breakfast
## [1] TRUE
##
## $result$takeout
## [1] TRUE
##
## $result$types
## [1] "cafe" "restaurant" "food"
## [4] "point_of_interest" "store" "establishment"
##
## $result$url
## [1] "https://maps.google.com/?cid=3655628765424557000"
##
## $result$user_ratings_total
## [1] 96
##
## $result$utc_offset
## [1] -360
##
## $result$vicinity
## [1] "Avenida Pico Bolívar 951-Local 8, Las Puentes 10º Sector, San Nicolás de los Garza"
##
## $result$website
## [1] "https://www.instagram.com/amorian.cafe/"
##
##
## $status
## [1] "OK"
Tops y Bottoms
# TOP 5 MEJOR VALUADOS
top5 <- data %>%
arrange(desc(business_rating)) %>%
slice_head(n = 5)
ggplot(top5, aes(x = reorder(cafes, business_rating), y = business_rating)) +
geom_col(fill = "darkgreen") +
coord_flip() +
labs(
title = "Top 5 Cafés Mejor Valuados",
x = "Sucursal",
y = "Calificación (máx. 5)"
) +
ylim(0, 5) +
theme_minimal()

# BOTTOM 5 PEOR VALUADOS
bottom5 <- data %>%
arrange(business_rating) %>%
slice_head(n = 5)
ggplot(bottom5, aes(x = reorder(cafes, business_rating), y = business_rating)) +
geom_col(fill = "brown3") +
coord_flip() +
labs(
title = "Top 5 Cafés Peor Valuados",
x = "Sucursal",
y = "Calificación (máx. 5)"
) +
ylim(0, 5) +
theme_minimal()
