Wednesday, 5 February 2014

Jumble, Corsair and Magellan... Oh My!

So, I've left this idle for a while, its probably about time I got back to it.

We've got some data collected from all three cats and today we are going to compare the data.

This data has been utilised to produce heat maps to show where the cats spend most of their time. These maps utilise all the data we have collected from the cats over a period of months, divided by cat.  Each cat was equipped with the GPS for an equivilent amount of time to gather the data. All data has been corrected for HDOP and the innacurate points have been filtered  out.

Jumble's data was collected over a period between 18th April and 10th of May 2013.
Magellan's data was collected between the 10th and 18th of April 2013.
Corsair's data was collected over a period between  22nd April and 8th August 2013. So yes, we do have more data for Corsair than the other cats.

This data was collected over late autumn and winter.  We are now working on collecting data over summer. It will be interesting to note whether there is a seasonal difference.

Jumble is the oldest of the cats. He is a 14 year old, desexed male cat.  He has some health problems. For the last couple of years he has had a recurrent problem with pancreatitis - an inflamation of the belly. When it flares up he gets sick, but we can treat the issue with cortizone. As with most older cats, he is a bit fat, he doesn't move as fast as he used to and he also obviously has some pain as he doesn't leap as high or as confidently as he used to. Jumble spends most of his time asleep on our property. He doesn't wander as far as the younger cats. When I'm home I notice that he spends most of his time asleep either on our bed, our couches, his box, in the back yard. The data gathered suggests that this is his pattern when we are not home as well. Jumble always comes when called, so he is probably never far away. Mapping shows that he never travels more than 120 metres from our home and rarely goes more than 50m from our home.



Magellan is a 3 year old, desexed male cat. Magellan was hit by a car when he was younger but physically appears to have made a full recovery. He certainly still gets on the roof and jumps heights the other cats don't. He is a fairly standoffish cat, not a very friendly and sociable cat. Sometimes he will deign to sit on my desk and watch me type, but rarely comes up for pats or snuggles. He is even more anti-social when friends come visiting and runs from strangers. He appears to be our most active of cats, always the first out the cat flap when it is unlocked in the morning. He is the cat that defends the back yard from the incursions of other cats and he is our little explorer kitty. The data says that Magellan travels further than Jumble but not as far as Corsair. Magellan spends by far and away most of his time on our property. He travels up to 150 metres from our house, but rarely travels outside of our immediate neighbours. He does travel to the neighbours over the road, as does Corsair, but spends less time over the road than she does.





Now Corsair is a three year old female, desexed cat. She is friendly and sociable and loves hugs. She will approach anyone, friend or stranger for pats. She invites random stray cats inside and shows them the food bowl. I've never seen her chase any cat out of the back yard.  She roams further than any of the other cats, up to 200m in every direction from our house. Our house however does remain the focal point of her activities. Its interesting that house B (See Does Corsair have a second home?) is also a focal point of her activities, but she still spends at least twice as much time at our house as she does at house B. Why does Corsair wander further than the other cats? Is it her sex? Is it the search for food to fill her fatty belly? Is it her inate socialness that makes her seek out company when we are not home? These are questions the data won't tell us.



I've overlaid all three cat's data on each other, just to provide a visual representation of how far they travel compared to each other.

As you can see its Jumble being the most homebody, followed by Magellan and Corsair as the biggest explorer of them all.  Breaking down the data into smaller and larger time periods doesn't seem to change the result.

Why do you think Corsair travels so far compared to the other cats? 

Is she in search of adventure? 



Is she is search of food to fill her fatty belly?



Or is she simply searching for hugs and attention?





Sunday, 15 September 2013

Where is Corsair?

Corsair is a troublesome kitten. She likes to pick flowers and leave them on our floor, she likes to get into things she shouldn't. Just the other day she managed to get locked in our car. She had obviously jumped in while Nigel was unloading groceries and then when I got in the car two hours later, she was curled up sleeping in the back seat, not at all fussed about being trapped in the car.

But I am worried about Corsair today, she hasn't come home since Saturday morning and so we worry.

Now cats are cats, she will most likely saunter in completely unconcerned right when we have given up hope of seeing her again, or more likely at 3am, wet and hungry and demanding food and hugs.

She has a collar with a phone number tag on, and she is microchipped, so I like to think that if something happened we would get a call.

Also - we have all this handy GPS data, months worth now (yes, I know its ages since I made a post).  So we know how far she is traveling and where she is hanging out.  We know she isn't going more than about 200m in any direction, so we are concentrating our search efforts within that radius.

It's also been suggested that we do a letterbox drop, asking people to check their garages for trapped cats. Rather than spamming the entire neighbourhood, we will look at the data and just leave notes in the letterboxes of properties that we can see she is going into or near.

Technology - ain't it grand.

Personally - I just want her to come home safe and sound.

Edit: After three nights away Corsair came home. Unfortunately she wasn't wearing the GPS when she disapeared so we dont know where she went.


Saturday, 11 May 2013

Does Jumble really sleep all day?

Does Jumble really sleep all day?

Jumble is our 13 year old cat.

He has been with me since I adopted him as a tiny kitten. A friend who is a vet was told to euthanaise Jumble as a kitten as he was considered to feral to be rehomable. Vet friend knew I was in the market for a ginger kitty, she introduced me to Jumble. The non ginger feral biting kitten who couldn't be rehomed, immediately curled up in my lap and started purring. It was love at first sight, and very little has changed since. Jumble's favourite place is still curled up in my lap, or curled up in our bed, or sitting on top of the laptop or knitting that he percieves is taking up his rightful lap space.



For the last couple of weeks the GPS blogger has been attached to Jumble.  We've got a couple of weeks worth of data from each cat now and so far all we have really determined is that GPS loggers have a fairly big margin of error. We have also established that Corsair roams a little bit further than Magellan and may have a second home. None of the cats roam more than about 150m from our house.

Now, observed data tells us that Jumble spends most of his time sleeping. On the couch, on the bed, in the hammock, outside in the sun in the backyard. And this time of year, once we come home from work, he follows us inside and sits expectantly on the heater vent looking at us until we turn on the heating. Then once someone sits down he will select a lap, usually walking over everyone else in the process. He is secure in his role as dominant cat in the household.

So where is he going when we are not home?

The answer is, not far at all. These maps show two weeks worth of data. If we look at just the green dots, those that are considered to be the most accurate data, it appears he is travelling no further than 50m from our property on average. The focus of his activity is our home.



He spends vastly more time in our property compared to anywhere else. The yellow properties represent 1 to 15 points recorded. The red properties shows between 223 and 1296 points recorded, the only two red properties are our immediate neighbours to the north and south. Our property shows over 1200 points recorded. Jumble has no other home and is perfectly content living in his home with his humans and 'helping' code.



We also looked at the time stamps on Jumble's data, does he do anything particular at certain times of the day? Are there noticable patterns, like there are with Corsair's data?

This map really shows us two things.
One - the GPS logger is innacurate, because Jumble sleeps on our bed all night, or he has a secret cat door to the outside world.
Two - Jumble does most of his roaming in the middle of the day and in the early afternoon. When his humans are home, Jumble likes to be home too.

It's getting on towards winter, the days are getting shorter, the weather colder and we've noticed all three cats have a tendancy to be home when we get home from work. This is not the case in summer when it doesn't get dark til later. Cats like houses with heating. Its also possible that the Do Not Feed tags that were attached a couple of months ago are working, as they are also coming home hungry... 

So internet - what questions would you like answered next?
Its probably about time we did some comparable statistical analysis on our data sets...

Or maybe I should just post more cat photos :)







Saturday, 27 April 2013

Does Corsair enjoy our company?

We work full time and as such, the cats spend most of their time without us at home. And of course when we do come home, we lock them inside for the night, so they are stuck with us all night, despite the pitiful banging on the locked cat door.  Which raises the question, do the cats spend more time at home when their humans are home?






Do they really all sleep on our bed all day, or did someone just forget to turn off the electric blanket?

It is a Sunday, this morning we attached the GPS logger to Jumble.  Jumble is our oldest cat, he is 13. So far despite us gently encouraging him to go out and collect interesting GPS data, he has spent over an hour sitting on me, another hour sitting on Nigel helping him play computer games and a couple of hours sleeping in the sun in the back yard. Magellan is stalking an orange cat in the back yard and Corsair is asleep on the bed.

So we ask the question, are they more likely to stay home if we are home?  We have a couple of housemates who provide ancedoctal evidence that says the cats are less likely to hang around the house when we are away on holiday.

So we pulled Corsair's GPS logging data from Saturday. Nigel was home all day Saturday. I was home Saturday afternoon. This data provides an interesting contrast to the three days of Corsair's travel data from last week, presented in the last post. Those three days of data were weekdays. Nigel came home in the evenings and I was out doing fieldwork so didn't come home at all for two of them.

The data shows that on Saturday morning Corsair got up, wandered over to House B at around 8am, probably for breakfast, then came home and spent pretty much the entire day at our house.I left the house at about 7am for an early morning bike ride. One of our housemates fed the cats and unlocked the cat flap as she left for work at about 7:30am. Nigel, with the house to himself enjoyed a leisurely sleep in and got out of bed around mid morning. Co-incidently, around the same time Corsair came home from her morning wanderings.

Ths map shows how many points we recorded within each property on Saturday. The vast number of points were recorded in our house with 265 points. The second most number of points were our immediate neighbours, with 116 and 58 points respectively.  House B only recorded 23 points and House B's southern neighbour recorded 47 points.  She also appears to have wandered through less properties on the weekend, 24 as opposed to 30+ and she spent more time on our side of the street.



We should also point out that the GPS logger cost all of $50, its a cheap device and there is every possibility that even with us filtering out the bad data, the good data is probably only accurate to within 10m and the OK data is probably only accurate to within 20m. So some of those points in our immediate neighbours properties are probably innaccurate and the cats are actually within our garden. We have to acknowledge the potential margin of error.

The map below illustrates the margin of error problem quite clearly. The data is time stamped and colour coded accordingly: 0 stands for midnight, 1 = 1am, 2 = 2am etc. Corsair was locked inside between 8pm and 7am and asleep on our bed for most of that. Yet the map shows points being recorded up to three houses away.  Which shows that even with the data being filtered for horizontal dilution of precision the GPS is still fairly innacurate.  That or Corsair has super escapey powers and there is a secret cat door that we are unaware of.  This map does clearly show that Corsair wandered over to House B in the early morning and that once Nigel got out of bed, the focus of activity was our house.  At 3pm the batteries on the GPS ran out :)


Now you can get GPS's with sub-centimetre accuracy. The GPS units we use in the field doing archaeology look something like this. A large ruggardised tablet sized device attached to a 2m aerial. Not really something you can attach to a cat. Also these units cost thousands of dollars.



So does any of this tell us if our cats really love us? Or does it just point out the limitations of GPS?  Do our cats really appreciate our company?  I notice that on days when I work from home, they are more likely to spend time inside. When I used to work from home full time, I certainly had company all day, even if only one cat at a time. I know Magellan has sat on my desk and watched me type most of this post. I know that when I came home from my bike ride yesterday afternoon I found Jumble and Nigel napping in the hammock.


 I don't know what you think, but that looks like love to me.




Friday, 26 April 2013

Does Corsair have a second home?

So our initial research question was 'does Corsair have a second home'. Our early GPS logging experiments showed that it looked like yes, she was appearing to spend quite a bit of time at a house across the street. But then we began to question the quality of our data. The last couple of posts detail the methods we have used to refine our data and determine good data versus bad data.

So having solved the data issue, we attached the GPS logger back to Corsair and sent her out to collect some interesting data.





Corsair can be a very appealing kitten, would you feed her if she showed up on your door step and looked at you with big eyes?

It's also worth noting that in an attempt to discourage people from feeding her, we have attached little tags to all the cats collars saying 'Do Not Feed'.  This actually does appear to be working as she now reliably comes home hungry for dinner, which she wasn't before. Either that or the white plastic blinking box attached to her collar is scaring people.

So we have taken three days worth of data and plotted it on a map. We've stripped out the 'bad' data and only presented the good data on this map.


So you can see that like Magellan, Corsair is really only wandering less than 200m from our house. However, unlike Magellan, there are two focal points of activity. One based around our house and one based around the house of a neighbour who lives a block over.

So we refined the data a bit more, trying to determine roughly how much time she was spending in other locations. The map presented below shows how many points occur within each property boundary. We've looked at how many points for each property and colour coded them according to how many points have been recorded in that area. Corsair is wandering through at least 33 different properties. There are two properties with over 284 recorded points. Those are our house (House A) and a neighbouring house a block over (We will call that House B). The houses adjacent House A and House B have the next highest number of points recorded in them. Interestingly she does seem to be spending more time in the block over the road, rather than within our block. She does seem to spend approximately the same amount of time at both our house and House B, with 416 points being recorded within our property boundaries and 417 points recorded in House B. This suggests its probably about time to go knock on the door of House B, or at least leave a polite note in the letter box.



I know the neighbours immediately to the south of us have cats, the neighbours immediately to the north of us do not have cats.  Our neighbourhood demographic is largely older Italian people and younger Middle Eastern (muslim) families.

Our neighbourhood seems to have quite a few cats, but no dogs, or at least I don't hear dogs barking, or see people walking dogs. I do see quite a few cats, usually those being chased out of our back yard by Magellan or Jumble.  Corsair on the other hand smiles at the other cats, makes friends, invites them in the back door and shows them the location of the food bowl.  She is a caring sharing type and looking at the size of her ginormous belly, I suspect a bunch of the cats reciprocate.

That said, we also suspect that our cats have 'infrared vision'. We turned on the ducted heating for the first time this year as the weather is getting colder. Within five minutes, all three cats were inside sitting on the heating vents. Maybe they will spend more time at home in winter.


Above is a photo of a Corsair in her natural habitat.

We don't have night time data for Corsair, she has been reliably coming home for dinner and getting locked inside. Although she has not yet learned that banging on the cat door at night won't make it open. Her preferred sleeping position is at the foot of our bed.

So next week - it's probably about time Jumble got to wear the GPS logger.

So my dear readers, are there any questions about our experiments you would like answered? If we can answer them with the data we have we are happy to try.








Friday, 19 April 2013

Where does my cat go at night?

Its fairly well established that you should lock your cats in at night. The theory says, cats are more likely to get in trouble overnight, it is their natural hunting time, they are more likely to have fights and they are more likely to get hit by a car. Additionally many local councils in Australia have a cat curfew, were you are required to keep your cats inside at night.  So as responsible cat owners, we try to lock our cats in at night.

But there are some nights, they just don't come home, regardless of calling of them or attempting to entice them with tins of tasty cat food. 

So the question becomes what does my cat do at night? A question I am sure all cat owners have asked themselves. Where is my cat? At an all night raves? Having wild kitty sex? Hunting the native wildlife? Is my black cat chasing cars in the black night? Given Magellan didn't come home the other night while wearing the GPS logger, we decided to find out.


Firstly, to go back to our previous post,  where we talked about the search for accurate data. Nigel has finishing his coding, built his data base and has produced data sets with all the required attributes and we can now filter the cats movements using horizontal dilution of precision, these filters can then be used to show us the accuracy of the data.

The map below shows 13 days worth of data from Magellan. This data is filtered using horizontal dilution of precision and then presented using colour coding.  By doing some clever maths you can assign dilution of precision values.  I'm really bad at maths, if you like maths - read this link to explain how it all works

http://en.wikipedia.org/wiki/Dilution_of_precision_%28GPS%29

In the map below, the green dots represent data we consider to be good precision. Yellow is okay precision. Orange and red is most likely to be really bad and unreliable data.

So you can see if the non geek was was looking at the straight output from the GPS logger it would appear that Magellan is travelling up to 520m from our house in any direction. However, once you filter out the unreliable data, it appears he is much more of an home body and is only travelling around 120m in any direction from our house. Its also something of a relief to note that he is only regularly crossing one street and it is the quiet suburban street in front of our house.

Now we only have one nights worth of data for his night time adventures.. This data has been filtered to only show data between 7pm and 7am (which is pretty much between dawn and dusk at this time of year).


Interestingly it shows pretty much the same level of travel as his daytime roaming, in fact at night time he apears to be roaming even less, with the furthest distance from our house being 86m.  So when you are calling them at night, its not that they can't hear you, it is that they are ignoring you. He appears to be going no further than 3 houses away.  But then I guess when you are cat sized, the world is your jungle and you find your adventures where you can.




Now I realise that one nights worth of data is a statistically insignificant data set, but we are still trying to keep them in at night. So it is probably time to return to our original question of does Corsair have another home?  Or does Jumble really sleep all day?  Its time to take the logger off Magellan's collar and collect more data from the other cats that we can analyse using the new data collection protocols.






Sunday, 14 April 2013

The search for accurate data

As we discussed last post, we are having issues determining what data is accurate and what data is not accurate. In today's post we discuss the steps we have taken to get more information and be able to get more accurate data.

We first sorted the data by adding a simple filter to strip out points where the cats are travelling at 0kph and at speeds of faster than 10kph.

However cats can go faster than 10kph, so our initial filter based on speeds wasn't a very good way of sorting out good data from bad data.  According to Google a cat can pretty much travel at 5kph indefinitely and get up to speeds of 50kph over short distances.  So yes, Magellan could easily travel further distances than he does. However, I still don't believe he made it to the industrial zone in the next suburb over in the space of 20 seconds.

So let me explain how the data is gathered.

Warning: This post contains Technical Information alert.  I'll add cute cat photos below to keep the non geeks interested.

The GPS logger is attached to the cat's collar at the start of the day. They are fed and then the cat door is opened.

In the evening, the cats are called inside, fed and locked inside. The GPS logger is removed and plugged into the computer to charge and for us to download the data.

The data from the device is retrieved using a program called @trip. The data is then exported from into gpx format. The gpx data that is produced using @trip only provides data on latitude, longitude, elevation and speed.

The gpx file format does support other data such as recording the number of satellites used, horizontal dilution of precision and vertical dilution of precision.

So the question becomes can the GPS logger actually record that additional information about satellites and precision?


So we went to Google for answers.

Corsair likes it when we sit still and play on the computer.



After a long time Googling we found a document that someone had assembled explaining how the data is actually stored and extracted from the GPS unit.  They had gathered this information by reverse engineering the protocol that @trip uses to communicate with the GPS. They used this to build an open source program called igotu2gpx.  

We installed igotu2gpx and used the program to extract some data from the logger and export it as gpx.

This data set contained longitude, latitude, elevation and number of satellites. But it didn't present data on the horizontal dilution of precision or speed.

We wanted to know speed and the horizontal dilution of precision so we had to change the program to do that. It was surprisingly easy to do, as the guys who had written the software had already found those values in the data and made them available, it just wasn't being shown in the data outputs.  So with a little C++ scripting the software was adapted to give us the data we wanted. Hooray for Open Source Software!

Magellan also has excellent coding skills.



Next step is to build the PostGIS database.  And possibly clean our desks before posting pictures of them to the internet :)

Next post will present some maps using our new refined data and seeing if that makes a difference.

Also Magellan didn't come home for dinner a couple of nights ago and so we have some night time data. It will be interesting to see is there is a difference in the night time versus day time roaming habits.

And Nigel wants to buy two more GPS loggers so we can track all three cats at once....

If you are enjoying this blog, or would like to critique our methodology, please comment and let us know.

Thanks for reading