Creating a dynamic d3 visualization from the GitHub API

GitHub Repo Visualization
Try out the GitHub Repo Visualization here

As someone who works with data on a daily basis, I’m always impressed and inspired by interactive charts and dashboards. I’ve built plenty of dynamic dashboards within Excel (here) and, more recently, within Google spreadsheets (here, here and here), but never my own custom web charts. I’ve wanted to learn d3 for a while, but until recently didn’t have the necessary Javascript chops to do this.

This year I’ve focussed on deepening my coding skills, so I’ve finally been able to give d3 a proper go. And let me tell you, it’s brilliant. It’s exciting to hook up a data source to a custom chart that changes dynamically, and be able to see it on a live website, which other people can view.

In this post, I’m going to discuss the steps I took to create this d3 visualization of the GitHub API.

The app is live here!
Continue reading Creating a dynamic d3 visualization from the GitHub API

Introduction to testing in Rails

Testing your web applications can seem like a rather daunting and complex field at first. That’s how I felt when I started learning about it. It took a while to get comfortable with the lingo, and see how the different pieces related to each other. I made notes as I went and have collected them together below, into some semblance of an introductory post on the subject. Hopefully, it’ll lay out the lie of the land and point you in the direction of some useful resources.

Continue reading Introduction to testing in Rails

Building a Rails app for images using Amazon S3 and Paperclip

In the steps outlined below, I walk through creating a CRUD app in Rails that saves images to, and serves images from, Amazon S3, using the paperclip gem. The images are displayed in a grid using Flexbox with some Ruby fun to change the grid layout each time the page is refreshed.

S3 image app

Continue reading Building a Rails app for images using Amazon S3 and Paperclip

Setting up a Rails model to check for “http(s)” at the front of a URL

This issue arose when I asked my brother to test drive the Rails app I’m working on, UpLearn, without any supervision. It was really useful to have a second person use the software without any knowledge of how it was built, as issues surfaced that I might have otherwise missed.

One issue was the handling of URLs submitted by the user without an “http(s)” at the front. My brother had typed a link in to the submission form directly, rather than copy-pasting the URL, so it was missing an “http://” or “https://” at the front. As a result, my Rails app treated this as a relative path, rather than an absolute path, and the result was a broken link that didn’t take the user to the correct resource page.

Continue reading Setting up a Rails model to check for “http(s)” at the front of a URL

Fixing the N+1 problem in my Rails application

UpLearn Social Learning Rails app
UpLearn – an educational sharing Rails app

Earlier this year, I finished General Assembly’s Back-End Web Development course in Washington DC, where I learnt Ruby and how to build data-driven websites using the Rails framework. It was a brilliant experience. I did a lot of work outside the course to learn as much as I could about web development, treating the 10 weeks as my own full-time dev bootcamp.

My final project was an educational web application called UpLearn, built with Rails and hosted on Heroku, where users can find and share online learning resources. It’s a community-driven website, which helps users find the best online educational content, for example, a well-done tutorial on learning Javascript.

Continue reading Fixing the N+1 problem in my Rails application

Building a dynamic dashboard for a 3-day digital flash sale

This time last year I worked with The Write Life during their three-day sale of The Writer’s Bundle, a collection of digital products for writers. I built a dynamic dashboard using Google spreadsheets so the team could visually monitor progress throughout the sale.

This year The Writer’s Bundle 2015 was bigger and better than ever, so I wanted to create an even more useful dashboard for the team. The dashboard was a key tool for the team, to monitor both overall and individual sales channel performance, as well as to be a motivating force by giving everyone a visual sense of progress.

Continue reading Building a dynamic dashboard for a 3-day digital flash sale

Redesigning the Socialexis Site Using the Corsa Theme for WordPress

Recently, I’ve been busy redesigning the website for Socialexis, my wife’s fantastic content marketing firm. I used the Corsa theme from UpSolution. It’s a modern, single-page parallax theme, which is perfect for the Socialexis brand.

Here’s a screenshot of the new website:

New Socialexis website

The screenshot below shows the old website. Whilst there was nothing wrong with it per se, it wasn’t particularly exciting and didn’t represent the creativity and passion at the core of Lexi’s business. Since this original website was built, the business has also focused more on blog management and content creation, so the message needed tweaking. Hence, it was a good opportunity to also redesign the website.

Continue reading Redesigning the Socialexis Site Using the Corsa Theme for WordPress

Survival and retention analysis using MySQL

I’m working my way through this book, Data Analysis Using SQL and Excel, at the moment and chapter 6 is all about survival and retention modelling. I learn best when I can attack real life problems, so I took some of the lessons from this chapter and applied them to the MailChimp email data I already had in a MySQL database.

Previously I looked at setting up a database and doing some basic MySQL analysis on MailChimp data, as well as some more in-depth analysis such as creating a histogram of email subscribers.

This post takes it a step further by looking at subscriber behaviour within the email campaign data. What can we say about how long people remain active subscribers? For a subscriber who has been active for a given length of time, how likely are they to continue being active?

Continue reading Survival and retention analysis using MySQL

Creating a histogram from MailChimp data using MySQL

This post digs deeper into the MailChimp data which I analyzed in my previous post. In this analysis, I’ve focused on the distribution of subscribers and what was the most recent date they opened an email.

Specifically, I wanted to answer:

  • What is the distribution of subscribers by campaign date that opened an email in 2014?
  • And what are their email addresses?

The way I approached this problem was to break it down into its constituent parts, tackle each of those and then build that back up into a single query.

Continue reading Creating a histogram from MailChimp data using MySQL