You've already forked etude_lego_jurassic_world
Ajoute le graphique du nombre de minifigs par set
This commit is contained in:
24
scripts/plot_minifigs_per_set.py
Normal file
24
scripts/plot_minifigs_per_set.py
Normal file
@@ -0,0 +1,24 @@
|
||||
"""Trace le nombre de minifigs par set filtré."""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from lib.plots.minifig_counts import plot_minifigs_per_set
|
||||
from lib.rebrickable.minifig_counts import build_minifig_counts_by_set, write_minifig_counts
|
||||
|
||||
|
||||
SETS_PATH = Path("data/intermediate/sets_enriched.csv")
|
||||
PARTS_FILTERED_PATH = Path("data/intermediate/parts_filtered.csv")
|
||||
PARTS_CATALOG_PATH = Path("data/raw/parts.csv")
|
||||
COUNTS_PATH = Path("data/intermediate/minifig_counts_by_set.csv")
|
||||
DESTINATION_PATH = Path("figures/step20/minifigs_per_set.png")
|
||||
|
||||
|
||||
def main() -> None:
|
||||
"""Construit le CSV de comptage des minifigs et trace le graphique associé."""
|
||||
counts = build_minifig_counts_by_set(SETS_PATH, PARTS_FILTERED_PATH, PARTS_CATALOG_PATH)
|
||||
write_minifig_counts(COUNTS_PATH, counts)
|
||||
plot_minifigs_per_set(COUNTS_PATH, DESTINATION_PATH)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user