Photo by Carlo Lisa on Unsplash

Everybody is tired. Burnt out. But we all keep on going: same diet; same schedule; same routine. Always “busy”.

“Insanity is doing the same thing over and over and expecting different results.”

— Albert Einstein.

Everybody is insane.

Commit this to memory:

I will have to remember ‘I am here today to cross the swamp, not to fight all the alligators.’

— Rosamund and Benjamin Zander, The Art of Possibility

In work — in life — while you are not doing whatever you’re here to do, the alligators will perpetually nibble away at you. You feel busy but your attention…

Photo by Adrian N on Unsplash

Electric vehicles are here. They’re there. They’re going to be everywhere.

But whilst we prepare to dance on the graves of fossil-powered cars, we should be wary of following the well-trodden path to a similar demise. We’re running out of rare-earth metals.

One electric vehicle uses approximately 4kg of lithium (4,000 tonnes per one million vehicles, for those in the back). By the year 2030, we’re expecting 30 million or more electric vehicles in Europe alone. Scarcer resources are also being lapped up in abundance — cobalt, the prominent example.

We’re a little short on water, too. Extracting one tonne…

Photo by Ferenc Almasi on Unsplash

Sometimes, you just don’t want (or need) a database model for all of your datasets — especially if they remain static. You may want to simply serve up some dataset to be used by the front end of your webapp / site. If you’re using react, you can’t slot your data into your render quite as easily as you would using a template model. Here is a short post illustrating how you can manage this simply when working with a django-react setup.

Option 1: Load directly into your React component

By far the simplest option. However, this involves loading your data directly into your frontend. …

Photo by Isaac Smith on Unsplash

D3.js is a great tool for producing interactive visuals in your browser. It can also be a real pain in the ass to deal with. In an attempt to relieve some of this pain and preserve some sanity, I recently began refactoring some of the charts that I’d previously written with D3 — now using React functional components.

Packaging D3 into reusable components

The great thing about marrying D3 and React is that you essentially bundle up your visual into a callable HTML-style tag. You can pass in parameters to allow for easy customisation and updating, and any data-wrangling that can’t be carried out on…

Photo by Mark Fletcher-Brown on Unsplash

d3.js is a pain in the backside to learn. I’m here to share some helpful lessons that I learned while trying to pick it up and hopefully save you a few precious hours of frustration.

You can see and try out these tips for yourself — the code snippets provided are taken from this Github repository. To run the code: navigate to the project folder in your terminal and run python (requires python to be installed). Your terminal will run the visuals on a localHost server.

If you’re completely new to d3, I’d recommend checking out a couple of…


Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store