color-stream-viz / Makefile

#
# Makefile
#

COLORSET = inputs/colorset
N_CORES = 8
MEMORY = 1G

default: \
	outputs/pairs.normed \
	outputs/color_weekly_hue.js \
	outputs/color_weekly_popularity.js \
	outputs/color_monthly_hue.js \
	outputs/color_monthly_popularity.js \

outputs/dates.sorted: inputs/dates
	sort -n --parallel=$(N_CORES) -S $(MEMORY) $< >$@.tmp
	mv -f $@.tmp $@

outputs/colors.sorted: inputs/colors
	sort -n --parallel=$(N_CORES) -S $(MEMORY) $< >$@.tmp
	mv -f $@.tmp $@

outputs/colors.dated: outputs/colors.sorted outputs/dates.sorted src/join_dates_colors.py
	python src/join_dates_colors.py outputs/colors.sorted outputs/dates.sorted outputs/

outputs/colors.dated.sorted: outputs/colors.dated
	sort -n --parallel=$(N_CORES) -S $(MEMORY) $< >$@.tmp
	mv -f $@.tmp $@

outputs/colors.dated.normed: outputs/colors.dated.sorted src/normalize_colors.py $(COLORSET)
	pv -a --progress --eta $< | python src/normalize_colors.py $(COLORSET) >$@.tmp
	mv -f $@.tmp $@

outputs/pairs.normed: outputs/colors.dated.normed src/pairwise_numbers.py
	pv -a --progress --eta $< | python src/pairwise_numbers.py >$@.tmp
	mv -f $@.tmp $@

outputs/colors.monthly: outputs/colors.dated.normed src/groupbymonth_mapper.py src/groupbymonth_reducer.py
	pv -a --progress --eta $< | python src/groupbymonth_mapper.py | sort --parallel=$(N_CORES) -S $(MEMORY) | python src/groupbymonth_reducer.py >$@.tmp
	mv -f $@.tmp $@

outputs/colors.weekly: outputs/colors.dated.normed src/groupbyweek_mapper.py src/groupbymonth_reducer.py
	pv -a --progress --eta $< | python src/groupbyweek_mapper.py | sort --parallel=$(N_CORES) -S $(MEMORY) | python src/groupbymonth_reducer.py >$@.tmp
	mv -f $@.tmp $@

outputs/color_weekly_hue.js: outputs/colors.weekly src/stream_viz.py
	pv outputs/colors.weekly | python src/stream_viz.py -o hue >$@.tmp
	mv -f $@.tmp $@

outputs/color_weekly_popularity.js: outputs/colors.weekly src/stream_viz.py
	pv outputs/colors.weekly | python src/stream_viz.py -o popularity >$@.tmp
	mv -f $@.tmp $@

outputs/color_monthly_hue.js: outputs/colors.monthly src/stream_viz.py
	pv outputs/colors.monthly | python src/stream_viz.py -o hue >$@.tmp
	mv -f $@.tmp $@

outputs/color_monthly_popularity.js: outputs/colors.monthly src/stream_viz.py
	pv outputs/colors.monthly | python src/stream_viz.py -o popularity >$@.tmp
	mv -f $@.tmp $@
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.