sza |>
dplyr::filter(
latitude == 20 &
month == "jan" &
!is.na(sza)
) |>
dplyr::select(-latitude, -month) |>
gt() |>
data_color(
columns = sza,
palette = c("white", "yellow", "navyblue"),
domain = c(0, 90)
) |>
tab_footnote(
footnote = "Color indicates height of sun.",
locations = cells_column_labels(columns = sza)
) |>
tab_options(table.width = px(320)) |>
tab_style(
style = list(
cell_text(size = "smaller"),
cell_fill(color = "gray90")
),
locations = cells_footnotes()
)| tst | sza1 |
|---|---|
| 0700 | 84.9 |
| 0730 | 78.7 |
| 0800 | 72.7 |
| 0830 | 66.1 |
| 0900 | 61.5 |
| 0930 | 56.5 |
| 1000 | 52.1 |
| 1030 | 48.3 |
| 1100 | 45.5 |
| 1130 | 43.6 |
| 1200 | 43.0 |
| 1 Color indicates height of sun. | |