1

Ajoute l’étape 26 pièces/minifigs

This commit is contained in:
2025-12-02 14:24:16 +01:00
parent 71f3509cc8
commit f23f54d040
6 changed files with 318 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
"""Trace la corrélation entre nombre de pièces et nombre de minifigs par set."""
from pathlib import Path
from lib.plots.minifig_parts_correlation import plot_minifig_parts_correlation
from lib.rebrickable.minifig_parts_correlation import build_correlation_rows, write_correlation_rows
FILTERED_MINIFIG_COUNTS_PATH = Path("data/intermediate/minifig_counts_by_set.csv")
FILTERED_SETS_PATH = Path("data/intermediate/sets_enriched.csv")
ALL_SETS_PATH = Path("data/raw/sets.csv")
INVENTORIES_PATH = Path("data/raw/inventories.csv")
INVENTORY_MINIFIGS_PATH = Path("data/raw/inventory_minifigs.csv")
CORRELATION_PATH = Path("data/intermediate/minifig_parts_correlation.csv")
DESTINATION_PATH = Path("figures/step26/minifig_parts_correlation.png")
def main() -> None:
"""Construit le CSV de corrélation et trace le diagramme comparatif."""
rows = build_correlation_rows(
FILTERED_MINIFIG_COUNTS_PATH,
FILTERED_SETS_PATH,
ALL_SETS_PATH,
INVENTORIES_PATH,
INVENTORY_MINIFIGS_PATH,
)
write_correlation_rows(CORRELATION_PATH, rows)
plot_minifig_parts_correlation(CORRELATION_PATH, DESTINATION_PATH)
if __name__ == "__main__":
main()