1
etude_lego_jurassic_world/scripts/plot_part_rarity.py

26 lines
1.1 KiB
Python

"""Trace le diagramme des pièces rares pour l'étape 34."""
from pathlib import Path
from lib.plots.part_rarity import plot_part_rarity, plot_printed_exclusive_parts
PART_RARITY_TOP_PATH = Path("data/intermediate/part_rarity_exclusive.csv")
DESTINATION_PATH = Path("figures/step34/part_rarity.png")
RESOURCES_DIR = Path("figures/rebrickable")
PART_RARITY_NO_PRINT_PATH = Path("data/intermediate/part_rarity_exclusive_no_print.csv")
DESTINATION_NO_PRINT = Path("figures/step34/part_rarity_no_print.png")
PART_RARITY_FULL_PATH = Path("data/intermediate/part_rarity.csv")
DESTINATION_PRINTED_COLLAGE = Path("figures/step34/printed_exclusive_parts.png")
def main() -> None:
"""Charge le top des pièces rares et produit le graphique illustré."""
plot_part_rarity(PART_RARITY_TOP_PATH, DESTINATION_PATH, resources_dir=RESOURCES_DIR)
plot_part_rarity(PART_RARITY_NO_PRINT_PATH, DESTINATION_NO_PRINT, resources_dir=RESOURCES_DIR)
plot_printed_exclusive_parts(PART_RARITY_FULL_PATH, DESTINATION_PRINTED_COLLAGE, resources_dir=RESOURCES_DIR)
if __name__ == "__main__":
main()