Beautiful tables

Truyền đạt bằng Dữ liệu trong Tidyverse

Timo Grossenbacher

Data Journalist

Truyền đạt bằng Dữ liệu trong Tidyverse

Truyền đạt bằng Dữ liệu trong Tidyverse

YAML header to the rescue!

 ---
 title: "The reduction in weekly working hours in Europe" 
 subtitle: "Looking at the development between 1996 and 2006"
 author: "Timo Grossenbacher"
 output: 
   html_document:
     theme: cosmo
     highlight: monochrome
     toc: true
     toc_float: false
     toc_depth: 4
     code_folding: hide
     css: styles.css

df_print: kable ---
    df_print: paged
 ---
Truyền đạt bằng Dữ liệu trong Tidyverse

The second option

# Some summary statistics
ilo_data %>%
  filter(country == "Switzerland" & year > 2000) %>% 

knitr::kable()

Truyền đạt bằng Dữ liệu trong Tidyverse

Styling tables

<table>
  <thead>
   ...
  </thead>
  <tbody>
   ...
  </tbody>
</table>
Truyền đạt bằng Dữ liệu trong Tidyverse

Styling tables

<table>
  <thead>
   <tr>
     ...
   </tr>
  </thead>
  <tbody>
   <tr>
     ...
   </tr>
   <tr>
     ...
   </tr>
  </tbody>
</table>
Truyền đạt bằng Dữ liệu trong Tidyverse

Styling tables

<table>
  <thead>
   <tr>
     <th>Column 1</th><th>Column 2</th>
   </tr>
  </thead>
  <tbody>
   <tr>
     <td>Cell 1</td><td>Cell 2</td>
   </tr>
   <tr>
     ...
   </tr>
  </tbody>
</table>
Truyền đạt bằng Dữ liệu trong Tidyverse

Let's practice!

Truyền đạt bằng Dữ liệu trong Tidyverse

Preparing Video For Download...