We should alter the way that users provide the cover table to make it more user-friendly and intuitive. This will be a breaking change.
Currently, the information on the cover page should be aranged so there's a title, then subtitle-body pairs down the sheet. This is because the styling functions are naive and apply alternating title style then body style.
Here's what the table currently looks like for the built-in lfs_tables object:
> filter(lfs_tables, sheet_type == "cover") |> pull(table)
[[1]]
# A tibble: 17 × 1
A
<chr>
1 "Labour market overview, UK: December 2020"
2 "Publication dates"
3 "The next publication was published at 7:00am 26 January 2021."
4 "Note on weighting methodology"
5 "More information about the impact of COVID19 on the Labour Force Survey"
6 "Dataset identifier codes"
7 "The four-character identification codes appearing in the tables are the ONS' references for the data series."
...
Rows 2 and 3 are a subtitle/body pair, so are rows 4 and 5, etc.
In other words, the users needs to supply a single-column dataframe (where the column name doesn't matter) for the cover sheet when constructing their a11ytable object. I think this is pretty unintuitive.
Better:
supply the information in two columns
column 1 is subtitle and column 2 is sub_body, or something
each subtitle-body pair is therefore a row of information
For example:
> tibble::tribble(
+ ~subtitle, ~sub_body,
+ "Publication dates", "The next publication was published at 7:00am 26 January 2021.",
+ "Note on weighting methodology", "More information about the impact of COVID19 on the Labour Force Survey",
+ "Dataset identifier codes", "The four-character identification codes appearing in the tables are the ONS' references for the data series."
+ )
# A tibble: 3 × 2
subtitle sub_body
<chr> <chr>
1 Publication dates The next publication was published at 7:00am 26 January 2021.
2 Note on weighting methodology More information about the impact of COVID19 on the Labour Force Survey
3 Dataset identifier codes The four-character identification codes appearing in the tables are the ONS' references for the data…
The logic of create_a11y_wb() can then handle the translation of this format into the single column required during workbook construction.
We should alter the way that users provide the cover table to make it more user-friendly and intuitive. This will be a breaking change.
Currently, the information on the cover page should be aranged so there's a title, then subtitle-body pairs down the sheet. This is because the styling functions are naive and apply alternating title style then body style.
Here's what the table currently looks like for the built-in
lfs_tables
object:Rows 2 and 3 are a subtitle/body pair, so are rows 4 and 5, etc.
In other words, the users needs to supply a single-column dataframe (where the column name doesn't matter) for the cover sheet when constructing their a11ytable object. I think this is pretty unintuitive.
Better:
subtitle
and column 2 issub_body
, or somethingFor example:
The logic of
create_a11y_wb()
can then handle the translation of this format into the single column required during workbook construction.