Customizing the report
In some situations, a user might want to customize the appearance
of the report to match personal preferences or a corporate brand.
ydata-profiling
offers two major customization dimensions:
the styling of the HTML report and the styling of the visualizations
and plots contained within.
Customizing the report's theme
Several aspects of the report can be customized. The table below shows the available settings:
Parameter | Type | Default | Description |
---|---|---|---|
html.minify_html |
bool | True |
If True , the output HTML is minified using the htmlmin package. |
html.use_local_assets |
bool | True |
If True , all assets (stylesheets, scripts, images) are stored locally. If False , a CDN is used for some stylesheets and scripts. |
html.inline |
boolean | True |
If True , all assets are contained in the report. If False , then a web export is created, where all assets are stored in the '[REPORT_NAME]_assets/' directory. |
html.navbar_show |
boolean | True |
Whether to include a navigation bar in the report |
html.style.theme |
string | None |
Select a bootswatch theme. Available options: flatly (dark) and united (orange) |
html.style.logo |
string | nan | A base64 encoded logo, to display in the navigation bar. |
html.style.primary_color |
string | #337ab7 | The primary color to use in the report. |
html.style.full_width |
boolean | False |
By default, the width of the report is fixed. If set to True , the full width of the screen is used. |
See the available changing settings to see how to change and apply these settings.
Customizing the visualizations
Plot rendering options
A way how to pass arguments to the underlying matplotlib
visualization
engine is to use the plot
argument when computing the profile.
It is possible to change the default format of images to png (default is SVG)
using the key-pair image_format: "png"
and also the resolution of the images using dpi: 800
.
An example would be:
Customize plots rendering | |
---|---|
Pie charts
Pie charts are used to plot the frequency of categories in categorical
(or boolean) features. By default, a feature is considered as categorical
if it does not have more than 10 distinct values. This threshold can be
configured with the plot.pie.max_unique
setting.
Control pie charts frequency | |
---|---|
If the feature is not considered as categorical, the pie chart will not be
displayed. All pie charts can therefore be removed by setting: plot.pie.max_unique = 0
.
The pie chart's colors can be configured to any recognised matplotlib colour plot.pie.colors
setting.
Control pie charts colors | |
---|---|
Colour palettes
The palettes used in visualizations like correlation matrices and missing
values overview can also be customized via the plot
argument. To customize
the palette used by the correlation matrix, use the correlation
key:
ydata-profiling
accepts all cmap
values (colormaps) accepted by matplotlib
.
The list of available colour maps can be accessed here.
Alternatively, it is possible to create custom palettes.