This is Gordon's Typepad Profile.
Join Typepad and start following Gordon's activity
Join Now!
Already a member? Sign In
Recent Activity
This morning I went through a tutorial written by Peter Desmet at Lifewatch INBO to visualize bird tracking data using Carto. This was a good exercise for pulling 2-3 story ideas out of a dataset. First I created a map that showed migratory bird data for three gulls up the... Continue reading
Posted Nov 20, 2017 at Gordon Macrae
This tutorial showed us how to visualize whether a change in law had a noticable impact on policing. Here, we looked at statewide drug law reforms and how they did (or did not) change NYPD policing of low-level drug crimes. We could show this as two versions of the map... Continue reading
Posted Nov 16, 2017 at Gordon Macrae
I went through and completed Dan Nyugen's second tutorial using the NYC police precinct data from yesterday. There's a story starting to emerge here with this map. It's not just a one-dimensional rendering of some data. In this map we can see the number of 'misdemeanour dangerous drug charges' by... Continue reading
Posted Nov 14, 2017 at Gordon Macrae
Carto is built on PostgresSQL. I know that because it says so at the top of this handy tutorial. I have a small amount of knowledge of SQL but that wasn't a hindrance to going through a simple tutorial by Dan Nguyen for mapping the police precincts in NYC. This... Continue reading
Posted Nov 13, 2017 at Gordon Macrae
I found Stace Maples' Carto / Odyssey.js tutorial this morning and went through how to use Carto and Odyssey to create a simple interactive story. The documentation was for the old version of CartoDB so some of the functionality wasn't there / was harder to work out (e.g. exporting Carto... Continue reading
Posted Nov 10, 2017 at Gordon Macrae
I've never been a particularly adept programmer. Five years ago I took a front-end course at General Assembly. My final project was so bad (a broken carousel image gallery on a janky portfolio page) that I was embarrassed to submit it. Technically, I never finished the program. Which looked particularly... Continue reading
Posted Nov 9, 2017 at Gordon Macrae
Visualizing data using NYC open data and Carto was surprisingly easy. This tutorial from Storybench was simple to put into action. Just remember, 'correlation does not equal causation'. The 1-year anniversary of Trump's election was a suitable milestone to aggregate some of the more run-of-the-mill 311 calls against. Here's a... Continue reading
Posted Nov 8, 2017 at Gordon Macrae
Storybench adapted Zach Whelan's very useful twitter bot script to create an auto-tweet bot that links to your twitter account. V. simple to set up and another good example of using google apps script to replicate the functionality of paid-for apps like hootsuite etc. I'm sure there are multiple use... Continue reading
Posted Nov 7, 2017 at Gordon Macrae
I've never been convinced by the 'everyone should learn to code' story the media has been preaching for the last five years. The idea that you will find job and career nirvana by learning javascript has always seemed more like a good marketing story than anything else -- I say... Continue reading
Posted Nov 6, 2017 at Gordon Macrae
Today, I built a simple script that auto-populates url images into a google slide-deck: And another that pulls text out of a pdf and auto-formats it into a google doc: The trick now is to get good enough at this process that it doesn't take longer than doing the actual... Continue reading
Posted Nov 1, 2017 at Gordon Macrae
Turns out google apps scripts are very useful to do day-to-day things. Admittedly, it takes longer to write these scripts than to actually do the work right now. But that will change when I get better / quicker at writing these. For the moment, it's a case of practicing each... Continue reading
Posted Oct 31, 2017 at Gordon Macrae
Creating and using your own Google Apps Scripts is a very relevant use-case for learning how to code. This morning, I created a simple email alert for the events + meetings I have coming up that day. And a simple loop that prints out the meeting, event attendees, where it... Continue reading
Posted Oct 30, 2017 at Gordon Macrae
I learned how to use setInterval and clearInterval today. Pretty straightforward. I couldn't make any further progress with the simple pokemon card game so I shelved it for the time being. I'll come back to it at a later date but it was important that I didn't waste anymore time... Continue reading
Posted Oct 26, 2017 at Gordon Macrae
Posted Oct 25, 2017 at Gordon Macrae
Today's lab called for building a deck of cards. I didn't know where to start with this one (what the functionality should be, how to arrange the cards, how to shuffle, deal and randomise the order in which they appeared. Fortunately the internet exists. I walked through a simple tutorial... Continue reading
Posted Oct 24, 2017 at Gordon Macrae
We can use 'This' to have our object methods act upon other properties that are intrinsic to our object. Which I guess makes sense. It feels a bit like being in another country and only knowing how to say 'this' while pointing at the bit of cheese that you want... Continue reading
Posted Oct 19, 2017 at Gordon Macrae
We may decide to execute a function not right now, but at a certain time later. That’s called “scheduling a call”. There are two methods for it: setTimeout allows to run a function once after the interval of time. setInterval allows to run a function regularly with the interval between... Continue reading
Posted Oct 17, 2017 at Gordon Macrae
Callbacks review. Still not 100% comfortable with callbacks so I spent some more time reviewing the concepts this morning. 'funcArray' doesn't know that 'goo' is a function. But the only way for you to access 'goo' is to call it as a function. Otherwise the terminal won't return anything. And... Continue reading
Posted Oct 16, 2017 at Gordon Macrae
I left my laptop at work yesterday so I'm using my wife's computer for practice today. I don't have a local environment set up on here so I went back and reviewed basic Codecademy excercises. I hadn't used the site for 3-4 years. And there was a sad reminder of... Continue reading
Posted Oct 13, 2017 at Gordon Macrae
Another round of practice today. Drills, drills, drills. Callbacks still don't really make sense. I'm sure they will eventually. I need to see them in practice, in a project. Continue reading
Posted Oct 11, 2017 at Gordon Macrae
Some nested object reps this morning. Practicing nesting objects and methods and arrays inside each other and calling the different combinations. Continue reading
Posted Oct 10, 2017 at Gordon Macrae
Now this is useful. Instead of typing out each line of code individually, testing to see if it works, and then writing the next part. We can write out the whole function, method, whatever and use 'debugger' to walk through each individual step to see where the error might be.... Continue reading
Posted Oct 9, 2017 at Gordon Macrae
After realising the error message I'd been getting after half an hour was a misplaced '=' sign. Continue reading
Posted Oct 6, 2017 at Gordon Macrae
Callbacks. Or, how to pass an executable piece of code as an argument to another piece of code. So I guess my football analogy remains consistent here. Say we have a function called 'ourManager'. He wants his team to win the game. So he sends on Gary Goals because, let's... Continue reading
Posted Oct 5, 2017 at Gordon Macrae
I'm still practicing objects, working backwards from the end state to create a data type that matches the output. This doesn't seem glamorous, this feels like grunt work. The equivalent of a 5am start to hit the training ground by 6am. I'd imagine, I was never that athlete. Regardless, this... Continue reading
Posted Oct 4, 2017 at Gordon Macrae