AphA Scotland – it’s a thing

Reflections on AphA Scotland launch event – On Tues 8th May there was only one Scottish based member of the Association of Professional Healthcare Analysts (me) but on Wed 9th May that number rose to around 80with the launch of the the Scotland AphA Branch. The event took place in the very nice Perth Concert Hall, and consisted of several great speakers plus a series of workshops. I particularly enjoyed hearing from Mohammed Mohammed, who talked about setting up the NHS-R community, and how we might overcome the resistance to R in some quarters within the NHS. In later discussions after the event, there was some conjecture that this might be because traditional IT depts cannot provide support for R. Thinking back to when I first got it installed, I think I was told that I would get no support…
Original Post: AphA Scotland – it’s a thing

Hardwired..for tidy text

Song lyric and sentiment analysis for all So – a while back I did a tidy text analysis on Faith No More lyrics. I had thought about doing this with Metallica album lyrics, as they have had a long career, spanning thier late teens/twenties to their 50’s. However, I found the process of obtaining lyrics and getting them into shape for analysis too painful, so I chose a band with slightly less output. Good news though – things have changed with the release of the geniusr package from Josiah Parry (@JosiahParry). This makes getting song /album lyrics a piece of cake. With my FNM analysis, I obtained individual tracks, organised them into folders by album, and then went through a lot of manual processing ( the site I obtained the lyrics from concatenated each line into a single string). This…
Original Post: Hardwired..for tidy text

Data Driven DIY

Statisfix – Which fixing should I buy? I have a bathroom cabinet to put up. It needs to go onto a tiled plasterboard (drywall) wall.Because of the tiles, I can’t use the fixings I normally use to keep heavy objects fixed to the wall.And bog standard rawlplugs aren’t going to do the job. So what should I buy? YouTube to the rescue – more specifically, this fine chap at Ultimate Handyman. Not only does he demonstrate how to use the fixings, but also produced this strangely mesmerising strength test showing how much weight the fixings support before the plasterboard gives out. As well as the strength of the fixing, I need to consider the price of the fixings, and also, the size of the hole required (which in turn, will also impact the overall cost of the job if I…
Original Post: Data Driven DIY

Time To Shine

Blogging and social media for introverts – How to spot an introvert You may have seen David Robinson’s recent post encouraging R users to start blogging. Some folk will willingly act on this advice, and others won’t. For those that won’t, I know who you are.You.Yes, you, trying to hide at the back.I can spot an introvert. It’s easy. Simply say “we’re all going to take part in a team bonding exercise” and watch to see whose eyes point to the floor while everyone else leaps to their feet.How about “icebreakers”? “Turn to the person next to you and introduce yourself, and tell them what you hope to get out of the day”. There then follows 2 excruciating minutes while your enthusiastic neighbour gushes about what a great day they’re planning to have, while your internal monologue is trying to…
Original Post: Time To Shine

Let it flow, let it flow, let it flow……

Animating dot plots to demonstrate patient flow – Dots.. This is not the blog post I’d originally intended to write. But I’m glad – because this one is so much better. Some background. I’m one of the few Scotland based members of AphA – the Association of Professional Healthcare Analysts. They’ve had a couple of events recently that I was keeping my eye on via Twitter and it became apparent that a session demonstrating R had made some waves – in a good way. I’d been having a wee exchange with Neil Pettinger regarding R and took the opportunity to ask permission to use one of his Excel files. This featured a dot plot chart that demonstrated patient flow.I wanted to show an alternative way of creating the plot using R. Neil is an “information training consultant” – at least…
Original Post: Let it flow, let it flow, let it flow……

It’s a dirty job, but someone’s got to do it..

A tidytext analysis of Faith No More lyrics – Is this a midlife crisis? I wanted to ease myself back into text mining,specifically using the tidytext package as I haven’t had to do any at work for well over a year. I’ve been thinking about some of the old bands of the 90’s, some of whom split up, and then reformed. I was interested to see how lyrics evolve over time, and to see what changes there were as the band matured. I’ve decided to look at Faith No More, because: they recently reformed after an 18 year split they had numerous line up changes, the main one being a change of vocalist shortly before the release of their 3rd (and most successful) album, “The Real Thing”. Said vocalist, Mike Patton, was only 21 when he joined. I thought it…
Original Post: It’s a dirty job, but someone’s got to do it..

Mapping to a ‘t'(map)

tmap <- Easy & Interactive – More maps of the Highlands? Yep, same as last time, but no need to install dev versions of anything, we can get awesome maps courtesy of the tmap package. Get the shapefile from the last post library(tmap) library(tmaptools) library(viridis) scot <- read_shape(“SG_SIMD_2016.shp”, as.sf = TRUE) highland <- (scot[scot$LAName==”Highland”, ]) #replicate plot from previous blog post: quint <- tm_shape(highland) + tm_fill(col = “Quintile”, palette = viridis(n=5, direction = -1,option = “C”), fill.title = “Quintile”, title = “SIMD 2016 – Highland Council Area by Quintile”) quint # plot ttm() #switch between static and interactive – this will use interactive quint # or use last_map() # in R Studio you will find leaflet map in your Viewer tab ttm() # return to plotting The results: One really nice thing is that because the polygons don’t have outlines,…
Original Post: Mapping to a ‘t'(map)

let there be progress

The ‘wrapr’package for use with dplyr programming – UPDATED POST I’m the first to admit I’m not an R expert, (even duffers can blog about it though), but when I began thinking about writing some dplyr functions to help me create and analyse run charts, I had no idea that I was going to struggle quite so much getting to grips with Non Standard Evaluation and Lazy Evaluation (see my last post for links and more background). To clarify, I wanted to create flexible dplyr functions, without hardcoded grouping parameters, so I could query different SQL Server tables and apply the same functions reliably to transform and plot the data. Eventually I sussed things out and created the functions I needed, but it was yet another example of how R makes me feel really stupid on a regular basis.Please tell…
Original Post: let there be progress