You've already forked etude_lego_jurassic_world
Ajoute l’étape 26 pièces/minifigs
This commit is contained in:
32
scripts/plot_minifig_parts_correlation.py
Normal file
32
scripts/plot_minifig_parts_correlation.py
Normal 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()
|
||||
Reference in New Issue
Block a user