-
Notifications
You must be signed in to change notification settings - Fork 129
Expand file tree
/
Copy pathgreat-docs.yml
More file actions
319 lines (293 loc) · 9.53 KB
/
Copy pathgreat-docs.yml
File metadata and controls
319 lines (293 loc) · 9.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
# Great Docs Configuration for Great Tables
# See https://posit-dev.github.io/great-docs/user-guide/configuration.html
display_name: Great Tables
# Site URL
site_url: "https://posit-dev.github.io/great-tables/"
# Docstring Parser
parser: numpy
# Dynamic Introspection
dynamic: true
# Logo
logo:
light: assets/GT_logo.svg
dark: assets/GT_logo.svg
# Homepage
homepage: index
hero:
logo: assets/GT_logo.svg
logo_height: 200px
tagline: "Absolutely Delightful Table-making in Python"
# Scale-to-fit for Great Tables output
scale_to_fit:
- ".gt_table"
# GitHub Integration
github_style: widget
# Source Links
source:
enabled: true
branch: main
# Changelog
changelog:
enabled: true
# Author Information
authors:
- name: Richard Iannone
role: Maintainer
affiliation: Posit, PBC
email: rich@posit.co
github: rich-iannone
orcid: 0000-0003-3925-190X
- name: Michael Chow
role: Author
affiliation: Posit, PBC
email: michael.chow@posit.co
github: machow
# Funding / Copyright Holder
funding:
name: "Posit Software, PBC"
roles:
- Copyright holder
- funder
homepage: https://posit.co
ror: https://ror.org/03wc8by49
# Custom Sections
sections:
- title: Examples
dir: examples
type: blog
- title: Blog
dir: blog
type: blog
# API Reference Structure
reference:
title: "Reference"
sections:
- title: Table Creation
desc: >
All tables created in Great Tables begin by using `GT()`. With this class, we supply the
input data table and some basic options for creating a stub and row groups (with the
`rowname_col=` and `groupname_col=` arguments). All GT methods are documented on their
own pages.
contents:
- name: GT
members: false
- title: Major structural table parts
desc: >
A table can contain a few useful components for conveying additional information. These
include a header (with a titles and subtitle), a footer (with source notes), and additional
areas for labels (row group labels, column spanner labels, the stubhead label). We can
perform styling on targeted table locations with the
[`tab_style()`](`great_tables.GT.tab_style`) method.
contents:
- GT.tab_header
- GT.tab_spanner
- GT.tab_spanner_delim
- GT.tab_stub
- GT.tab_stubhead
- GT.tab_stub_indent
- GT.tab_footnote
- GT.tab_source_note
- GT.rm_header
- GT.rm_stubhead
- GT.rm_spanners
- GT.rm_footnotes
- GT.rm_source_notes
- GT.tab_style
- GT.tab_options
- title: Formatting column data
desc: >
Columns of data can be formatted with the `fmt_*()` methods. We can specify the rows of
these columns quite precisely with the `rows` argument. We get to apply these methods
exactly once to each data cell (last call wins). Need to do custom formatting? Use the
[`fmt()`](`great_tables.GT.fmt`) method and define your own formatter. The `sub_*()` methods
allow you to perform substitution operations and `data_color()` provides a lot of power for
colorizing body cells based on their data values.
contents:
- GT.fmt_number
- GT.fmt_integer
- GT.fmt_scientific
- GT.fmt_engineering
- GT.fmt_number_si
- GT.fmt_percent
- GT.fmt_partsper
- GT.fmt_currency
- GT.fmt_roman
- GT.fmt_bytes
- GT.fmt_date
- GT.fmt_time
- GT.fmt_datetime
- GT.fmt_duration
- GT.fmt_tf
- GT.fmt_markdown
- GT.fmt_units
- GT.fmt_image
- GT.fmt_flag
- GT.fmt_icon
- GT.fmt_nanoplot
- GT.fmt
- GT.sub_missing
- GT.sub_zero
- GT.sub_small_vals
- GT.sub_large_vals
- GT.sub_values
- GT.data_color
- title: Text transformation
desc: >
The text_*() method take cell data that are solidified into strings and allow for flexible
transformations of those string values. Whereas the `fmt_*()` and `sub_*()` methods are
phases 1 and 2 of cell data metamorphoses, the text transformation functions are the final
phase, acting on strings generated by formatting and substitution functions with no
reference to the source values.
contents:
- GT.text_replace
- GT.text_case_when
- GT.text_case_match
- GT.text_transform
- title: Modifying columns
desc: >
The `cols_*()` methods allow for modifications that act on entire columns. This includes
alignment of the data in columns ([`cols_align()`](`great_tables.GT.cols_align`)), hiding
columns from view ([`cols_hide()`](`great_tables.GT.cols_hide`)), re-labeling the column
labels ([`cols_label()`](`great_tables.GT.cols_label`)), and moving columns around (with the
`cols_move*()` methods).
contents:
- GT.cols_align
- GT.cols_width
- GT.cols_label
- GT.cols_label_with
- GT.cols_label_rotate
- GT.cols_move
- GT.cols_move_to_start
- GT.cols_move_to_end
- GT.cols_reorder
- GT.cols_hide
- GT.cols_unhide
- GT.cols_merge
- GT.cols_merge_uncert
- GT.cols_merge_range
- GT.cols_merge_n_pct
- title: Adding rows
desc: >
The [`summary_rows()`](`great_tables.GT.summary_rows`) function adds rows to summarize
data within each row group, while
[`grand_summary_rows()`](`great_tables.GT.grand_summary_rows`) summarizes across the
entire table.
contents:
- GT.summary_rows
- GT.grand_summary_rows
- title: Location Targeting and Styling Classes
desc: >
Location targeting is a powerful feature of Great Tables. It allows for the precise
selection of table locations for styling (using the `tab_style()` method). The styling
classes allow for the specification of the styling properties to be applied to the
targeted locations.
contents:
- loc.header
- loc.title
- loc.subtitle
- loc.stubhead
- loc.column_header
- loc.spanner_labels
- loc.column_labels
- loc.grand_summary_stub
- loc.stub
- loc.row_groups
- loc.grand_summary
- loc.body
- loc.footer
- loc.source_notes
- style.fill
- style.text
- style.borders
- style.css
- title: Helper Functions
desc: >
An assortment of helper functions is available in the Great Tables package. The `md()`
and `html()` helper functions can be used during label creation with the `tab_header()`,
`tab_spanner()`, `tab_stubhead()`, and `tab_source_note()` methods.
contents:
- GT.with_id
- GT.with_locale
- md
- html
- from_column
- google_font
- system_fonts
- define_units
- nanoplot_options
- title: Table options
desc: >
With the `opt_*()` functions, we have an easy way to set commonly-used table options without
having to use `tab_options()` directly.
contents:
- GT.opt_stylize
- GT.opt_footnote_marks
- GT.opt_row_striping
- GT.opt_align_table_header
- GT.opt_vertical_padding
- GT.opt_horizontal_padding
- GT.opt_all_caps
- GT.opt_table_outline
- GT.opt_table_font
- GT.opt_css
- title: Export
desc: >
There may come a day when you need to export a table to some specific format. A great method
for that is `gtsave()`, which allows us to save the table as a standalone image file or PDF.
You can also get the table code as an HTML fragment with the `*_raw_html()` methods.
contents:
- GT.gtsave
- GT.show
- GT.as_raw_html
- GT.write_raw_html
- GT.as_latex
- title: Pipeline
desc: >
Sometimes, you might want to programmatically manipulate the table while still benefiting
from the chained API that **Great Tables** offers. `pipe()` is designed to tackle this
issue.
contents:
- GT.pipe
- title: Value Formatting Functions
desc: >
If you have single values (or lists of them) in need of formatting, we have a set of
`val_fmt_*()` functions that have been adapted from the corresponding `fmt_*()` methods.
contents:
- vals.fmt_number
- vals.fmt_integer
- vals.fmt_scientific
- vals.fmt_engineering
- vals.fmt_number_si
- vals.fmt_percent
- vals.fmt_partsper
- vals.fmt_currency
- vals.fmt_roman
- vals.fmt_bytes
- vals.fmt_duration
- vals.fmt_date
- vals.fmt_time
- vals.fmt_duration
- vals.fmt_markdown
- vals.fmt_image
- title: Built-in Datasets
desc: >
The Great Tables package is equipped with sixteen datasets that come in all shapes and
sizes. Many examples throughout the help docs use these datasets to quickly demonstrate
the features of the package.
contents:
- data.countrypops
- data.sza
- data.gtcars
- data.sp500
- data.pizzaplace
- data.exibble
- data.towny
- data.peeps
- data.films
- data.metro
- data.gibraltar
- data.constants
- data.illness
- data.reactions
- data.photolysis
- data.nuclides