-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
35 lines (27 loc) · 1.03 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Makefile
help:
@echo ""
@echo "usage: make COMMAND"
@echo ""
@echo "Commands:"
@echo " clean Deletes all created files"
@echo " concat Concatenates items and reviews from 2019 and 2021 to create a single file for items (data/items_all.csv) and reviews (data/reviews_all.csv)"
@echo " clean_up Refine the previous CSV files, generating data/items_clean.csv and data/reviews_clean.csv"
@echo " seed Create seed.sql from the clean files, to seed the database with brands, items and reviews"
@echo " stats Create PNGs with some graphic visualiztion of the clean data"
@echo " json Merge items and reviews CSVs to a single nested JSON file"
all: stats seed json
json: clean_up
python3 scripts/merge_json.py
stats: clean_up
python3 scripts/stats.py
seed: clean_up
python3 scripts/seed.py
clean_up: concat
python3 scripts/clean_details.py
python3 scripts/clean_items.py
python3 scripts/clean_reviews.py
concat:
python3 scripts/concat.py
clean:
rm -rf data/items_*.* data/reviews_*.* data/details_*.* db/seed.sql stats/*.png