1

Reviens à l’état fbf20e2 sans palettes par set

This commit is contained in:
2025-12-02 16:23:56 +01:00
parent 909a1eae71
commit c0700a8829
11 changed files with 0 additions and 816 deletions

View File

@@ -1,25 +0,0 @@
"""Trace la palette dominante de chaque set (hors minifigs)."""
from pathlib import Path
from lib.plots.set_color_swatches import plot_set_color_swatches
from lib.rebrickable.set_color_swatches import build_top_colors_by_set, load_colors_by_set, load_sets_enriched, write_top_colors
COLORS_BY_SET_PATH = Path("data/intermediate/colors_by_set.csv")
SETS_ENRICHED_PATH = Path("data/intermediate/sets_enriched.csv")
SWATCHES_PATH = Path("data/intermediate/set_color_swatches.csv")
DESTINATION_PATH = Path("figures/step27/set_color_swatches.png")
def main() -> None:
"""Construit le CSV de top couleurs par set et trace le nuancier."""
colors_rows = load_colors_by_set(COLORS_BY_SET_PATH)
sets_lookup = load_sets_enriched(SETS_ENRICHED_PATH)
swatches = build_top_colors_by_set(colors_rows, sets_lookup, top_n=5)
write_top_colors(SWATCHES_PATH, swatches)
plot_set_color_swatches(SWATCHES_PATH, DESTINATION_PATH)
if __name__ == "__main__":
main()

View File

@@ -1,30 +0,0 @@
"""Trace les palettes perceptuelles (top 5) par set hors minifigs."""
from pathlib import Path
from lib.plots.set_color_swatches_perceptual import plot_set_color_swatches_perceptual
from lib.rebrickable.set_color_swatches_perceptual import (
build_perceptual_swatches,
load_colors_by_set,
load_sets_enriched,
write_perceptual_swatches,
)
COLORS_BY_SET_PATH = Path("data/intermediate/colors_by_set.csv")
SETS_ENRICHED_PATH = Path("data/intermediate/sets_enriched.csv")
SWATCHES_PATH = Path("data/intermediate/set_color_swatches_perceptual.csv")
DESTINATION_PATH = Path("figures/step28/set_color_swatches_perceptual.png")
def main() -> None:
"""Construit et trace les palettes perceptuelles par set."""
colors_rows = load_colors_by_set(COLORS_BY_SET_PATH)
sets_lookup = load_sets_enriched(SETS_ENRICHED_PATH)
swatches = build_perceptual_swatches(colors_rows, sets_lookup, top_n=5)
write_perceptual_swatches(SWATCHES_PATH, swatches)
plot_set_color_swatches_perceptual(SWATCHES_PATH, DESTINATION_PATH)
if __name__ == "__main__":
main()