Skip to content

Commit

Permalink
updated documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
benyamindsmith committed Aug 25, 2024
1 parent 605f6ca commit 87bbfd2
Show file tree
Hide file tree
Showing 4 changed files with 125 additions and 29 deletions.
52 changes: 26 additions & 26 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
Package: mapBliss
Type: Package
Title: Plot routes and trips on beautiful maps
Version: 0.1.0
Author: Benjamin Smith
Maintainer: Benjamin Smith<[email protected]>
Description: Inspired by Atlas.co, the mapBliss package allows for users to plot flight paths and road trips on beautiful maps by using leaflet and the Mapbox API. For more information on how this package was developed check out my [blogs](https://bensstats.wordpress.com/?s=atlas).
License: GPL-3
Encoding: UTF-8
LazyData: true
Imports:
dplyr,
purrr,
magrittr,
tibble,
rlang,
sf,
geosphere,
tidygeocoder,
leaflet,
osrm,
webshot,
htmlwidgets,
magick,
shiny
RoxygenNote: 7.2.1
Package: mapBliss
Type: Package
Title: Plot routes and trips on beautiful maps
Version: 0.1.0
Author: Benjamin Smith
Maintainer: Benjamin Smith<[email protected]>
Description: Inspired by Atlas.co, the mapBliss package allows for users to plot flight paths and road trips on beautiful maps by using leaflet and the Mapbox API. For more information on how this package was developed check out my [blogs](https://bensstats.wordpress.com/?s=atlas).
License: GPL-3
Encoding: UTF-8
LazyData: true
Imports:
dplyr,
purrr,
magrittr,
tibble,
rlang,
sf,
geosphere,
tidygeocoder,
leaflet,
osrm,
webshot,
htmlwidgets,
magick,
shiny
RoxygenNote: 7.2.3
90 changes: 90 additions & 0 deletions R/frames.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,96 @@ frame_1<- function(map,



server <- function(input, output) {
output$map <- renderLeaflet({
map
})
## note that you can also add CSS classes here:
output$message <- renderUI(tagList(
h1(title_text, class='title_text'),
h3(subtitle_text, class='subtitle_text'))
)

}
shinyApp(ui, server)
}



frame_2<- function(map,
title_text="Title",
subtitle_text = "Subtitle",
title_font="Brush Script MT",
subtitle_font = "Trebuchet MS",
frame_width = "100%",
frame_height = 780
){
ui <-
fillPage(
## see various ways of including CSS: https://shiny.rstudio.com/articles/css.html
tags$head(
tags$style(HTML(css_string <- paste0("
#greetings {
top: -8rem;
position: absolute;
z-index: 1000;
background-color: #ffffff;
border-radius: 50%;
width: 300px; /* Adjust size as needed */
height: 300px; /* Adjust size as needed */
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
}
.fancy_border {
border: 25px solid #ffffff; /* Adjust color and width as needed */
border-radius: 50%;
width: 300px; /* Match the width of #greetings */
height: 300px; /* Match the height of #greetings */
display: flex;
justify-content: center;
align-items: center;
overflow: hidden;
position: relative;
}
.title_text {
position: absolute;
top: -5rem;
font-family:", title_font, ";
text-align: center;
width: 100%;
}
.subtitle_text {
position: absolute;
top: 1rem; /* Adjust position as needed */
font-family: ", subtitle_font, ";
text-align: center;
width: 100%;
}
/* Ensure the text fits well within the circular frame */
.title_text, .subtitle_text {
padding: 0 1rem;
}
")
)
)
),
div(class = 'fancy_border', ## set CSS class to style border
div(leafletOutput('map',
width= frame_width,
height=frame_height)),
div(id = 'greetings',
uiOutput('message'))

))



server <- function(input, output) {
output$map <- renderLeaflet({
map
Expand Down
2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ pandoc: 3.1.1
pkgdown: 2.0.7
pkgdown_sha: ~
articles: {}
last_built: 2024-05-10T23:13Z
last_built: 2024-05-13T03:15Z

10 changes: 8 additions & 2 deletions man/plot_city_view.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 87bbfd2

Please sign in to comment.