-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
37 lines (29 loc) · 1020 Bytes
/
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
# Makefile for Data Cleaning
## raw : Download raw data
raw :
curl -o raw-data/2018-New-Coders-Survey.csv \
https://files.gitter.im/FreeCodeCamp/DataScience/gR37/2018-New-Coders-Survey.csv
## eda : Run exploratory data analysis on raw data
eda :
mkdir -p docs
Rscript -e 'rmarkdown::render(here::here("reports", "explore-data.Rmd"), output_file = here::here("docs", "explore-data.html"))'
## clean : Clean and format raw data
clean :
Rscript src/clean-data-2018.R
## readme : Compile RMarkdown README
readme :
Rscript -e 'rmarkdown::render(here::here("README.Rmd"), output_file = here::here("README.md"))'
rm README.html
## tree : Create repository structure for README
tree :
tree >> README.Rmd
## help : Help page for Makefile
help :
@echo ""
@echo "Usage:"
@echo -e "\tmake <target>\n"
@echo -e "Target\t\tDescription"
@echo -e "------\t\t-----------"
@grep '## [A-Za-z]* : [A-Za-z]*' $(MAKEFILE_LIST) | sed 's/## //' | sed 's/: /\t\t/'
.PHONY : raw eda clean readme tree
.DEFAULT_GOAL := help