mirror of
https://github.com/koodiklinikka/palkkakysely.git
synced 2026-02-06 23:49:54 +00:00
Prepare makefile for multiple years
This commit is contained in:
34
Makefile
34
Makefile
@@ -1,10 +1,21 @@
|
||||
.PHONY: data/results.xlsx data/results.tsv
|
||||
DATA_DIR := data/2021
|
||||
OUT_DIR := out
|
||||
XLSX_URL := https://docs.google.com/spreadsheets/d/1l-Zgf1HqaFGd8gRA8kQzaxJ3R7eJy29ORUS8pr5o0nk/export?format=xlsx
|
||||
TSV_URL := https://docs.google.com/spreadsheets/d/1l-Zgf1HqaFGd8gRA8kQzaxJ3R7eJy29ORUS8pr5o0nk/export?format=tsv
|
||||
|
||||
out: all-data copy-raw-data copy-massaged-data static charts profiling
|
||||
export DATA_DIR
|
||||
export OUT_DIR
|
||||
|
||||
copy-raw-data: all-data
|
||||
cp data/results.xlsx out/raw.xlsx
|
||||
cp data/results.tsv out/raw.tsv
|
||||
.PHONY: $(DATA_DIR)/results.xlsx $(DATA_DIR)/results.tsv
|
||||
|
||||
all: all-data copy-raw-data copy-massaged-data static charts profiling
|
||||
|
||||
$(OUT_DIR):
|
||||
mkdir -p $(OUT_DIR)
|
||||
|
||||
copy-raw-data: all-data $(OUT_DIR)
|
||||
cp $(DATA_DIR)/results.xlsx $(OUT_DIR)/raw.xlsx
|
||||
cp $(DATA_DIR)/results.tsv $(OUT_DIR)/raw.tsv
|
||||
|
||||
copy-massaged-data: all-data
|
||||
python -m pulkka.copy_massaged_data
|
||||
@@ -18,10 +29,13 @@ charts: all-data
|
||||
profiling: all-data
|
||||
python -m pulkka.generate_profiling
|
||||
|
||||
all-data: data/results.xlsx data/results.tsv
|
||||
all-data: $(DATA_DIR)/results.xlsx $(DATA_DIR)/results.tsv
|
||||
|
||||
data/results.xlsx:
|
||||
curl -fsSL -o $@ "https://docs.google.com/spreadsheets/d/1l-Zgf1HqaFGd8gRA8kQzaxJ3R7eJy29ORUS8pr5o0nk/export?format=xlsx"
|
||||
$(DATA_DIR):
|
||||
mkdir -p $(DATA_DIR)
|
||||
|
||||
data/results.tsv:
|
||||
curl -fsSL -o $@ "https://docs.google.com/spreadsheets/d/1l-Zgf1HqaFGd8gRA8kQzaxJ3R7eJy29ORUS8pr5o0nk/export?format=tsv"
|
||||
$(DATA_DIR)/results.xlsx: $(DATA_DIR)
|
||||
curl -fsSL -o $@ $(XLSX_URL)
|
||||
|
||||
$(DATA_DIR)/results.tsv: $(DATA_DIR)
|
||||
curl -fsSL -o $@ $(TSV_URL)
|
||||
|
||||
Reference in New Issue
Block a user