-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
49 lines (38 loc) · 1.26 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
36
37
38
39
40
41
42
43
44
45
46
47
48
#Makefile
# Variables
RAW_DATA=data/bank-additional-full.csv
CLEANED_DATA=data/cleaned_bank_data.csv
EDA_PLOTS=results/data_info.csv \
results/decision_tree_high_res.png \
results/eda_age_dist.png \
results/eda_campaign_dist.png \
results/eda_correlation.png \
results/eda_duration_dist.png \
results/eda_previous_dist.png \
results/eda_scatterplot.png \
results/eda_target_dist.png
REPORT=reports/bank_marketing_analysis.pdf
ENV_NAME=bankenv
# Targets
all: $(REPORT)
# Data download
$(RAW_DATA):
python src/01_download.py --directory data/ --filename bank-additional-full.csv
# Data cleaning
$(CLEANED_DATA): $(RAW_DATA)
python src/02_clean_data.py --input_path $(RAW_DATA) --output_path $(CLEANED_DATA)
# Exploratory analysis
$(EDA_PLOTS): $(CLEANED_DATA)
python src/03_explory_analysis.py --cleaned_data_path $(CLEANED_DATA) --output_prefix results/eda
# Report generation
$(REPORT): $(EDA_PLOTS)
quarto render reports/bank_marketing_analysis.qmd --to pdf
# Set up environment
environment:
conda env create -f environment.yml
# Clean intermediate and final files
clean:
rm -f $(CLEANED_DATA) $(EDA_PLOTS) $(REPORT) reports/bank_marketing_analysis_files/*.png
# Run tests
test:
pytest test/