Back in February 2009, I created my Twitter account, upon the insistence of my then-girlfriend. I didn't get it. Back then, Facebook was where it was at, I didn't really get Twitter's appeal. I was pretty much just following the handful of people I knew in real life, and Stephen Fry.
So I didn't use it much. I'd pop up every now and then, post a couple tweets and give up on it again. At one point, I even developed an irrational dislike of it - whenever I saw a site had a "follow us on Twitter" button, it irked me for some reason.
But at some point, towards the end of 2009/early 2010, I gave it yet another try. I don't know why. And even when I started using it, I was resistant; still half-heartedly hating it. But what was different this time, is I started chatting with people, and I was introduced to new people.
People who don't get Twitter think it's just that thing where you can tell people when you're eating a sandwich. It's not. It's the people that make Twitter. (Tweens and arseholes notwithstanding.)
But I'm going off on a tangent.
By August 2010, I was well into Twitter - I was posting around 30 tweets per day, and I had around 30 friends*. And back then, I decided I wanted to see what my friends network looked like. So I broke out Python and the Twitter API, I pulled data, and I made the graph. Here's an updated version of it.
[click to embiggen]
Fairly small, and tidy, and relatively uncomplicated. The bulk on the right is the people I knew in real life (from school, etc.) with a few strands of new acquaintances. Note how tightly packed and interconnected they are. To the left is mostly people I met through Twitter - and in particular, through PkmnTrainerJ.
(In case you hadn't figured it out, the node and label sizes are proportional to number of connections.)
By December 2010, I decided to have a look again.
Again, this is an update of the version I originally posted; and in this case, I've tried to arrange it so that key people stay in approximately the same place.
So you still vaguely have that left-right divide, but now there's much more mixing in the middle. I'd made some new friends, but more interesting is the people who were already in the graph who formed new connections with others in my graph.
I'd also like to draw your attention to shinelikestars_ (formerly shinelikestars6) - take a look at the previous graph, can you spot him? From 2 shared connections to 8 in the space of two months. I don't think there's any sort of point I'm trying to make here. I'm just pointing it out 'cause it's interesting.
And for the next year and a half I didn't do any data collecting. It became too labourious - Twitter changed its API, so that my old code didn't work, and I had to do everything by hand.
So, the latest graph was March 2011 (technical details below). As you can imagine, a lot can happen in a year and a half.
First of all, the new people add, and the old people removed. But more importantly, look how much tighter, and how much more 'segmented' the graph is.
There are now three major groups, loosely centred on the three most connected of my friends.
On the far right are, again, the people I knew in real life. In particular, note how little that group has changed since the first graph.
In the middle, we have 'Shiney's People' - people I was introduced to by shinelikestars_. And on the left are the people I was introduced to by PkmnTrainerJ.
The smaller groups circled in red are cliques - smaller subgroups that, at least from my point of view, form their own little groupings, where (almost) everyone is interconnected. The bottom left 'clique', for example, is my parents and big sister.
And I suspect, if you were to extend the graph beyond my network, you would find that those cliques are just parts of larger interconnected groups.
In case you were wondering, PkmnTrainerJ and SallyBembridge are most connected, both with degree 14. shinelikestars_ is next most, with degree 10.
Notable disappearing nodes - Benjidoom, who deleted his account, then created a new, private one (benjirino); and AimlessAmy, who is a long story.
I should also point out that the people I follow who aren't friends with anyone else in my network do not appear in the pictured graphs. Not that they aren't as cool, they just don't join onto the graph.
* I use friend here to mean people who I follow and who follow me back. Though I would probably consider all the people in my current network (including those not pictured) friends to some degree.
Technical stuff
You can read details on how I collected the data before, in the previous blogs. But, as I say, those methods don't work anymore.
For this run, I read up on the API, and found some bits that don't need authentication to grab and manipulate.
First, you can grab a list of a user's friends with this URL
https://api.twitter.com/1/friends/ids.xml?screen_name=<username>
This will give you a list of the friends ID numbers, so you also need to use this to grab usernames
https://api.twitter.com/1/users/lookup.xml?user_id=<idnumber>
There is also a URL to check if a user follows another user
https://api.twitter.com/1/friendships/exists.xml?user_id_a=<idnumber1>&user_id_b=<idnumber2>
Which works through the browser, but I couldn't get to work in my code. So in place, I used the site DoesFollow.com; partly because it uses the URL scheme
DoesFollow.com/user1/user2.
Which is very convenient. Though I do worry all the requests might be putting strain on that site's server.
So, putting all that together with a bit of Python, you get something like this.
A few important points:
1) It will take a while to run. I have ~50 friends, and it took well over an hour to pull all the data. In terms of computational complexity, it's O(n^2), but each of those operations takes a significant amount of time.
2) Twitter has an API limit of 150 requests per hour. The number of API requests the code will make is ~ the number of friends being looked up. I think. Which means, if you have more than 100 or so friends, this code probably won't work. Sorry. There might be a way around it, but I don't know how.
3) Obviously, this doesn't work on protected accounts. So for those people you will have to grab data by hand. Though it's not too bad for a small enough number of people.
If you do want to use the code, I've made it so you just have to change the username at the top, and run it. You will need to install Python though.
For creating the graphs, I previously use ManyEyes. But I moved to using Gephi, because it allows for more customising. The output from the code is a text file with a list of name pairs, which you can import directly into Gephi. It will build the graph for you, and then you're free to play as you like.
Aaand... Yeah, I think that's about it.
Oatzy.
[shinelikestars6 lost his red circle, on account of he isn't my nemesis anymore.]
Showing posts with label maths-free. Show all posts
Showing posts with label maths-free. Show all posts
Wednesday, March 14, 2012
Friend Network Evolution
Labels:
data analysis,
graph,
graph theory,
hand-waving,
infographic,
maths-free,
nerd,
network,
programming,
python,
sociology,
twitter
Saturday, February 18, 2012
Funny Story
So there's four of us at the pub, and we're playing the one word game. And we decide that, since this is the future, we should play a marathon game, via Twitter (complete with hashtag, #OneWordGame).
The One Word Game is where a group of people attempt to collectively tell a story, one word at a time. (Also known as Word at a Time Story).
At this point, we've been playing for about two weeks.
So what's our story? Before that, lets play a game.
Below are two 'stories' - one of them is our word-at-a-time story, the other has been randomly generated (using Markov text generation).
Which is which?
The correct answer is, ours is the first one - probably evident from the vulgar language.
As for the second one; I've discussed Markov generators before. In the simplest case, they work by randomly picking words based on how likely they are to follow the preceding word. This particular example was generated from the first four chapters of Dirk Gently's Holistic Detective Agency (Douglas Adams) using this site.
How does this relate to our game?
Well, the game was spread out over such a period of time that, usually, I'd forgotten the story much beyond the previous few words. So, I was picking my words based on what seemed like a coherent continuation to those few. Not unlike a Markov generator.
And, you have to admit, the two make about as much sense as each other.
At any rate, the game is still on-going..
Oatzy.
[What? I never claim our story was funny..]
The One Word Game is where a group of people attempt to collectively tell a story, one word at a time. (Also known as Word at a Time Story).
At this point, we've been playing for about two weeks.
So what's our story? Before that, lets play a game.
Below are two 'stories' - one of them is our word-at-a-time story, the other has been randomly generated (using Markov text generation).
Which is which?
When the wizard was masturbating upon a picture of your face which is ugly he said that a giant octopus with swashbuckling offspring however walrus munched on his wardrobe handles while reciting to Steve the only one who played the harmonica case under his umpalumpa cheese tasted spectacular when dipped in French wine and peanut butter making apples with a slightly tangy bumhole that had smelly teeth and pickled onions with slices of cherry on toast. Suddenly a massive caterpillar spawned from a seed which smells of turnip. When select acorns they exploded penises all turned into a
There was no further sound other than the soft tinkle of water. But in the middle of the surface area were encrusted with hard-caked earth but the girl who was confined them to perpetual darkness. This time there would be a very narrow neck extending about an inch above the rest. Could be worth a try I think he changes his name from time to time. Since it was meant to support an entire career However I
The correct answer is, ours is the first one - probably evident from the vulgar language.
As for the second one; I've discussed Markov generators before. In the simplest case, they work by randomly picking words based on how likely they are to follow the preceding word. This particular example was generated from the first four chapters of Dirk Gently's Holistic Detective Agency (Douglas Adams) using this site.
How does this relate to our game?
Well, the game was spread out over such a period of time that, usually, I'd forgotten the story much beyond the previous few words. So, I was picking my words based on what seemed like a coherent continuation to those few. Not unlike a Markov generator.
And, you have to admit, the two make about as much sense as each other.
At any rate, the game is still on-going..
Oatzy.
[What? I never claim our story was funny..]
Labels:
algorithm,
games,
markov chain,
maths-free,
random,
twitter,
writing
Friday, July 01, 2011
T-Shirt Calendar: Revisited
If you'll recall, in early February I created a T-shirt calendar - that is, a 'calendar' where each square is coloured according to the colour of the T-shirt I wore on that day. Previous post here.
So, with half the year more or less done, here's what the calendar is looking like now,
There's not really much else to say on the subject, other than to note that there's very little pattern to it, and that I wear a lot of green T-shirts.
So ultimately we're left gazing upon it's random patch-work glory, and wondering what its purpose or meaning might be.
Oatzy.
[For what it's worth.]
So, with half the year more or less done, here's what the calendar is looking like now,
There's not really much else to say on the subject, other than to note that there's very little pattern to it, and that I wear a lot of green T-shirts.
So ultimately we're left gazing upon it's random patch-work glory, and wondering what its purpose or meaning might be.
Oatzy.
[For what it's worth.]
Friday, February 18, 2011
Misplaced Hate and Pointless Arguments
Two of my friends recently (independently) wrote blogs on conceptually similar subjects. And not liking to be left out, I thought I'd throw in my own opinion.
The subject in question is excessive hatred in inconsequential matters; in Aerliss's case tech-snobs, and in Andrew's case Gaga-intolerance.
[I'm simplifying. Read their blogs for the full stories.]
But I'm going to go with a slightly different approach. One of my better qualities is my willingness to admit when I'm wrong. And the truth is, I've been guilty of both those things, and I was wrong to.
So because I like to try and explain things - and like the sound of my own blog voice - that's what I'm going to do.
Rotten Apple
Time was, I had - at least what seemed like - legitimate reasons for disliking Apple, and iPods, and so on; their extortionate prices, the more obnoxious of the fanboys/girls, Steve Jobs' dickishness, and the fact that Apple products are treated as if they're some form of perfection that we should all be aspiring to... But that's beside the point.
Eventually it came to be that I was well known for my general dislike, to the point where people would (and still do) say thing like "if you get an iPhone, Chris will disown you". And was at one point mocked when I said,
"Today sees the release of the iPhone in American, and despite the arguments we had over at Andrews blog, I really would like one. It's just so smooth and shiney [sic]."
Of course, back then, there really weren't any other smart phones quite on the same level.
Strong followings create strong oppositions. The more devoted the fans, the more pissed off and irrational the 'haters'.
The sobering moment for me came when I was sneering at an iPhone advert, and was called-out for being just as obnoxious as the Apple-snobs I so despised.
Don't get me wrong, when fanboys get all Apple-snobbish around me, I still feel an overwhelming urge to slap some sense and humility into them. But otherwise, I've mostly just stopped caring.
And it does makes me feel a little uneasy, and guilty, when people expect me to automatically hate everything Apple-related. Also, Blackberry.
Attention-seeking, Talentless...
In fact, I have nothing against Lady Gaga. So I'm going to talk about Justin Bieber instead.
I didn't really care about his existence for a long time. And when I first heard his music, I found it not to my taste. Whatever. But when I started using Twitter more, his existence became somewhat unavoidable [until].
As Andrew points out, like it or not, everyone's entitled to their opinion.
So when I'm listening to, say, T-Rex and the little sister tells me to "turn off that crap music", while blasting some crappy dance music from her phone like a chav on a bus; while I may feel morally obliged to slap her for having such a disastrously wrong opinion, she is still (technically) entitled to that opinion.
Even if she is wrong.
Fact is, when it comes to celebrities, 'hatred' and disputes of opinion are seldom reasonable. You don't like their music? So what. Don't listen to it. But it's never that simple.
Justin Bieber is one of those particular divisive individuals - you either love him or hate him. Well, actually, there are people who occupy the 'couldn't care less' middle ground, but they can't be heard over the sound of squealing 14 year old girls, and the loud mockery of people who by all rights shouldn't give a damn and should know better.
And what goes for the Biebs, goes for the Gaga.
In these instances, there's a lot of herd mentality involved - you'll typically align your opinion of a divisive artist with that of your friends; even if you secretly have a few of their track on your 'guilty pleasures' playlist.
The other thing is, these artists tend to be very easy targets. If you're vocal about disliking someone like Beiber, and you make jokes about them, your friends will laugh and agree with you, and you get a sort of encouragement and reinforcement from it.
Unreasonable Reasoning
People often aren't as in control of their actions and their thoughts as they'd perhaps like to believe. Whether we like it or not, we're quite easily influenced, and manipulated.
First of all, otherwise reasonable opinions can become exaggerated over time. This might be the result of reinforcement from peers. Or your opinion can just plain be influenced by your peers.
Whether or not we like to admit it, there's sometimes a certain amount of jealousy and/or envy at the root of pointless hate as well. Similarly, other times, we dislike things because other people like them and/or they're popular. It doesn't make sense, but we do it anyway. Because we're all beautiful, unique snowflakes... *cough*. Or sometimes because a certain person or people that we don't like, likes them.
When these matters develop into arguments, another thing you get is escalation - even an argument that starts based in logic and reason can develop over time into a meaningless shouting match. And this usually reinforces and magnifies now empty opinions, as well as encouraging stubbornness.
And when that happens, your only hope is to call it quits and get out with your dignity in tact. Because when that happens, no-one ever 'wins'.
That's why I try not to get into arguments regarding Mac vs PC, religion vs atheism, conservative vs liberal, etc. It's a exercise in futility, and I have better things to do with my time.
Really, the best response to all this, and the people who insist on bothering you with this nonsense, is to say "So fucking what. Go bother someone who gives a damn".
And if you're really dead set on having pointless arguments, you'll find the Pointless Internet Argument Forums here. Otherwise, for the love of God, keep it to yourself.
Oatzy.
[Learned the error of my ways. Mostly.]
The subject in question is excessive hatred in inconsequential matters; in Aerliss's case tech-snobs, and in Andrew's case Gaga-intolerance.
[I'm simplifying. Read their blogs for the full stories.]
But I'm going to go with a slightly different approach. One of my better qualities is my willingness to admit when I'm wrong. And the truth is, I've been guilty of both those things, and I was wrong to.
So because I like to try and explain things - and like the sound of my own blog voice - that's what I'm going to do.
Rotten Apple
Time was, I had - at least what seemed like - legitimate reasons for disliking Apple, and iPods, and so on; their extortionate prices, the more obnoxious of the fanboys/girls, Steve Jobs' dickishness, and the fact that Apple products are treated as if they're some form of perfection that we should all be aspiring to... But that's beside the point.
Eventually it came to be that I was well known for my general dislike, to the point where people would (and still do) say thing like "if you get an iPhone, Chris will disown you". And was at one point mocked when I said,
"Today sees the release of the iPhone in American, and despite the arguments we had over at Andrews blog, I really would like one. It's just so smooth and shiney [sic]."
Of course, back then, there really weren't any other smart phones quite on the same level.
Strong followings create strong oppositions. The more devoted the fans, the more pissed off and irrational the 'haters'.
The sobering moment for me came when I was sneering at an iPhone advert, and was called-out for being just as obnoxious as the Apple-snobs I so despised.
Don't get me wrong, when fanboys get all Apple-snobbish around me, I still feel an overwhelming urge to slap some sense and humility into them. But otherwise, I've mostly just stopped caring.
And it does makes me feel a little uneasy, and guilty, when people expect me to automatically hate everything Apple-related. Also, Blackberry.
Attention-seeking, Talentless...
In fact, I have nothing against Lady Gaga. So I'm going to talk about Justin Bieber instead.
I didn't really care about his existence for a long time. And when I first heard his music, I found it not to my taste. Whatever. But when I started using Twitter more, his existence became somewhat unavoidable [until].
As Andrew points out, like it or not, everyone's entitled to their opinion.
So when I'm listening to, say, T-Rex and the little sister tells me to "turn off that crap music", while blasting some crappy dance music from her phone like a chav on a bus; while I may feel morally obliged to slap her for having such a disastrously wrong opinion, she is still (technically) entitled to that opinion.
Even if she is wrong.
Fact is, when it comes to celebrities, 'hatred' and disputes of opinion are seldom reasonable. You don't like their music? So what. Don't listen to it. But it's never that simple.
Justin Bieber is one of those particular divisive individuals - you either love him or hate him. Well, actually, there are people who occupy the 'couldn't care less' middle ground, but they can't be heard over the sound of squealing 14 year old girls, and the loud mockery of people who by all rights shouldn't give a damn and should know better.
And what goes for the Biebs, goes for the Gaga.
In these instances, there's a lot of herd mentality involved - you'll typically align your opinion of a divisive artist with that of your friends; even if you secretly have a few of their track on your 'guilty pleasures' playlist.
The other thing is, these artists tend to be very easy targets. If you're vocal about disliking someone like Beiber, and you make jokes about them, your friends will laugh and agree with you, and you get a sort of encouragement and reinforcement from it.
Unreasonable Reasoning
People often aren't as in control of their actions and their thoughts as they'd perhaps like to believe. Whether we like it or not, we're quite easily influenced, and manipulated.
First of all, otherwise reasonable opinions can become exaggerated over time. This might be the result of reinforcement from peers. Or your opinion can just plain be influenced by your peers.
Whether or not we like to admit it, there's sometimes a certain amount of jealousy and/or envy at the root of pointless hate as well. Similarly, other times, we dislike things because other people like them and/or they're popular. It doesn't make sense, but we do it anyway. Because we're all beautiful, unique snowflakes... *cough*. Or sometimes because a certain person or people that we don't like, likes them.
When these matters develop into arguments, another thing you get is escalation - even an argument that starts based in logic and reason can develop over time into a meaningless shouting match. And this usually reinforces and magnifies now empty opinions, as well as encouraging stubbornness.
And when that happens, your only hope is to call it quits and get out with your dignity in tact. Because when that happens, no-one ever 'wins'.
That's why I try not to get into arguments regarding Mac vs PC, religion vs atheism, conservative vs liberal, etc. It's a exercise in futility, and I have better things to do with my time.
Really, the best response to all this, and the people who insist on bothering you with this nonsense, is to say "So fucking what. Go bother someone who gives a damn".
And if you're really dead set on having pointless arguments, you'll find the Pointless Internet Argument Forums here. Otherwise, for the love of God, keep it to yourself.
Oatzy.
[Learned the error of my ways. Mostly.]
Labels:
arguements,
maths-free,
opinion,
psychology,
random,
sociology
Wednesday, February 16, 2011
Designing for Free
First of all, you've probably noticed the new logo. Unless you're reading this in an RSS reader. If you are, go to the blog and gaze into it's logo-y goodness.
See what I did there? I totally earned that A in GCSE Design Graphics.
I like it, at any rate.
The actual title came from when the blog was still called 'Oatzy's Blog'. Which was a terrible title, but I couldn't for the life of me think of anything better. But I did have a subtitle idea - "Answering the questions no-one asked". In the end, I just thought "fuck it", and went with that.
If you were wondering about the orange, it's a kind of throwback from the website I made (no longer online) for our 'Young Enterprise' thing in sixth form - our company was called 'Purple Oranges'. But that's a whole other story.
[we made beanbag chairs]
Aside from that, I've been 'hired' to make the website for Dearne Valley Swimming Club, which my mum and little sister are involved in.
[I also re-drew and vectorised their logo at no extra cost]
Now, according to this flowchart, seeing as it's for my mum, I should work for free. Not that I've ever charged for building a website.
[no longer his]
But I have been 'paid' this time, with a bottle of rum. And frankly I'm content with that.
And if I'm honest, I enjoy doing it anyway.
Or I did; We're past the interesting part, and it's all just adding content now. Which is dull.
Here is the link.There's only an under-construction page there at the moment, and I doubt you'd be interested anyway, but with each link I post to it, the page's search rank will get incrementally better - it's currently on page 3, with the old, no-longer-functioning site dominating the first page of results.
In fact, if you're interested,you can see the work in progress design here, or just look at the image below
[edit] - the site is now complete.
I'm not completely content with it, if I'm honest. I think I've laid it out a little too much like a blog, among other thing. But it might just be that I've been looking at it for too long. The important thing it, the people I'm making it for seem to approve. So can't complain.
That said, if you have any suggestions, constructive criticism or flattery, do feel free to offer it up.
Oatzy.
[I also made a Twitter account for them.]
See what I did there? I totally earned that A in GCSE Design Graphics.
I like it, at any rate.
The actual title came from when the blog was still called 'Oatzy's Blog'. Which was a terrible title, but I couldn't for the life of me think of anything better. But I did have a subtitle idea - "Answering the questions no-one asked". In the end, I just thought "fuck it", and went with that.
If you were wondering about the orange, it's a kind of throwback from the website I made (no longer online) for our 'Young Enterprise' thing in sixth form - our company was called 'Purple Oranges'. But that's a whole other story.
[we made beanbag chairs]
Aside from that, I've been 'hired' to make the website for Dearne Valley Swimming Club, which my mum and little sister are involved in.
[I also re-drew and vectorised their logo at no extra cost]
Now, according to this flowchart, seeing as it's for my mum, I should work for free. Not that I've ever charged for building a website.
[no longer his]
But I have been 'paid' this time, with a bottle of rum. And frankly I'm content with that.
And if I'm honest, I enjoy doing it anyway.
Or I did; We're past the interesting part, and it's all just adding content now. Which is dull.
Here is the link.
In fact, if you're interested,
[edit] - the site is now complete.
I'm not completely content with it, if I'm honest. I think I've laid it out a little too much like a blog, among other thing. But it might just be that I've been looking at it for too long. The important thing it, the people I'm making it for seem to approve. So can't complain.
That said, if you have any suggestions, constructive criticism or flattery, do feel free to offer it up.
Oatzy.
[I also made a Twitter account for them.]
Labels:
maths-free,
photoshop,
programming,
random,
web design
Subscribe to:
Posts (Atom)








