Massey University Introductory Biostatistics (161.130) Project 1a.

The original raw data files, photos and analysis files...
...can be seen Here
Another version (with fancy prose and feeble attempts at humour)...
...can be seen Here
The google map showing the sample sites, CBD, roadworks etc...
...can be seen Here

The effects of the Christchurch Earthquakes on morning Traffic flow in the “villages” of Papanui, Bryndwr, and Merivale (aka. North West “Christchurch”), with focus on impact of the temporary roadworks at the intersections of Papanui road & Heaton street/Innes road.

Angela. J. Cone

Traffic measurements were made at eight study locations, in the area northwest of the deceased Christchurch CBD, extending from Northlands to Harper Ave. These traffic measurements quantify the traffic volume and the evenness of traffic flow at about peak morning commuter traffic time.

I initially chose to do a study that aimed to quantify the impacts of the Papanui road & Heaton/Innes road intersection roadworks, on traffic flow down “Blighs road”. Specifically, is Blighs Road being used as a detour to avoid the roadworks intersection?

As well as the impacts on Blighs road specifically, what are the direct impacts on the roads that run through the intersection that is affected by the roadworks? What is the impact on traffic volume, traffic directionality, and what is the impact on traffic evenness ?

Unfortunately, I was unable to directly answer either of these questions, because the repair work has not been competed, and consequently I have been unable to collect any baseline data.

What I am able to do is provide some preliminary “Pilot study” data on the broader question of whether peak morning traffic flows in North West are decentralised (but have no pre-earthquake data to give direct quantitative comparisons).

This could be considered a “pilot study” data on the broader question of whether peak morning traffic flows in North West Christchurch are more decentralised.

As stated initially, the traffic measurements I have made traffic volume and the evenness off traffic flow. Traffic volume is the direct result of the number of motorists choosing to travel on that road to get to a specific destination. The predominant commuter destination in Christchurch prior to the earthquakes was the CBD. I don’t have any quantitative measures to substantiate this, but am relying on personal memory of what traffic was like when commuting in the past. What I can do is give a general comparison of what the directionality of the traffic volume is like now.

Traffic flow, on the other hand, is effectively a measure of how much the variation in time intervals between cars differs from an even traffic flow. If traffic flow was completely even, it would effectively be the same as dividing the time duration measured, but the traffic volume (ie the number of cars that passed). It is assumed that it is extremely unlikely that traffic flow would ever be perfectly even, – there are too many different factors that would result in variability.

It is expected that numerous factors would influence the evenness of traffic flow: – eg. traffic volume, distance from a controlled traffic light, number of potential entry points onto that stretch of road, and whether there are any obstacles interrupting traffic flow (such as roadworks).
It is assumed that there are several different traffic flow patterns that might occur (likely in combination), for instance, overall trends of increases and decrease in traffic flow over the observation period. If traffic flow increases, then (for example) more cars would be observed in the second half of the observational period. There may also be cyclic changes in traffic flow, in response to factors such as traffic lights. Any cyclic patterns resulting from traffic lights would be modulated by various factors such as the distance from traffic lights, additional road entry points, and traffic flow obstacles (such as roadworks). Finally, some of the variation in traffic flow would just be random, and I would postulate that the random variation would be more significant when the traffic volume is low, and less significant when it is high.)

Therefore, in addition to the specific study questions stated initially, some more general questions can be asked:

Does traffic density change over time? Is there greater traffic density, going in the direction of the CBD or away from it (and if away, where are the cars going instead). Do roadworks result in lower traffic flow?, do they alter the variability of traffic flow – eg. smooth down the cyclic traffic flows which result from traffic lights?

The roadwork themselves may also have an effect on traffic flow, but without having baseline data, it would be difficult to separate the effects of the roadworks from random fluctuations.

Roadworks

For the last month or two, there have been major road works down Papanui road, North of the Heaton street/Innes road intersection. There are also road works on Innes road adjacent to the intersection, and initially road works were also on Heaton street also adjacent to the intersection. During this time, there have been restrictions on traffic flow through the intersection, – for instance, cars are unable to do a right hand turn into Heaton street, from the Northern end of Papanui road.

It is highly probable that these roadworks are to repair infrastructure that was damaged as a direct result of ground damage caused by the Earthquakes. Broadly speaking, Northwest Christchurch was the part of the city that experienced the least amount of land damage (including liquefaction). The east side of the city experienced the greatest amount of liquefaction, and by comparison, the north west side had very little liquefaction. The location in the Northwest where I saw the greatest amount of liquefaction was on Papanui road in the vicinity of St Andrews College. I am sure it is no co-incidence that these road works begin where I observed this liquefaction.

Study locations

A total of 8 study sites were sampled. These study sites are indicated by coloured “pin markers” in the map below:

Four locations were chosen to directly measure traffic flow on each of the four arms of the roads that the roadworks were situated on – Papanui/Weston, “Papanui/Holly”, “Heaton”, and “Innes”.

One location “Harper Ave” was selected because it was a location that used to experience peak traffic density from CBD commuter traffic. This site was used primarily as a “control” site to verify whether or not the CBD destruction had in fact altered traffic flow on that former main route to the CBD.

One site “Grassmere” was selected to quantify the traffic flow coming from the Main North road (and also as the start point of my daily weekday journey to my sons preschool. One site “Blighs” was selected to quantify the effects of the Papanui road roadworks on traffic flow down Blighs road (and also as the end point of my journey to my sons preschool). A final site “Wairakei” was chosen firstly to quantify traffic flow between Blighs and Harper Ave, and secondly to quantify whether there was any significant traffic flow to the airport end of Wairakei road (which I suspect is one of the new post earthquake business hub locations)

Several other locations of interest were identified as possible future sample site locations (these are all marked with “?” on the maps).

Data collected

The data collected was, in simplest terms, a tally of cars passing the vantage point for each sampling location, from both sides of the road. A record of the time each car passes was made (relative to the session start time). The time records of each passing car create two continuous numeric dependant variables – time the car passed relative to start time, and time the car passed relative to the time since the previous car passed. There are a total of 8 sample locations, creating a categorical variable of “Location”. For each sample point there are separate data records for each side of the road, giving an additional nominal categorical variable of “pair id”, which allows us to separate out different directions of traffic flow at each location relative to both the road works, and the former CBD. The variable “pair id” is a nominal variable because it doesn’t measure anything that would impact of any measure of traffic – it merely reflected which stopwatch the data was tallied on – ie. it was useful just for data organisation.

This gives a total of 16 samples of traffic flow data, each coded with a different “Identifier” code number. Other ordinal categorical variables recorded were sampling date, Day of the week, and weather, – these were recorded in case the sites were resampled at a future date.

At each study site, observations were made for half an hour. Start times of these half hour observation periods varied from 8.45am – to (am. Each measurement was made immediately after I had dropped my son off to preschool. Ideally each sample period would have been made at exactly the same time, but due to the element of chaos inherent with getting little boys to preschool, this wasn’t always possible. During each half hour observation period, the times that cars passed by the observation point (my parked car) were recorded. Separate records were made for each traffic flow direction (ie. each side of the road).

The specific time that each car passed the study site vantage point was recorded with the use of the android smartphone app “Stopwatch for Coaches +“. Immediately prior to each sampling period I would open the app, and would select that two stopwatches be used. Below the start/stop buttons at the top of the screen, the stopwatch screen is divided in half – stopwatch 1 on the top half of the screen, and stop watch two on the bottom of the screen. I would orient the phone so the top half was was to the left, and thus stopwatch one was to the left and stopwatch two was to the right.

The start button would start both stop watches simultaneously, and each time the phone screen was tapped in the appropriate stopwatch sector of the screen, successive “laptimes” were displayed. At the completion of each sampling time, the stop watch was stopped, and the save button selected. In the app menu I would then select the newly created time record folder, which would contain a separate file for each stop watch. These files would then be renamed (so that I could easily identify which side of the road each file corresponded to. The files would then be saved to the simcard folder and then uploaded to dropbox. When saved, each stopwatch record file contained an electronically recorded time stamp of each time the screen was tapped (and thus each time a car passed the sample site vantage point (ie. where I parked the car).

The rationale for use of this data recording method (and the process of arriving at my rationale) can be seen at the foot note #, at the end of this study report.

Once I returned home, I would open the files saved onto my dropbox uploads folder. The text file would then be imported into an excel spreadsheet, and the recorded time stamp would be converted into time in seconds since the start of recording. Another data column was then created which calculated the time between each car.

The sample identifier codes reflect the order in which the sites were sampled, and within each site, which stopwatch the data for that side of road was recorded on. Therefore, the ID numbers don’t sort the sites for comparison in a meaningful way.

Consequently, the sites are ordered the sites were presented in the “study locations” section above. The sites are also colour coded according to the colour of the google maps markers used to indicate where each study location is located.

Results

I will first show the basic summary statics and exploratory graphs, for each of the two traffic flow measures:

Broadly speaking, the above summary statistics and data exploration graphs show that at all sites, traffic flow does fluctuate over time, – both in the short term (ie. variation that occurs within a few minutes, and variation that occur over the observation time span. The tabulated averages and the box plot indicate that at some locations, overall traffic flow decreased over the 30 minute observation period, with the reverse occurring at other locations. A mean value of below 15 minutes could indicate there was more traffic flow in the first half of the observation period, and a mean value above 15 minutes could indicate greater traffic flow within the second half of the observation period.

Of particular note is Sample number 2 and 5 which both had increased traffic flow in the second half, and sample number 3 which had greater traffic flow in the first half of the observation period . Sample three was from the “Blighs Road” study location, and was on the side of the road where traffic was travelling from the southeast end of the road, travelling towards Papanui road. Waimari school is situated down a side street from Blighs road, and it is likely that some of the traffic prior to 9am was from parents taking their children to school. I suspect that about 9am, there might have been a peak off traffic from parents driving away from the school, and an associated decrease of traffic associated with parents delivering children to school. These initial “data exploration” graphs show insufficient detail to assess whether this suspicion (that school related traffic peaks at around 9am) since fitting 16 separate samples on a single graph results in a decrease of detail. The data will need to be examined further with fewer samples on each graph, so each sample can be examined in more detail. This will be done according to sample location, after the basic data exploration of “time since previous car” has been examined below:

Variation as expressed by the SE, appears to be in part inversely related to traffic volume. What else is involved?

The dot plot above shows that the variation in time interval between cars varies between samples. Of special note is sample 10 (Harper Ave, travelling from the Rossal/Park terrace intersection towards Fendalton Ave) which distinctly shows two clusters of time intervals. Cars usually travelled within 9 seconds of the previous car, with a peak of 3 second intervals,.. as well as a second cluster of intervals between 15 & 38 seconds.

I will now examine the results for each sample location in more detail.

Histogram Bar widths were calibrated to maximise the display of the cyclic pattern seen at the Harper ave site. From eyeballing the data it seems that there might have been a time interval of about 1.2 minutes. Therefore a “bin” width representing 36 seconds for each histogram bar was selected for all the histograms representing traffic density over time.
This assumes that all traffic light intervals are equivalent – an assumption that might be erroneous, – quantifying traffic light change intervals, would be of great value in further interpretation of this data.

(click on graph thumbnails to see in more detail)

Traffic coming from the intersection is more irregular (perhaps “traffic light-cyclic”). The traffic coming to the intersection is less variable, and appears to have two cyclic peaks – whether this is real or an artefact of the histogram bar width is uncertain without deeper analysis.It should be highlighted that the side of the road with the greatest traffic volume is the side coming from Merivale – ie. there is more traffic coming from the direction of the former CBD than there is going towards it. This is the complete opposite of what would have been experienced on this road before the Christchurch earthquakes.

Holly road is located a 950m away from the intersection, so traffic flow on both sides is relatively even, and doesn’t show the short term irregular cyclic pattern that results from proximity to traffic lights.There is greater traffic on the Northern side of Papanui road (ie. less traffic closer to the former CBD). It is uncertain whether the difference in traffic volume between the two sites is due to real differences in traffic flow or due to different traffic volumes on the different days.

At the Heaton Street site, traffic volume decreased over time, with the side from Papanui road being somewhat more cyclic,.. slightly more cars travelling from Papanui road (52% of traffic).

The side of Innes road coming from Papanui road/roadworks appears somewhat more cyclic. The volume of traffic is greatest travelling west towards Papanui road (56%).Overall, I am unable unable to assess whether there is any significant impact of the roadworks on traffic volume and/or flow without baseline data. More in depth time series analysis might help. Traffic from Innes to Heaton greater than the reverse, but more traffic travelling west on Innes road than there was travelling in the same direction on Heaton street. It’s not certain whether the difference in traffic is due to cars turning from Innes road onto Papanui (rather than travelling straight onto Heaton street), or whether it merely reflects differences in traffic flow on the two sampling days.

The Harper ave site provided very value traffic flow data for several reasons. Firstly, it was the site which had the highest combined traffic volume. The side coming from the CBD end had the most distinctive cyclic traffic flow pattern, and the second highest sample traffic volume. This was the one sample that which had traffic coming from a stretch of road that had a single entry point that was controlled by a traffic light. From eyeballing the data, it seems that there was an influx of traffic approximately every 1.2 minutes. The dot plot of time interval frequency data indicates that there are two clusters, which would correspond to a influx of traffic after the lights have changed to green, and then a lull in traffic when the traffic lights are red. Additional analyses would have to be done to verify whether this observation is accurate. An important point to note, is that he side of the road with the greatest amount of traffic was from the side travelling AWAY from the former CBD area. In addition, although traffic flows were quite high, there was a complete absence of traffic jams on this stretch of road that used to experience daily traffic jams, during peak early morning commuter traffic time.

The main North road is the site that had the greatest difference between the two sides of the road. 66% of traffic was from one direction. This side also had the most even traffic flow, and traffic volume appears to have increased over time. Traffic volume from the other side was lower, and decreased over time. Neither side of the road showed any distinctive short-term cyclic changes. The side coming from the North was close to a set of traffic lights, but probably didn’t result in any distinctive patterns as when the lights from the Main North road were red, traffic would have been entering from sawyers arms road. It is possible that there may be a very short term cyclic pattern that has been obscured by the time interval selected for the histogram bars. Further analysis could evaluate this more. This site had a file labelling mishap, and I am almost certain that the side which received the greatest volume of traffic was from the Sawyers arms rd/north side of the Grassmere/Main North road intersection. A later test sampling (starting at 9.15am) showed there was a greater volume of traffic from the Sawyers arms rd/north side of the Grassmere/main North road intersection (179 cars v’s 124). Further time series analysis could be done to further verify that the fluctuation patterns are also consistent

There are two things of note at the Blighs road site – the overall traffic flow trend, and that , the Papanui road side shows a strong cyclic nature (though weaker than that at Harper ave). On the side of the road which includes traffic from the school , there is a peak of traffic mid-way in the first half of the sampling time (as mentioned above), whereas, conversely, there is a peak of traffic from the Papanui side of the road midway in the latter half of the sampling period.As there is no baseline data, I am unable to assess the impact of the Papanui road roadworks on this location (ie. whether there is a significant increase in traffic volume).

In General, traffic decreased over time at the Wairakei road site. Traffic flow was greatest travelling towards the CBD. There are fluctuations over time, but at this stage I’m unable to assess whether these fluctuations are random, or whether they are a somewhat modulated/depressed traffic light fluctuations (or whether its somewhat in between). This might be clarified with further, more in depth analysis.This site was probably not an optimal site to sample, – I was trying to measure two different things and it was the wrong location for both of them. It would have been better to assess traffic flow between Blighs road and Harper ave ,either on Idris road or Fendalton ave. The optimal location to assess traffic flow to a hypothetical business hub at the Airport end of Wairakei road, would be in the portions of the road that intersects with either Grahams rd or Greers road.

Overall,.. traffic flow seems to be greatest travelling from the North East to the South West. The most salient observation is that traffic density was highest on Harper ave, on the side of the road travelling away from the former CBD. What this study is unable to elucidate is – where is their destination? One could hypothesise that many businesses may have relocated to industrial areas on the south west of the City, south of Blenheim road, and between Moorehouse ave and Brougham street.

The above results are all preliminary, and further research and/or analysis needed to maximise the potential information. What I need to decide now is – what is of the highest priority?,..

1) Elucidating the destinations of the commuter traffic is going to? ie. where are the new business hubs located, and how many people are travelling there and from where?

2) Analysing the data I have in more detail ie. doing more detailed “time series”type analysis. For this it would be advisable to return to each site and directly measure the duration of the Traffic light cycles. These times would better enable determining how much of the variation is due to traffic lights, and how much of the variation is random

3) Waiting until the roadwork repairs have finished, and I am able to take baseline measurements.

Objectively, the latter is of highest priority, especially in relation to my original study question which was specifically to examine the impact of the roadworks on traffic flow down the road my sons preschool is located on. However, this is the one thing I have the least control over. Another question I need to consider is : Are the traffic flow measurements on the roads that go through the Papanui/Heaton/Innes road intersection sufficient, or should more samples be taken at different points along the specific stretches the roadworks are located on?. The one thing that I can do is directly measure the traffic light time intervals at each of the traffic lights that direct affect traffic flow to each of the study sites.

#Prior to the commencement of the study, I had realised that it would be difficult to physically write each observation time down at the time of the original observations, so some form of electronic recording would be needed. Earlier the year I had enrolled in the general stats paper in the first half of the year, and the first part of the first assignment for that paper was identical to this one. At that time I had decided that I was going to study the effects of roadworks on traffic flow through an intersection. The road works I intended to study earlier this year were associated with converting a large roundabout, into traffic lights. In my original pilot study, I used a sound recorder app on my start phone, and as each car passed I stated the number of passengers and the car numberplate. As part of this initial pilot study, I realised that there was practical difficulties with the exact type of data collected, and I would get far more salient data by comparing traffic the four arms of the intersection (with sample vantage point effectively being a categorical variable, as well as the side of the road the car was on & whether it was going into the roundabout, or was coming out of the roundabout). I then attempted to record data for that project. Since in the pilot study I had made a sound recording, I decided that for cars going one way I’d tap the phone one way, and – thus when played back i’d be able to record when each tap was made by the sound clip time stamp, and would recognise from which direction the car travelled from by the type of tap. This study wasn’t completed, as I had to withdraw from that course.

For this paper I decided to adapt some of the earlier methodology I had developed earlier, into this new project. The roadworks on the original intersection that I had chosen had been completed, so a new study site was needed. I also realised that my original method of recording the passing of each car would require time consuming review of the sound recordings after each observation period, so searched for a smartphone app that could tally data counts, and would record a time stamp for each observation. Most importantly, it needed to be an app that allowed simultaneous recording of two variables… from there I arrived at the exact methodology that I used for this study (which is described above).