Showing posts with label Airports. Show all posts
Showing posts with label Airports. Show all posts

Saturday, 29 September 2018

Visualising the Taxi Times

I've created a quick Tableau Public story to show and explain some of the CODA taxi time data (see previous blog post).

Since I last looked, Tableau have added in-built support for airport codes as geocodes, so mapping is just getting easier. But I still find I can't decide whether to stick to tidy data (in the R tidyverse sense: one value per row) or have more columns; there seem to be graphs in Tableau that I can draw with one and not the other, or vice versa.


Friday, 28 September 2018

How long will I taxi at at airport?

CODA Taxi Times
Eurocontrol/CODA has been publishing aircraft taxi times by airport for some years. These are calculated, to the nearest minute, from flight-by-flight data provided to CODA by airlines and airports. Airports are included where CODA receives data on more than 100 flights, so it covers airports small and large, mostly in Europe, but some non-European ones with direct flights to Europe.
Taxi out is the time from pushback from the gate, to take off. Taxi in the time from landing to on-blocks at the gate. (With some minor variation for remote stands..)
I've now published in github some R code for scraping all of these data into a single, tidy dataset. The graph gives an example for 5 big European airports: showing how taxi-in times are shorter than taxi-out, but that there has been little variation over the years (or for that matter between seasons).

After each IATA season (Summer = end March-end October, Winter), CODA publishes 4 reports: taxi-in times, taxi-out times, and the same, but split by ICAO wake turbulence category (WTC). The files were pdf for the first few years, now xlsx.
This project was for me a learning exercise in web-scraping, and in using git and github. 
However, the pdf reports by WTC were difficult to read because of the row alignment in the tables, so these are not currently included. Perhaps tabulizer would handle this, but I gave up after wasting some hours trying to get its java to work on my machine, and parsed the tables manually from the text, instead!

Saturday, 2 September 2017

Passenger update, finally

It seems it's always October before the last calendar year is complete. 2017 seems no exception. 

I have updated the passenger data from Eurostat in the dashboard. Congratulations to the Netherlands for already providing data as far as April 2017. Six laggards are still short of data in 2016. October, maybe.


Sunday, 9 October 2016

Routes of A350 and B787 - updated visualisation

The latest version of the routes map has been updated to use great circle links between airports. There seem to be 2 options for this - getting Tableau or R to do the work. Getting R to do the work was easier for me (just an application of gcIntermediate()) than getting to grips with interpolation functions in Tableau. The cost is that you pass a lot of extra data. I suppose I could have used 2 files and done a join in Tableau instead, but the volumes are not huge. 

There are tableau workbooks around to do the work, but from tableau public it doesn't seem to be possible to open and copy the calculations as suggested.


Saturday, 8 October 2016

Tableau visualisation of routes by new aircraft types: B787 and A350

The previous post gave a glimpse of the technical, R, side of processing some data compiled by spotters of where the new aircraft, B787 and A350, are flying. The R took a while to get right, but once the data were compiled, getting them into Tableau was a breeze.

There's a beta version here. Beta, mostly in the sense that there are still 1 or 2 glitches in the geo-coding of the data (so in R), but I thought it might be easier to see them given a Tableau map. I like the way the graph on the left acts as a filter for the map - for example comparing the routes of ANA and Japan Airlines.

And beta too, probably because the viz could also be improved. Comments welcome.

 

Interpreting loosely formatted aviation text

This is a short, technical account of using the NLP package of R to interpret some 'loosely-formatted' text about services offered by airlines. In the text, airports are sometimes mentioned by IATA 3-letter code, sometimes by a text name, and not always the same name.

It took a while to get my head around how NLP (and OpenNLP) work. The manual entries are accurate, but that's with hindsight. So I hope the following helps.

I built a natural entity labeller, but first had to work out how the entity annotator syntax works. This is an example of perhaps the simplest possible one, that labels everything as the entity 'all'.

identity_tokenizer <- function(s) {
  #log all words together as one single entity, type 'all'
  #the extent is measured here in words, not characters
  Annotation(1, "all", 1L, length(s))
}

identity_entity_annotator <- Simple_Entity_Annotator(identity_tokenizer)


For each line of text, eg "Delhi DEL – HKG Hong Kong – KIX Osaka Kansai (Commenced)" I used the sledgehammer approach of OpenNLP

AnnSentWord <- list(Maxent_Sent_Token_Annotator(),

                           Maxent_Word_Token_Annotator())
el <- NLP::annotate(as.String(r), AnnSentWord)

        
to get r annotated as sentence and words. Then I invoked my new annotator, which looks for airports (3-letter IATA codes, or 4-letter ICAO codes, or 1-n word names) and labels these as 'airport', with the ICAO code as a 'feature'.

el2 <- NLP::annotate(as.String(r), AP_entity_annotator, el)

        
For some reason, adding this to 'pipe' of sentence and word annotation always failed. The annotator itself is fairly mechanical, using lookup environments (see list2env()) since the guidance on-line is that these are relatively fast - and in my own tests they were about 30 times faster than simple subsetting of dataframes.

The answers are deterministic, not probabilistic, but are based on a likelihood order: 4-letter and 3-letter upper case matches are unlikely by chance; longer name matches 'Santiago de Chile' take precedence over shorter ones 'Santiago'; airports with more traffic are more likely than quieter ones. On average, I had about 4 names per airport.

It's not the most sophisticated application of NLP, but you have to start somewhere!



Sunday, 25 September 2016

Thorn Plot, for visualising head winds, final version

Continuing the short series on plotting headwinds, perhaps you prefer the 'thorn plot' version, in which the relative frequency of wind from a particular direction is represented both by transparency of colour and also by the width of the triangle.


For this version, I finally remembered to normalise the number of observations between locations. There are more records for some airports than others, but this is irrelevant for the graph, so I rescale.


Saturday, 24 September 2016

Final daisy plot for visualising head wind when cycling.

Got there in the end. I know he guidance is that colour is not the best way to show variation, but this 'daisy plot' works for me, and is less untidy than the 'thorn' variation.

The curved line comes from those explicitly drawn by ggplot in the geom_poly statement, so repeating the start point of the poly gave me a balanced curve on both sides (which gives a clue as to how to get straight lines, but I'm sticking with this version).

Quite a lot of ggplot in the end:

ggplot(y8p , aes(x, y, group = windHead, alpha = numObs)) + 
  scale_alpha(range = c(0.3, 1), breaks = seq(0, 24000, by = 4000)) + 
  geom_polygon(fill = "blue") +
  xlab("Angle = Wind heading (deg) ") + 
  ylab("Mean wind speed (km/h)") +
  labs(alpha = "Observations") +
  coord_polar(start = -pi/8) + 
  scale_y_reverse(limits = c(maxKMH, 0)) + 
  scale_x_continuous(limits = c(-22.5,337.5), breaks = NULL) +
  geom_label(aes(x=0, y = maxKMH, label = station), colour = "black",
             show.legend = FALSE) +
  #theme(legend.position = c(1,0), legend.justification = c(1,0)) + 
  theme(strip.background = element_blank(),
        strip.text.x = element_blank()) +
  facet_wrap( ~ station)

For which, the y8p data looks like this. Note that I've created 4 lines for each real line of data - and x and y give the 4 points used in the polygon for each real point of data.

  station windHead   windKPH numObs     x         y
    <chr>   <fctr>     <dbl>  <int> <dbl>     <dbl>
1    EBBR        0  9.167982   7190   0.0  9.167982
2    EBBR        0  9.167982   7190  22.5  0.000000
3    EBBR        0  9.167982   7190 -22.5  0.000000
4    EBBR        0  9.167982   7190   0.0  9.167982
5    EBBR       45 10.177946   7358  45.0 10.177946
6    EBBR       45 10.177946   7358  67.5  0.000000

Tuesday, 2 August 2016

Eurostat air passenger data updated again

I've been having issues loading the Eurostat data with the R package RJSDMX - always timing out at work, and a different configuration error at home. 

In the meantime, the R package 'eurostat' has come along, so I've converted to using this to exploit Eurostat's newish bulk download interface. (Again time-out problems trying to use anything like a filter on this - suggestions are welcome. Could be linked to firewall issues at work but no time to investigate this.)

Anyway, the pax data are now updated (using avia_par_xx). 2015 would be complete, but Poland is missing Q4. 




Thursday, 5 May 2016

Air passenger data updated

I've also updated the passenger data. Again, all states seem to have provided data up to at least June 2015. See the link above.

For those of you using SDMX, there are more code changes to download these data:
  • PASS_BRD_DEP has become PAS_BRD_DEP
  • PASS_ST_DEP has become ST_PAS_DEP
  • PASS_CAF_DEP has become CAF_PAS_DEP

Cargo updated

It's been a while since I updated the cargo dashboard in Tableau.
Now it has the latest 2015 data. These are complete for 31 states from Jan 2008 to June 2015. There is already data for 20 states in December 2015, but we'll have to wait for the full 2015 data.

See the link at the top of the page for access to Tableau.

If any of you are using SDMX to access these Eurostat aviation data (avia_gor_xx), note that they've changed a code for one of the dimensions: from FRM_CAF_DEP to CAF_FRM_DEP. Obvious! Apart from that the update process was smooth (thanks to the RJSDMX package maintainers in R, and all the other R and Tableau folk).


Sunday, 21 February 2016

Handling odd data

In the avia_par_xx data from Eurostat there are a number of odd values, particularly from France (missing seat counts in some years) or Greece (fewer seats than passengers, which sounds uncomfortable!).

I would like to follow Eurostat's lead and not just throw such observations in the datasets away - they are official, after all. So these numbers are included in total seat and total flight counts, but I've had another try at making the load factor and seats/flight calculations more robust to such issues.

Just a reminder that I use the load factor formula that is not weighted by distance (passengers/seats, not RPK/ASK).

Now I've tried to trap the odd data values, and set them to NULL in the numerator, and 1 in the denominator, so that they have little effect when aggregated into region averages, for example. 

But you'll still see France and Greece graphs doing some odd things.

Sunday, 24 January 2016

Flow-control in the flight data!

In tableau, I've not got the functionality out of geographical hierarchies that I was expecting (maybe I'm not doing it right). So instead, I've built a set of prompts that now allow you to look at flows of flights at a variety of different levels of aggregation such as airport-airport, airport-region, airport-country, or country-country.

Not as difficult as I thought it would be, but hat-tip to vizpainter for putting me on the right track.

So check out the new tab in the 'pax' dashboard, that focuses on load factors and aircraft size!

European Flight Data updated

The 'pax' dashboard of European flight data from Eurostat has been updated with 2015 - not all available yet, and I had some difficult loading EL, FR and NO, so these countries only go to 2014.


Saturday, 24 October 2015

Improved Passenger Dashboard

To celebrate the completion of the 2014 data from Eurostat, I've reorganised the passenger dashboard so departures from Europe (EU28/EFTA) and arrivals outside Europe are available in a single tab. (Previously they were in 2 separate tabs.)

So if you select Copenhagen, say, you'll see all the flights departing Copenhagen (with passenger and flight counts, seat counts and load factors). If you select JFK, say, you'll see all arrivals at JFK from European airports.

Unfortunately, this data set does not include Turkey as a departure point, so for Turkish airports you can only see arrivals from EU28/EFTA airports.

(I plan to make the same simplification for cargo too, in future.)


Sunday, 4 October 2015

2014 data are complete, finally!

The passenger and cargo data from Eurostat have finally been updated, so I've updated them in the main dashboards. 2014 data are complete, but 2015 is still very patchy so it has not been loaded at all.

I have to say, refreshing the data in Tableau is a doddle!



Saturday, 14 March 2015

European airports flight departures - 2014 updated

The passenger data in the tableau dashboard has been updated with the latest data from Eurostat (avia_par_xx).

and for cargo too - see the cargo dashboard.

Sunday, 18 January 2015

European Cargo airports (2003-2013)

Finally, I have extended the data that's available in the cargo dashboard to cover 2003-2013, where underlying monthly data are available from Eurostat.

Check it out!

Seems to be some missing data for Sweden 2005-2007 - the data availability tab gives a clear account of which years are available for which States.




Sunday, 7 December 2014

European Cargo airports - new dashboard. (2010-2012)

Turned out to be quite easy to adapt the passenger dashboard to do the same for the freight & mail data from Eurostat (avia_gor_xx). So see the link to the new dashboard above.

Flights: are commercial freight & mail flight departures (FRM_CAF_DEP in Eurostat terms)
Tonnes: are tonnes of freight & mail on board on departure (including direct transit cargo that stayed on the aircraft - FRM_BRD_DEP)

Friday, 5 December 2014

European airport departures - 2013 & 2014 data updated.

A delay in new posts, while I work on extracting a new dataset and turning it into some useful dashboards. Watch this space.

But meanwhile, the good news is that Eurostat have published updated data for 2013 and 2014, sorting out some earlier problems and adding more months. Check out the data in the 'production version' - link is at the top of the page: I've renamed the two dashboards into something more meaningful (I hope):

  • Departure Patterns shows departures from the selected EU28 airport in terms of destinations, load factors, distances, aircraft sizes, pax, flights.
  • Departure Points lets you select any airport (including those outside Europe) and see details of where flights leave EU28 airports to reach that point.
I've also re-size so it fits on the ipad better - but discovered Tableau menus work better in Safari than Chrome on the ipad.