Last active
January 12, 2019 22:27
-
-
Save jthomasmock/6e51a74c3401b5ff74ce1baf6e20cdb3 to your computer and use it in GitHub Desktop.
A map of the best tacos in Austin for RStudio::Conf via Caitlin Hudon
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| title: "The Best Tacos in Austin according to Caitlin Hudon" | |
| output: | |
| flexdashboard::flex_dashboard: | |
| orientation: column | |
| vertical_layout: fill | |
| --- | |
| ```{r setup, include=FALSE} | |
| library(flexdashboard) | |
| library(tidyverse) | |
| library(leaflet) | |
| library(DT) | |
| library(knitr) | |
| library(kableExtra) | |
| icon.home <- makeAwesomeIcon(icon = 'home', markerColor = 'green', library='ion') | |
| icon.flag <- makeAwesomeIcon(icon = 'flag', markerColor = 'red', library='fa', | |
| iconColor = 'black') | |
| df <- data_frame( | |
| label = c("Tyson's Tacos", "Torchy's Tacos", "Veracruz All Natural Food Truck", "Papalote Taco House", "Tacodeli"), | |
| lat = c(30.309883, 30.265852, 30.258061, 30.243579, 30.310624) , | |
| lng = c(-97.715122, -97.749551, -97.725885, -97.781897, -97.740110), | |
| url = c("http://www.tysonstacos.com/", "https://torchystacos.com/", "https://www.veracruzallnatural.com/", "http://yumpapalote.com/", "https://www.tacodeli.com/") | |
| ) %>% | |
| mutate(html_url = paste0('<a href = ', url, '>', url, ' </a>')) | |
| ``` | |
| Column {data-width=550} | |
| ----------------------------------------------------------------------- | |
| ### Map of the Best Tacos in Austin | |
| ```{r} | |
| leaflet() %>% | |
| addTiles() %>% | |
| setView(lat = 30.261669, lng = -97.738177, zoom = 12) %>% | |
| addAwesomeMarkers(lat = 30.261669, lng = -97.738177, label = "RStudio::Conf", icon = icon.home) %>% | |
| addAwesomeMarkers(lat = df$lat, lng = df$lng, label = df$label, popup = paste0('<a href = ', df$url, ' target="_blank">', df$label, '</a>'), icon = icon.flag) | |
| ``` | |
| Column {data-width=450} | |
| ----------------------------------------------------------------------- | |
| ### The Tweet | |
| <blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">In honor of having <a href="https://twitter.com/hashtag/rstudioconf?src=hash&ref_src=twsrc%5Etfw">#rstudioconf</a> in town next week, here are my picks for best tacos in Austin:<br><br>🌮 Tyson's<br>🌮 Torchy's<br>🌮 Veracruz All Natural<br>🌮 Papalote Taco House<br>🌮 Tacodeli</p>— Caitlin Hudon👩🏼 | |
| 💻 (@beeonaposy) <a href="https://twitter.com/beeonaposy/status/1083856723398545408?ref_src=twsrc%5Etfw">January 11, 2019</a></blockquote> | |
| <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> | |
| ### Taco URLs | |
| ```{r} | |
| df %>% select(Restaurant = label, url) %>% | |
| mutate(url = cell_spec(url, "html", link = url)) %>% | |
| kable("html", escape = FALSE) %>% | |
| kable_styling(bootstrap_options = c("hover", "condensed")) | |
| ``` | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment