Timeline

A pesar de que no se trata de series temporales, hemos incluido en este apartado las líneas de tiempo, un gráfico que nos permite visualizar de forma sencilla una eventos sobre una línea temporal.

Existen dos clases principales: por intervalos o de sobre marcas de tiempo.

Línea temporal basado en intervalos

timeline_data <- dplyr::tribble(
  ~name, ~label, ~description,
  'Apple I', 'April 1976: Apple I and company formation', 'On April 1, 1976, Apple Computer Company was founded by Steve Jobs, Steve Wozniak, and Ronald Wayne.',
  'Apple II', 'August 1976: Apple II was presented', 'Wozniak moved on from the Apple I and began designing a greatly improved computer: the Apple II.',
  'Macintosh','January 1984: Macintosh and the "1984" commercial.', 'On January 24, 1984, the Macintosh went on sale with a retail price of $2,495',
  'Jobs Leaves Apple', '1985: Jobs and Wozniak leave Apple','In April 1985, Sculley decided to remove Jobs as the general manager of the Macintosh division, and gained unanimous support from the Apple board of directors'
)
  
hchart(
    timeline_data,
    type = "timeline"
    )  |>
  hc_xAxis(
    visible = FALSE
  )  |>
  hc_yAxis(
    visible = FALSE
  )  |>
  hc_title(
    text = "Historia de Apple Inc"    
    ) |>
    hc_subtitle(
      text = "Fuente: <a href='https://en.wikipedia.org/wiki/History_of_Apple_Inc.'>www.wikipedia.org</a>'"
    ) |>
    hc_colors(
      RColorBrewer::brewer.pal(6, "Spectral")
    ) |>
    hc_credits(enabled = TRUE, 
               text = "<a href='elartedeldato.com'>El arte del dato bien contado</a>")

Línea temporal basado en fechas

timeline_data <- dplyr::tribble(
  ~x, ~name, ~label, ~description,
  197164800,'Apple I', 'April 1976: Apple I and company formation', 'On April 1, 1976, Apple Computer Company was founded by Steve Jobs, Steve Wozniak, and Ronald Wayne.',
  207705600, 'Apple II', 'August 1976: Apple II was presented', 'Wozniak moved on from the Apple I and began designing a greatly improved computer: the Apple II.',
  473385600, 'Macintosh','January 1984: Macintosh and the "1984" commercial.', 'On January 24, 1984, the Macintosh went on sale with a retail price of $2,495',
  481161600, 'Jobs Leaves Apple', '1985: Jobs and Wozniak leave Apple','In April 1985, Sculley decided to remove Jobs as the general manager of the Macintosh division, and gained unanimous support from the Apple board of directors'
)
  
hchart(
    timeline_data,
    type = "timeline"
    ) |>
  hc_xAxis(
    type = "datetime",
    visible = FALSE
  ) |>
  hc_yAxis(
    visible = FALSE
  ) |>
  hc_title(
    text = "Historia de Apple Inc"    
    ) |>
    hc_subtitle(
      text = "Fuente: <a href='https://en.wikipedia.org/wiki/History_of_Apple_Inc.'>www.wikipedia.org</a>'"
    ) |>
    hc_colors(
      RColorBrewer::brewer.pal(6, "Spectral")
    ) |>
    hc_credits(enabled = TRUE, 
               text = "<a href='elartedeldato.com'>El arte del dato bien contado</a>")