<jupyter_start><jupyter_text>Creating Layers (Without Data)<jupyter_code>figure = plt.figure(figsize = (10, 8))
gridSpecMaster = mpl.gridspec.GridSpec(4, 2, height_ratios = [1, 2, 8, 2])

# Layer 01 - Title
gridSpec01 = mpl.gridspec.GridSpecFromSubplotSpec(1, 1, subplot_spec = gridSpecMaster[0, :])
axesTitle = figure.add_subplot(gridSpec01[0])

# Layer 2 - Price
gridSpec02 = mpl.gridspec.GridSpecFromSubplotSpec(1, 1, subplot_spec = gridSpecMaster[1, :])
axesPrices = figure.add_subplot(gridSpec02[0])

# Layer 3.1 - Risks
gridSpec0301 = mpl.gridspec.GridSpecFromSubplotSpec(2, 2, height_ratios = [2, 1], subplot_spec = gridSpecMaster[2, :1])
axesRiskAndLoss = figure.add_subplot(gridSpec0301[0, :])
axesRisk = figure.add_subplot(gridSpec0301[1, :1])
axesLoss = figure.add_subplot(gridSpec0301[1:, 1])

# Layer 3.2 - Radar
gridSpec0302 = mpl.gridspec.GridSpecFromSubplotSpec(1, 1, subplot_spec = gridSpecMaster[2, 1])
axesRadar = figure.add_subplot(gridSpec0302[0])

# Layer 4 - MPG
gridSpec04 = mpl.gridspec.GridSpecFromSubplotSpec(1, 1, subplot_spec = gridSpecMaster[3, :])
axesMpg = figure.add_subplot(gridSpec04[0])

# Layer Join
gridSpecMaster.tight_layout(figure)
plt.show()<jupyter_output><empty_output><jupyter_text>Dashboard Creation<jupyter_code>figure = plt.figure(figsize = (15, 25))
gridSpecMaster = mpl.gridspec.GridSpec(5, 2, height_ratios = [100, 100, 100, 100, 150], hspace = 0, wspace = 0)

# Layer 01 - priceByManufacturer
gridSpec01 = mpl.gridspec.GridSpecFromSubplotSpec(1, 1, subplot_spec = gridSpecMaster[0, :])

axes = figure.add_subplot(gridSpec01[0])
cf_plot.priceByManufacturer(figure, pdData = pdMajorManufacturers, axes = axes)

# Layer 02 - inverseRiskinessByManufacturer and inverseLossesByManufacturer
gridSpec02 = mpl.gridspec.GridSpecFromSubplotSpec(1, 2, subplot_spec = gridSpecMaster[1, :])

axes = figure.add_subplot(gridSpec02[0, 0])
cf_plot.inverseRiskinessByManufacturer(figure, pdData = pdNormalized, axes = axes, legend = False, rotateTicks = True)

axes = figure.add_subplot(gridSpec02[0, 1])
cf_plot.inverseLossesByManufacturer(figure, pdData = pdNormalized, axes = axes,legend = False, rotateTicks = True)

# Layer 03 - inverseRiskinessAndLossesCombinedByManufacturer
gridSpec03 = mpl.gridspec.GridSpecFromSubplotSpec(1, 1, subplot_spec = gridSpecMaster[2, :])

axes = figure.add_subplot(gridSpec03[0])
cf_plot.inverseRiskinessAndLossesCombinedByManufacturer(figure, pdData = pdNormalized, axes = axes)

# Layer 04 - mpgByManufacturer
gridSpec04 = mpl.gridspec.GridSpecFromSubplotSpec(1, 1, subplot_spec = gridSpecMaster[3, :])

axes = figure.add_subplot(gridSpec04[0])
cf_plot.mpgByManufacturer(figure, pdData = pdMajorManufacturers, axes = axes)

# Layer 05 - radarByManufacturer
gridSpec05 = mpl.gridspec.GridSpecFromSubplotSpec(
    3, 6, 
    height_ratios = [1, 10, 10], 
    wspace = 0.25, 
    hspace = 1.25, 
    subplot_spec = gridSpecMaster[4, :])

(rows, cols) = geometry = gridSpec05.get_geometry()
title_axes = figure.add_subplot(gridSpec05[0, :])
inner_axes = []
projection = cf_radar.RadarAxes(spokeCount = len(pdNormalized.groupby("manufacturer").mean().columns))
[inner_axes.append(figure.add_subplot(m, projection = projection)) for m in [n for n in gridSpec05][cols:]]
cf_plot.radarByManufacturer(
    figure, 
    pdData = pdNormalized, 
    titleAxes = title_axes, 
    innerAxes = inner_axes, 
    legendAxes = False, 
    geometry = geometry)

# Layer Join
gridSpecMaster.tight_layout(figure)
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12125534950071326, 'fraction_numerical': 0.04964336661911555, 'mean_word_length': 6.381052631578948, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '492841', 'license': 'MIT', 'n_tokens_mistral': 1475, 'n_tokens_neox': 1300, 'n_words': 229, 'path': 'modules/02-data-organization-and-visualization/16-automobile-dashboard.ipynb', 'repo_name': 'cfascina/rtaps', 'size': '3505'}