You've already forked etude_lego_jurassic_world
Ajoute les agrégats et visualisations globales des couleurs de têtes
This commit is contained in:
29
scripts/compute_global_minifig_heads.py
Normal file
29
scripts/compute_global_minifig_heads.py
Normal file
@@ -0,0 +1,29 @@
|
||||
"""Agrégation globale des couleurs de têtes de minifigs (catalogue complet)."""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
from lib.rebrickable.global_minifig_heads import aggregate_global_heads_by_year, write_global_heads_by_year
|
||||
|
||||
|
||||
INVENTORIES_PATH = Path("data/raw/inventories.csv")
|
||||
INVENTORY_PARTS_PATH = Path("data/raw/inventory_parts.csv")
|
||||
PARTS_PATH = Path("data/raw/parts.csv")
|
||||
COLORS_PATH = Path("data/raw/colors.csv")
|
||||
SETS_PATH = Path("data/raw/sets.csv")
|
||||
DESTINATION_PATH = Path("data/intermediate/global_minifig_heads_by_year.csv")
|
||||
|
||||
|
||||
def main() -> None:
|
||||
"""Construit l'agrégat mondial des têtes de minifigs par couleur et année."""
|
||||
heads_by_year = aggregate_global_heads_by_year(
|
||||
INVENTORIES_PATH,
|
||||
INVENTORY_PARTS_PATH,
|
||||
PARTS_PATH,
|
||||
COLORS_PATH,
|
||||
SETS_PATH,
|
||||
)
|
||||
write_global_heads_by_year(DESTINATION_PATH, heads_by_year)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user