| Type: | Package | 
| Title: | Create an HTML Vertical Timeline from a Data Frame in 'rmarkdown' and 'shiny' | 
| Version: | 0.2.0 | 
| Author: | Mohamed El Fodil Ihaddaden | 
| Maintainer: | Mohamed El Fodil Ihaddaden <ihaddaden.fodeil@gmail.com> | 
| Description: | Creates an HTML vertical timeline from a data frame as an input for 'rmarkdown' documents and 'shiny' applications. | 
| License: | AGPL (≥ 3) | 
| Encoding: | UTF-8 | 
| Imports: | htmltools, glue | 
| RoxygenNote: | 7.1.1 | 
| URL: | https://github.com/feddelegrand7/cronologia | 
| BugReports: | https://github.com/feddelegrand7/cronologia/issues | 
| Suggests: | testthat (≥ 2.0.0), covr | 
| Config/testthat/edition: | 2 | 
| NeedsCompilation: | no | 
| Packaged: | 2021-04-22 18:25:07 UTC; Administrateur | 
| Repository: | CRAN | 
| Date/Publication: | 2021-04-22 18:40:02 UTC | 
Create a Vertical HTML Timeline from a Data Frame
Description
Create a Vertical HTML Timeline from a Data Frame
Usage
create_tml(
  df,
  smr,
  dsc,
  smr_col = "white",
  smr_bgcol = "#002240",
  dsc_col = "#1D1D1D",
  dsc_bgcol = "#FFFFFF",
  dsc_size = "14px",
  open = FALSE
)
Arguments
| df | a data frame containing the necessary information. | 
| smr | the column name that will be used as the summary component. | 
| dsc | the column name that will be used as the description component. | 
| smr_col | text color for the summary component. Defaults to 'white'. | 
| smr_bgcol | background-color for the summary component. Defaults to "#002240". | 
| dsc_col | text color for the description component. Defaults to "#1D1D1D". | 
| dsc_bgcol | background-color for the description component. Defaults to "#FFFFFF". | 
| dsc_size | font size of the description component. Defaults to "14px". | 
| open | logical, whether to open by default the summary components. Default to FALSE | 
Value
A Vertical HTML Time Line Widget
Examples
if(interactive()) {
df <- data.frame(
 date_release = c("May 31, 2005",
                  "July 14, 2008",
                  "July 16, 2012 "),
 description = c("Batman Begins",
                 "The Dark Knight",
                 "The Dark Knight Rises")
)
ui <- fluidPage(
 br(),
 h1("Batman Trigoly Timeline", style = "text-align:center"),
 br(),
 create_tml(df,
           "date_release",
           "description"),
)
server <- function(input, output) {}
shinyApp(ui = ui, server = server)
}
Create a Vertical HTML Timeline with 2 Description Levels from a Data Frame
Description
Create a Vertical HTML Timeline with 2 Description Levels from a Data Frame
Usage
create_tml_2(
  df,
  smr,
  dsc,
  dsc2,
  smr_col = "white",
  smr_bgcol = "#002240",
  dsc_col = "#1D1D1D",
  dsc_bgcol = "#FFFFFF",
  dsc_size = "14px",
  dsc2_col = "#1D1D1D",
  dsc2_bgcol = "#FFFFFF",
  dsc2_size = "14px",
  open = FALSE
)
Arguments
| df | a data frame containing the necessary information. | 
| smr | the column name that will be used as the summary component. | 
| dsc | the column name that will be used as the first description component. | 
| dsc2 | the column name that will be used as the second description component. | 
| smr_col | text color for the summary component. Defaults to 'white'. | 
| smr_bgcol | background-color for the summary component. Defaults to "#002240". | 
| dsc_col | text color for the first description component. Defaults to "#1D1D1D". | 
| dsc_bgcol | background-color for the first description component. Defaults to "#FFFFFF". | 
| dsc_size | font size of the first description component. Defaults to "14px". | 
| dsc2_col | text color for the second description component. Defaults to "#3AD900". | 
| dsc2_bgcol | background-color for the second description component. Defaults to "#FFFFFF". | 
| dsc2_size | font size of the second description component. Defaults to "14px". | 
| open | logical, whether to open by default the summary components. Default to FALSE | 
Value
A Vertical HTML Time Line Widget with 2 Description Levels
Create Vertical HTML Timeline Widget with Images from a Data Frame
Description
Create Vertical HTML Timeline Widget with Images from a Data Frame
Usage
create_tml_img(
  df,
  smr,
  dsc,
  imgsrc,
  imgalt,
  smr_col = "white",
  smr_bgcol = "#002240",
  dsc_col = "#1D1D1D",
  dsc_bgcol = "#FFFFFF",
  dsc_size = "14px",
  imgheight = "150px",
  imgwidth = "150px",
  open = FALSE
)
Arguments
| df | a data frame containing the necessary information. | 
| smr | the column name that will be used as the summary component. | 
| dsc | the column name that will be used as the description component. | 
| imgsrc | the column name indicating the 'href' source of the images. | 
| imgalt | the column name that will be used as 'alt' text for the images. | 
| smr_col | text color for the summary component. Defaults to 'white'. | 
| smr_bgcol | background-color for the summary component. Defaults to "#002240". | 
| dsc_col | text color for the description component. Defaults to "#1D1D1D". | 
| dsc_bgcol | background-color for the description component. Defaults to "#FFFFFF". | 
| dsc_size | font size of the description component. Defaults to "14px". | 
| imgheight | the height of the image. Defaults to "150px". | 
| imgwidth | the width of the image. Defaults to "150px". | 
| open | logical, whether to open by default the summary components. Default to FALSE | 
Value
A Vertical HTML Time Line Widget With Images