December 27, 2007

Twitter Stats

Final Update to This Post For those not following along at home, I finally took Twitter Stats to the next level and released a webified version over at TweetStats.com. I, somewhat unfortunately, had to go with TweetStats as twitterstats.com was already taken. :( I made a post about it here and you can see an example of my stats on the site on the graphs page.

So I’ve been a user on Twitter for a little over a year, but it wasn’t until recently when I hit 2000 tweets that I wanted to see what my Twitter history looked like over that period. Ever being the statistics nerd, I pulled down all of my tweets and using a combination of curl, sed, grep, Excel, and Numbers, managed to generate some nice graphs.

Being the automation weenie that I am, I eventually hacked together a perl script that did everything except paste the data into Numbers.Although I won’t post it here (because I think the Twitterocracy would have a cow with how it’s implemented), you can DM me your email and I’ll send you the code and instructions. See below - bugs be damned, I’ve made it publicly available.

Basically, the script pulls down all your tweets and stores them in an csv file. It then runs some statistics on the csv file and then copies the resulting stats to the OS X clipboard to paste into each table within Numbers. If run with a pre-existing tweets csv file, the script will calculate the different between your current status count and only download the pages necessary, thus saving the Twitter servers from some bandwidth. ;)

For the record, here are mine. :-D
@dacort's Twitter Stats

Update Thanks to kosmar for pointing out that I can actually do this entire thing without your password. Head => Wall. I’ll be updating it accordingly and hopefully even making a webservice out of it soon. :)

In addition to not needing your password, the script should also adjust the times for your tweets to whatever the system time is where you run the script.

Another update: I’ve also posted the script on my site and you can download it here: twitter_stats.zip. Feel free to contact me with any questions via twitter or web.dpc at dcortesi . com.

Many people have noticed a large after-lunch spike around 2pm. At least for me, this was due to Twitter being down most of the morning one day and then tweeting like crazy when it came back online.

BUG FOUND AND SQUASHED

There was a small bug that cropped up after I switched the script to not require your password. It accounts for the odd “[Tuesday|January|2pm] Peak” that people were seeing. This bug has now been fixed and an updated script is available. My apologies.

Unfortunately, if want the most accurate tweets, you will have to rm your csv file and run the script again.

Date::Calc aka failure on line 13
Some of you (on Tiger?) may be missing the Date::Calc module that I use to figure out weekdays. Although I tried to use as few perl modules as possible, this one was essential. Use the following command (thanks to a couple twitter peeps for the reference) to install:
sudo perl -MCPAN -e 'install Date::Calc' and keep hitting ‘y’. ;)

Final (hopefully) Update on this page as it’s getting messy.

For those of you not on OS X with Numbers, there are a few options:
@bck webified my code (w00t): Twitter Stats
@mmc decided to use gnuplot: Twitter Stats in SVG Using GNUPlot
@cbarrett modified it to utilize the Google Chart API: Twitter Stats with GChart
@kejadlen reverse engineered my original script to Ruby: Twitter Stats in Ruby

I still want to write my own webified version (Google Chart aesthetics leave a little bit to be desired…), but I have yet to settle on an option that I like.

December 12, 2007

Rothenburg ob der Tauber

Since German does not have the th-sound (as in thin), the proper pronunciation of the first syllable of the name is more or less like English wrote, while -burg is similar to “buak.” Source: Wikipedia.

This town not only brings you back hundreds of years, but it makes you feel like a little kid at the same time. I don’t know too many children that don’t get excited by the idea of knights and castles and such imaginations run rampant while wandering the cobble-stone-lined streets of this town.

Take yourself back 500 years - the sleepy guard on the lookout tower right at dusk. Fog rolling over the German hills and seeping through the forest. A light registers in the distance, then two. Then five-thousand more crest the hill as you run to the tower bell and start alerting the forces. Imagine that you can feel all of that standing on the lookout tower in Rothenburg and the only difference is that the two lights are vehicles far in the distance and the five-thousand are a neighboring town turning their lights on as dusk settles over the countryside.
Imagine being on lookout duty!

That’s the magic of this town.

But perhaps it was the fact that you enter through a small door in a 30-foot high wall into a town straight out of medieval times. Perhaps it was the way I walked forward, turned left, and saw a guard tower that I almost broke into a run to get to. Perhaps it was the darkened hallways of the castle walls that made me feel like a soldier stealthily bypassing the defenses of the town. Perhaps it’s the extent that one can explore this town, parts of which are from 1250, and it doesn’t feel like it’s been changed since its creation.
Am I supposed to be in here?

Ultimately, it’s the weight of many generations of history that are readily apparent even to the casual observer. I’ve already mentioned the castle walls and the lookout tower for the little boy in all of us. But take a step into St. Jacob’s church and immediately you are humbled by the beauty of this creation for God. Two altars, carved by a famous wood carver are unspeakably amazing creations of art. Hours along could be spent gazing at the detail that has been painstakingly carved such as to nearly bring the scenes to life. Differences in architectural styles can be seen as you gaze upwards to the ribbed arches and you see how masons began to realize the strength of arches and widen the windows as a result.
The High Altar (1466) and stained glass windows 56 ft. high. Altar of the Holy Blood

The Christmas Market is also a draw for many towns in Germany at this time of year, Rothenburg not excluded. Gluhwein (mulled wine) is an important stable of all these markets and I couldn’t help but grin as I stood there sipping my gluhwein listening to carolers in some distant corner of a building. Passersby could obviously see the child-like glint in my eye as more than one person gave me the smile that says “I can tell you’re having a great time, are completely content, and it’s so evident…I must smile with you”. Or they could have just been poking fun at an obviously out of place American. I forgot to mention I was carrying an umbrella with “Deutschland” written all over because I didn’t have one of my own and had to pick up one at one of the many touristy shops.
A view down into the town square

I will admit, the city is very touristy, but that in no way diminished its charm or spectacle for me. If anything, the desire to maintain authenticity (iron signs still have to be approved to hang outside businesses, at least on one street) furthers the experience.

The Medieval Crime Museum was also fairly interesting - I didn’t quite realize how well-established the protocol for torture originally was. Again, as a child that was interested in crime, criminals and medieval times, this town and its associated history could easily have kept me preoccupied for more than the time I allowed myself.
Shame mask

I also chose to drive to Rothenburg, approximately an hour-long drive from where I’m staying. Had it not been raining steadily, I probably would have been hanging my head out the window like a dog checking out the beautiful German countryside and quaint little towns. I admittedly did stop a couple times just because the architecture is so unique and intriguing to me. The German road system is fairly easy to follow if you’ve planned your trip out ahead of time and you don’t deviate too much.
Another quaint little German town

Again, feel free to check out the photos on flickr of Rothenburg.

December 9, 2007

Amsterdamalicious

Sometimes you visit a place and feel instantly at home. You wander the streets within two days of arriving and already feel as if you know where you are and where you’re going and can get wherever you want to go.

This was Amsterdam for me.

I dropped in on a Wednesday night with absolutely no idea of what to expect from the city of the famed Red Light District and “coffee shops”. Nor had I even looked at a map of the city.

Cobble-stone streets and bicyclist after bicyclist whizzing by on the left and trams whizzing by on the right is the first image that pops to mind. I had about a day of wandering the city where I just felt my senses buffeted from all angles. The shock of open prostitution and the smell of legalized “soft drugs” combined with the tight streets where you must dodge bikers, cars and trains left me in a bit of a dazed state. After a canal boat tour and wandering around the city for a good couple hours, however, I regained my senses and started to feel at ease. The city feels a bit hectic at its heart, but once you allow yourself to relax everything seems copacetic.

Being fairly small and flat - Amsterdam is a walking and biking kind of city. Arriving on the train, I was amazed to see the gigantic bicycle parking structures but seeing as how the majority of the population utilize bikes to get around the city, it makes sense. I quickly learned that the bike lanes are almost as wide as some of the streets and there is no forgiveness for the inattentive tourist that does not pay attention to the bikers.

Amsterdam is a city for the explorer. It is a city for the person that relishes in finding the tiny, obscured alley that leads to a completely different world than the road you just stepped off of. The city is jam-packed, and as such every twist and turn affords a new surprise, a new smell, a new site. Amsterdam is also not for the weak at heart. Prostitution is legal. The Red Light District is real and marked on the tourist map. Drug dealers whisper different vices into your ear as you slide past them in the red-hued darkness at night. Various smells of other more recreational, legal drugs drift past your nostrils as you walk the streets. No, Amsterdam is not for those lacking a sense of adventure.

Perhaps a few of my favorite experiences. Restaurant Savini, located just steps from the hotel I stayed at, is a fantastic Italian restaurant. Stepping in flooded my mind with memories and good friends, who I then text messaged a quick hello from Amsterdam. I ate here one other time in my short stay and it was well worth it.

Cafe Pacifico - the first restaurant in Amsterdam to sell Mexican cuisine. Despite the absolutely terrible service (”That’s where our waiter was, flirting with girls at the bar.”), the food was excellent and living on a regular diet of beer and bratwurst the past week, a much appreciated change.

The beer tasting cafe I stumbled upon while wandering the city, called Cafe Gollem. Although I didn’t get a chance to step inside, the signs outside had me hooked at the mention of 200+ beers, 95% of which were Belgian. A cozy joint in the style of what are called Amsterdam “brown” bars, I could easily see losing myself in there several nights a week.

The church I took refuge in when it started raining - note that I am biased because I love church and cathedral architecture so I will sit in a church and just stare at the structures.
A church I visited the day before Artsy-fartsy in the church.

The “Welcome to Detroit” sign in the center of town that mysteriously disappeared when I took others to show it the next day.
Welcome to Detroit?

Finally, Begijnhof. A courtyard located just off the center plaza in Amsterdam that offers an amazing barrier to the hectic pace of the city. Quiet, surround by typical Amsterdam-style homes, with a church in the middle that was unfortunately closed to the public because of a concert.
The church at Begijnhof Statue in the courtyard Lovely little courtyard

There are more photos up on my Flickr page of the trip: .

It was a fun trip, even with the additional train adventures. ;o)

December 5, 2007

Amsterdam

Well I just arrived in Amsterdam and already, “window shopping” has taken on a whole new meaning. I had absolutely no clue what to expect of the city, but even the 15-minute walk from the station has confirmed pretty much everything I’d heard about it.

My cohort in crime and I walked out of the train station just before midnight with nary an idea of where to go. After extracting some money from the ATM and printing out a shady-looking map, we headed across the street dodging construction workers (again, midnight) and motorized bicycles zooming down the bicycle lane that’s so dedicated it’s actually just a mini street next to the regular one (which isn’t so big itself). We continued walking, trying to determine where we were but street signs seem to be rather sparse. Eventually we felt we had walked too far and, succumbing to our better male senses, walked into a random hotel and asked for directions. The guy at the front desk pulled up Google Maps and showed us where we had to go. About 8 head shops and 2 “red light” shops later, we were at our hotel.

Brief commentary - Until you see a scantily clad group of women standing in windows basically selling themselves in person…it just doesn’t seem real. Now I’ve been around this world for a while and even the sight of those women as I was walking by made me blush like a little kid. In any case…

We’re settled into the hotel now, after a fun ride up from where I’ve been staying in Germany…despite a three-hour delay. Meh. But luckily we missed our connection in Frankfurt (we think we should have just stayed on the train, but as neither of us understand much German…) and hung out in the airport for an hour and a half. I say luckily because the original train we were supposed to be on broke down and the passengers had to get toted back to the next one that we ended up having to catch.