Publications by Martin Chan
Data Chats: An Interview on Data-Driven Campaigns, Bias & Ethics
Background One of the motives for starting the Data Chats interview series was to shed light on the many ways in which data and analytics professionals operate across different fields and cultures. Previously, Avision Ho (Senior Data Scientist at the British Department for Education at the time) and Abhishek Modi (Data Science Consultant at Deloi...
27869 sym 34 img
Vignette: Simulating a minimal SPSS dataset from R
What this is about ???? I will simulate a minimal labelled survey dataset that can be exported as a SPSS (.SAV) file (with full variable and value labels) in R. I will also attempt to fabricate ‘meaningful patterns’ to the dataset such that it can be more effectively used for creating demo examples. image from Giphy Background Simulating da...
10220 sym R (5219 sym/15 pcs) 4 img
Vignette: Generate your own ggplot theme gallery
Background I’ve always found it a bit of a pain to explore and choose from all the different themes available out there for {ggplot2}. Yes I know, I know – there are probably tons of websites out there with a ggplot theme gallery which I can Google,1 but it’s always more fun if you can create your own. So here’s my attempt to do this, on...
3795 sym R (12535 sym/102 pcs) 202 img
A Shiny app on Hong Kong District Councillors
???? TL;DR We built an R Shiny app to improve access to information on Hong Kong’s local politicians. This is so that voters can make more informed choices. The app shows basic information on each politician, alongside a live feed of their Facebook page and illustrative maps of their district. We took advantage of this project to test out a ran...
17435 sym R (973 sym/3 pcs) 12 img
Comparing Common Operations in dplyr and data.table
Background This post compares common data manipulation operations in dplyr and data.table. For new-comers to R who are not aware, there are many ways to do the same thing in R. Depending on the purpose of the code (readability vs creating functions) and the size of the data, I for one often find myself switching from one flavour (or dialect) of ...
6787 sym R (3551 sym/14 pcs) 2 img
Top 10 tips to make your R package even more awesome
What this post is about This post shares top ten tips on how to make your R package even more awesome than it already is. As an R developer, you’ve already put a lot of work into creating and testing your package – so why waste this opportunity to really showcase your work and make it go even further? The tips mentioned in this post can be di...
19489 sym R (823 sym/6 pcs) 22 img