This is a collection of scripts and templates I use to collect data from The Hive's Rock Gym Pro booking page and make illustrations. The scripts make use of Ruby, R, Nemerle (a .NET language), and Inkscape. The scripts generate three types of illustrations: schedule, fast bookings, and timelines.
Creates an illustration colour-coding The Hive's schedule by the speed with which each slot fills up.
- Run
dl.rb
for a week to record the status of every slot every minute. The script records data to disk once a day. - Run
consolidate.rb
to combine the daily records into a single file. - Run
update schedule.rb
to fill the SVG templateschedule.svg
with the collected data. The result is written toanalysis/schedule.svg
.
Creates a diagram These scripts use the file produced by consolidate.rb
to get the slot schedule. It is enough to run dl.rb
only briefly to get enough data for this. However, time starts.rb
benefits from running for one or more weeks.
- Run
get schedule.rb
to get the slot schedule from the consolidated file. - Run
time starts.rb
to randomly visit each slot several times near its start. - Run
analyze starts.r
to generate a density plot for fast starts inanalysis/starts.svg
. - Incorporate the plot into
fast booking.svg
.
Creates an illustration showing each slot's status during the whole duration it is available. These scripts use the file produced by consolidate.rb
to get slot status statistics. Run dl.rb
for two weeks to gather the data.
- Compile and run
plot timelines.n
to produce cancellation statistics and the slot diagram inanalysis/timelines.png
. - Run
analyze timelines.r
to generate the slot availability density plot inanalysis/cancels.svg
. - Incorporate the diagrams into
timelines.svg
.