Created
June 24, 2014 01:10
-
-
Save randyzwitch/d0c2be86a8d1809eeb0c to your computer and use it in GitHub Desktop.
Aster Julia Gadfly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Calculate the number of flights per hour per day | |
flights_query = " | |
select | |
calendar_date, | |
hour_utc, | |
sum(1) as num_flights | |
from temp.airline_burst_hour | |
group by 1,2 | |
order by 1,2;" | |
#Bring results into Julia DataFrame | |
flights_per_day = query(flights_query, asterconn) | |
using Gadfly | |
#Create boxplot, with one box plot per hour | |
set_default_plot_size(20cm, 12cm) | |
p = plot(flights_per_day , x="hour_utc", y="num_flights", | |
Guide.xlabel("Hour UTC"), | |
Guide.ylabel("Flights In Air"), | |
Guide.title("Number of Flights In Air To/From U.S. By Hour - 1987"), | |
Scale.y_continuous(minvalue=0, maxvalue=4000), | |
Geom.boxplot) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment