Close

Photo calender using R

Create an elegant photo calendar completely using R.

I had this idea of using some of my travel photos to create a photo calendar. I would normally go about it using Adobe Photoshop or Adobe Illustrator. But, that would involve a lot of manual work placing dates and days for each month. I would also like to mark some public holidays and friend’s birthdays. So, I wondered if it might be possible to do it with R. After fiddling about with it over the weekend, I managed to make it work. It went better than I expected. And here I am recreating the calendar using some stock photos. All stock photos are royalty-free from Pexels. For the impatient ones, the whole code and images are available at this Github repository. For detailed guide, keep reading.

(more…)

Scraping Instagram and choosing hashtags

We scrap Instagram for basic public data using R to help us pick optimal hashtags.

If you are an Instagram user, at some point, you care going to be interested in the various metrics such as followers, number of posts by a certain user etc. You might want to compare these metrics between different users or to find out the number of posts with a certain hashtag etc. The casual way to do it is to go the relevant Instagram page and look at the metric and write it down somewhere, and go to next and so on. Clearly this is not ideal strategy if you want to look at a few hundred pages. It would be neat to get this data in an automated manner.

Read More

Iceland

My first trip to Iceland, pictures, route and some insights.

 

Iceland is a nature lover’s paradise. Same goes for a landscape photographer. The nature in Iceland is just out of this world. It’s just remarkable how diverse the topography is, for a relatively small island. It’s also a great location if you want to get away from people. You could be driving for hours without meeting a single car. In this post I want to talk about some of the experience and some of the practicalities of travelling in Iceland.

(more…)

Humanity has never lived in better times

It is easy to be disillusioned and pessimistic about the world we live in. Bad news seems to be followed by worse news. But humanity has come a long way from the disease-ridden, impoverished, war-torn lives of our fore-fathers. Here we look at a few data-driven graphs to convince ourselves of the progress we have made over time in various aspects of life. Slow progress never makes headlines.

It may seem like the world is descending into total chaos, violence, and destruction. War in Syria, Ukraine, Yemen, Islamic state, migrant crisis, Ebola, plane crashes, earthquakes, tsunamis and what-not. The more news you watch, the more worried you will be. This is because the news outlets tend to focus on spectacularly negative instances. Violence, atrocities, and hatred are thrown into the spotlight and into the lives of common people. With the ever increasing digital connectivity, it is easy to disseminate information and to absorb information at an unprecedented level. Relatively smaller incidents have a larger voice. As said by Ray Kurzwil, “The world isn’t getting worse, our information is getting better”. To appreciate the world we live in, we have to put things into a wider context.

The fact is that humanity has never lived in a better time than now in pretty much every aspect you look at; war, violence, diseases, poverty are all at the lowest it has ever been. Of course, there is still a long way to go, but this is the best it has been since the beginning of humankind. To prove my point, here we evaluate human progress using some real data and simple time-series plots. Most of the data and information was obtained from OurWorldInData.

(more…)

Scotland

An early spring road trip through Scotland including Edinburgh, Isle of Skye, Inverness and Cairngorms.

 

This spring, I decided to explore Scotland in a one-week trip. April-May is still a bit too early in the season, but I was able to experience all sorts of weather from sun to rain to snow and wind before the tourist season.

Here is a route map:

Scotland is just stunningly beautiful. It has possibly some of the most spectacular landscapes in the world. Skye is just so dramatic in landscapes and weather patterns. I experienced snow and warm sunny weather on the same day in different parts of the island. We were able to visit the Talisker distillery, Fairy pools and Kilt rock, but missed Old man of Storr and many other attractions. I had limited time on Skye, but Skye has so much to offer. One could spend an entire holiday just exploring Skye.

Driving is a pleasure in Scotland due to the much reduced traffic at least compared to England. On mainland Scotland, major roads and highways are large and wide and well maintained. Smaller roads may be narrow with two-way traffic and not so well maintained. On Skye, all roads are narrow. Driving on Skye really tests your ability to keep the vehicle perfectly in a lane that is just as wide as the vehicle while driving 50-60 mph (80-90 kph). If driving from Skye towards Inverness and you have extra time, I can recommend the Church Road route offering some stunning views.

The only location I travelled north of Inverness was the Dunrobin castle in Golspie. It was in good time for the falconry session which was pretty exciting.

As far as wildlife goes, we spotted occasional deers along the road and seals along the harbour in Inverness. We were not lucky enough to spot eagles, whales or puffins. There is a lot more to be discovered in Scotland and I hope to return at some point.