September Snapshots

Stockholm is one of the few European capital cities to allow hot air balloon flights over the city centre, so its not unusual to see half a dozen balloons drifting over the city in the Summer and Autumn evenings.

Hot air balloons

Hot air balloons

Gröna Lund is the theme park on the island of Djurgården in central Stockholm, it closes for the winter but for a while in the Autumn its still open in the evening providing an interesting light display to photograph.

Gröna Lund light up at night.

Gröna Lund light up at night.

As Autumn draws on people like to spend as much time in the sun as possible before the short winter days really start to close in. Here couples are sitting on the water wall beside the Swedish Parliament building to catch the suns rays.

Couples enjoying the sun at the Riksdagen.

Couples enjoying the sun at the Riksdagen.

Counting words and images in RSS posts with python

I have often wondered how many words I should be aiming to have per blog post or how many images I should include. This lead me to reach for python and whip up the following script which will grab the posts from a sites RSS feed, count the image tags, strip the HTML and then count the words left.

This script lets me see the minimum, maximum and average number of images and words for some of my favourite blogs, which have an average word count of about 330 words and a dozen images. This is reassuring as I was never sure how many words justified a post and its clear indication that I should consider using images much more..

### Script to fetch an RSS feed and work out the min, max, average word and 
### image counts of posts in the feed.

import xml.etree.ElementTree 
import urllib2
from HTMLParser import HTMLParser

class MLStripper(HTMLParser):
    ### From http://stackoverflow.com/questions/753052/
    def __init__(self):
        self.reset()
        self.fed = []
    def handle_data(self, d):
        self.fed.append(d)
    def get_data(self):
        return ''.join(self.fed)

def strip_tags(html):
    ### From http://stackoverflow.com/questions/753052/
    s = MLStripper()
    s.feed(html)
    return s.get_data()

def getPostStats( url ):
    ### Fetch specified feed and count words and images per post.

    # Download the feed.
    raw = urllib2.urlopen(url)

    # Parse the feed xml.
    parsed = xml.etree.ElementTree.parse(raw)
    root = parsed.getroot()
    channel = root.find('channel')

    titles = []
    images = []
    words = []

    # Find the articles (items)
    for item in channel.findall('item'):
        text = item.findtext('description','')

        # RSS 2.0 uses content instead of description for the post body!
        namespaces = {'content': 'http://purl.org/rss/1.0/modules/content/'} 
        content = item.findtext('content:encoded','', namespaces=namespaces)

        if len(text) < len(content):
            text = content

        # Count the number of images
        images.append(text.count('<img'))
 
        # Count the number of words
        text = strip_tags(text)
        words.append(len(text.split()))
        
        # Get the post title
        titles.append(item.findtext('title',''))

    return titles,words,images

def getMinMaxAvg( counts ):
    ### return the min, max & average counts.

    minCount = min(counts)
    maxCount = max(counts)
    avgCount = sum(counts,0) / len(counts)

    return minCount,maxCount,avgCount 

if __name__ == "__main__":
    # List of interesting blogs.
    TESTURLS = [ {"name":"Lady Slider", "url":"http://www.ladyslider.com/blog?format=RSS"},
                 {"name":"Shoot Tokyo", "url":"http://shoottokyo.com/feed/"}, 
                 {"name":"DeadPxl", "url":"http://dedpxl.com/feed/"}, 
                 {"name":"circa 1983", "url":"http://blog.circa1983.ca/rss"}, 
                 {"name":"David Duchemin", "url":"http://davidduchemin.com/feed/"} ]

    # Go find the image and word counts for each blog!
    for TEST in TESTURLS:
        TITLES,WORDS,IMAGES = getPostStats( TEST["url"] )

        print "--- %s ---" % TEST["name"]

        for n in range(0,len(TITLES)):
            print "  '%s' - %d words, %d images." % (TITLES[n],WORDS[n],IMAGES[n])

        print "Posts - %d." % len(TITLES)
        
        MIN,MAX,AVG = getMinMaxAvg(IMAGES)
        print "Images  - Min: %d Max: %d Avg: %d." % (MIN,MAX,AVG)
        
        MIN,MAX,AVG = getMinMaxAvg(WORDS)
        print "Words   - Min: %d Max: %d Avg: %d." % (MIN,MAX,AVG)

You should get output like the following for each RSS feed:

--- David Duchemin ---
'PHOTOGRAPH, Issue 10' - 203 words, 16 images.
'Make It Now.' - 524 words, 1 images.
'A World of Stories' - 378 words, 3 images.
'Light , Gesture, & Color' - 449 words, 4 images.
'Cape Churchill Polar Bears' - 714 words, 7 images.
'Hudson Bay Polar Bears' - 330 words, 1 images.
'Study the Masters: Margaret Bourke-White' - 655 words, 4 images.
'About Critique' - 693 words, 1 images.
'Inspired by the Tangible' - 518 words, 1 images.
'The Created Image, Vol.02' - 390 words, 3 images.
Posts - 10.
Images - Min: 1 Max: 16 Avg: 4.
Words - Min: 203 Max: 714 Avg: 485.

Solo hiking from Abisko to Beisfjord – Part 2

Part one of this trip can be found here.

Start of day four: this cairn marking the Swedish-Norwegian border.

Start of day four: this cairn marking the Swedish-Norwegian border.

The next day started dry as I left the Unna Allakas hut to hike towards the Swedish and Norwegian border, sporadic rain showers greeted me near the border where I quickly took a few self portraits as evidence!

An 'interesting' bridge design.

An ‘interesting’ bridge design.

I find that the Norwegian mountains feel like a bigger version of the Scottish mountains but with added glaciers and rain deer!  What I hadn’t really planned for was the boulder fields, these take time to cross safely hoping from rock to rock and I was very glad of the extra balance from my hiking poles.

Break in the rain on route to Oallavagge hut.

Break in the rain on route to Oallavagge hut.

Thankfully the showers weren’t as heavy as the previous day and I made good progress for most of the day.  My aim was to reach the Norwegian Oallavagge survival hut and dry out before taking an alternative shorter but steeper route to the next campsite over the mountain’s shoulder.

Inside the Oallavagge survival hut.

Inside the Oallavagge survival hut.

The short cut was indeed a time and distance saver but it was quite allot of work, the rain and cloud had settled in by then so despite starting out from the survival hut dry I was soaked again fairly quickly.  It did get me to the Hunddalshytta huts quickly and I was lucky enough to find them occupied so I could go inside for the night to dry off instead of pitching a tent in the rain and wind!

Inside the main Hunddalshytta hut.

Inside the main Hunddalshytta hut.

The final day started overcast with some drizzle and stayed that way for most of the day, the first stage of my route was simple enough following the trail along the valley and crossing some more boulder fields.  The next stage was a very steep ascent with some stream fording, there wasn’t as much zig zagging to break up the climb as I’d have expected so it was very tiring work.

Start of day five, lots of boulder fields.

Start of day five, lots of boulder fields.

On reach the top of the climb I was rewarded with a view of the lake I’d soon be skirting around, which was glacier blue in colour.  Following the trail I was dismayed to find a sheet of icy snow covering the lake side and it was bordered by the cliffs above.  So I had the choice of attempting to kick steps in the snow and risk a swim in the lake or work my way back and climb the snow to traverse between the snow and the cliff.  I took the later option which was still fairly sketchy but felt safer than risking a swim with a 19 kg pack in cold water!

Just after the snow field traverse, icy blue lake just visible through the rain.

Just after the snow field traverse, icy blue lake just visible through the rain.

After crossing the snow I was hoping for an easier time only to discover the traverse around the lake was going to be on granite slabs, with water was streaming over them as the rain had picked up with the clouds descent.  I was glad of my previous rock climbing experience and the whole experience was accompanied by mutterings of ‘Fast is slow, slow is fast’ as I tried to resist the urge to rush across the slabs.  A fall felt like it would turn into a slide which would most likely end with a fall and/or a swim in the lake.  The descent from the lake to the forest below was not over broken ground as I’d hoped but more slabs with running water and the dull roar of unseen waterfalls..

The rain washed granite slabs, red route markers just visible.

The rain washed granite slabs, red route markers just visible.

Eventually the slabs started to break up and I saw through a break in the clouds the forests below and Narvik off in the distance.  This was great morale booster but I had to double my efforts to resist the urge to rush down the final sections.  After the descent was complete and I was on the gravel forest road I was safe to eat, drink some water and then yomp the last 10 km into Beisfjord.

Narvik: the destination visible for the first time!

Narvik: the destination visible for the first time!

After all my efforts I was happy to wait for the bus to cover the last 10 km to Narvik and I later saw from the bus that there’d have been no path on the road to Narvik anyway.  Narvik itself is on the side of a step hill so I had one final ascent to make to the hotel before I could have a shower, eat some food and then sleep!

High above the fjords on the Lofoten railway.

High above the fjords on the Lofoten railway.

It was a great trip, I’d wished the weather was better as I could have spent more time taking pictures in the evenings.  The Swedish and Norwegian mountain huts were a revolution, I saw a few parties who only stayed in the huts and that meant they only needed small day packs!

An mountain village between Narvik & Absiko.

An mountain village between Narvik & Absiko.

Narvik itself was an interesting little town, the war museum is great and the Lofoten railway from Narvik to Abisko is amazing as the train line winds its way up the mountain sides above the fjords.  I even managed to get an upgrade to a empty sleeping compartment on the train ride back!

Solo hiking from Abisko to Beisfjord – Part 1

Ever since visiting Abisko in February and snow shoeing into the national park for an afternoon I’ve been thinking it would be interesting to return to the same area in summer.  Over the course of the summer the idea of doing a multi day hike from Abisko through to Brejsford in Norway came to my mind as an excellent potential adventure.

The start of the Kungsleden in Abisko national park.

The start of the Kungsleden in Abisko national park.

This trip had the added appeal of being able to take the night train from Stockholm to Abisko and then from Narvik to Stockholm on the way home.  I enjoy travelling by train as it lets you see the countryside better than in an plane and also allows for some fun abstract long exposure pictures especially if you have an NF filter!

Fjällräven Classic participants near lake Abiskojaure.

Fjällräven Classic participants near lake Abiskojaure.

My plan was to solo hike over five days and four nights from Abisko to Beisfjord and then to recover for a day or two in Narvik before getting the train back home.  I was happy to find that my hiking pack (Osprey Aether 60) was sufficient to the task of carrying my gear, clothes and food for five days.  Although I did leave the bigger cameras at home and just took my Sony RX100 and most compact Gitzo Tripod.

Start of day two, looking back.

Start of day two, looking back.

The first day started late due to the night train getting delayed for a few hours by a signal fault, so I eventually made it to Abiskojaure campsite at 2200 in the evening.  To my dismay I found the campsite already full due to the Fjällräven Classic event that was running along the Kungsleden.  So I hiked a few more kilometres along my planned route and wild camped outside the park for the night in the woods.

Morning break, day two.

Morning break, day two.

My extra hiking the night before meant I had a shorter day ahead of me, the day started sunny but got more cloudy over the afternoon with the odd shower developing.  The trail stayed near the river mostly in light forest, at one point I passed through an empty village of what I assume are winter huts which was an quite eerie experience.  I decided to camp earlier than planned when I came across a good campsite near the last fjord of the day.

Ghostly cabins..

Ghostly cabins..

The early campsite turned out to be a good call as just as I finished setting up the tent it started raining and didn’t stop for the next fourteen hours!  The rain was a pain as I didn’t get a chance to get changed or get my mattress inflated before I got in the tent.  So I was wet, tired and fell asleep on the tent floor.  I woke shivering which was startling as I usually don’t get cold and as it was still raining had to try to inflate an air mattress inside the tent, then get changed into dry cloths and eat some cold food.

The night wasn’t the most peaceful as the heavy rain and my tents pitching meant I was getting some water pooling on top and a little dripping inside.  This concerned me as my sleeping bag is down filled and down doesn’t work well as an insulator once its wet!  Thankfully the drip never got bad enough to soak the bag but I still had a restless nights sleep.

Warden's hut at Unna Allakas.

Warden’s hut at Unna Allakas.

The next day I broke camp after getting some warm breakfast and coffee, as the sky was looking dark and brooding I decided to stop in Unna Allakas (a Swedish mountain hut) that was 5km down my route and ask the warden about the weather forecast.  Shortly after starting hiking the rain started again and I was pretty soaked by the time I reached the hut.

The hut warden Anna told me the forecast was meant to be a bit better for tomorrow so I decided to deviate from my plan and spend the whole day and night in the hut drying out my gear.  This would mean having a longer day for the final two days of my trip but watching the weather from inside the hut I didn’t regret my choice at all!  As hiking in those showers and camping with wet gear would have been fairly miserable experience!

To be continued..

The Return of the Compact Camera

I used to have a Canon S100 but I gave it to a friend at the start of the year as I’d hardly used it for a while.  Over the summer though I again started to feel the need for a compact pocketable camera that I can take with me everywhere.  The trip to Scotland and Copenhagen reinforced this as I carried my X-E2 the whole time but didn’t actually use it more than a few times..

The Sony DSC-RX100 is an amazing little camera.

The Sony DSC-RX100 is an amazing little camera.

So when I returned to Stockholm I started looking at compact camera options with RAW support, manual controls, small size and decent image quality.  I ended up choosing a Sony RX100 as it had all of my desired features (except a built in ND filter) and was pretty cheap due to the third version being recently released.  The massive 1″ sensor, F1.8 Zeiss lens and metal construction make for a very competent little camera.

The Really Right Stuff camera plate I had for my S100 even fits the RX100 too, although it does block access to the memory card and battery compartment.  This isn’t a huge issue as the RX100 charges the battery in the camera via USB which means I can charge it with an USB external battery pack and I don’t need to carry ‘yet another’ charger with me.

Copenhagen for a day

During my January visit to Copenhagen I had thought it would be really good to come back in the summer time but I hadn’t made an plans to do so. However on my way back from visiting family in Scotland there was a airport mistake that meant I could spend a day in Copenhagen!

Nyhavn Tour Boat

This was a blessing, although it did mean carrying around my carry on luggage and duty free for the whole day in 28C heat with 94% humidity! The humidity was the reason I’d opted to go into the city centre instead of waiting in the airport as the airport is very modern (i.e mostly glass) and not made to cope with such extreme humidity!

Nyhavn Canal I

The centre of Copenhagen isn’t made for that sort of heat either but at least you can get outside easily. I even saw some people swimming in the city centre to cool down which seemed like a great idea if I’d had my swimming trunks!

Nyhavn Canal II

It truly is a beautiful city and I was so pleased to be able to see it in the summer time. Nyhavn in particular was very different from my winter visit and I got some photos I’m pretty happy with from there. Not to mention a nice cold beer from a street vendor, got to love Denmark!

My baggage was even waiting for my in Stockholm when I arrived.