Sign in

Peter Gray

@pgdataviz.bsky.social
73 followers 58 following 107 posts

Statistical Programmer (Epidemiologist by training) using #Rstats and #Python mostly. #DataScience #Dataviz pgdatavizandstats.netlify.app

PostsRepliesMedia
Peter Gray @pgdataviz.bsky.social · 24/04/2026
Wait it's all grammar of graphics

Always was
010
Peter Gray @pgdataviz.bsky.social · 07/04/2026
Waffle chart this week. Had a time adding the logos to the char but I got there in the end. Code here: pgdatavizandstats.netlify.app/data_visuali... #TidyTuesday #PyDyTuesday #Dataviz #rstats
A waffle plot
040
Peter Gray @pgdataviz.bsky.social · 05/04/2026
000
Peter Gray @pgdataviz.bsky.social · 01/04/2026
Quick Heatmap #TidyTuesday #PydyTuesday Code here: pgdatavizandstats.netlify.app/data_visuali...
Heatmap of Temperatures in Nova Scotia Ocean
030
Peter Gray @pgdataviz.bsky.social · 26/03/2026
Let's try this again What do the first 1000 digits of pi look like (I couldn't do 1 million because I prefer my laptop unmelted) Code here: pgdatavizandstats.netlify.app/data_visuali... #rstats #TidyTuesday
150
Peter Gray @pgdataviz.bsky.social · 19/03/2026
Hmmm... The variable name needs more T's #rstats


subgroup = "BRAF spec



TT_tte_TNTT_BRAF <- F
030
Peter Gray @pgdataviz.bsky.social · 17/03/2026
I'd say it's 80% of my job #rstats #datascience
So I says

"Data scientist, data analyst statistician"THEY ALL WIND UP spending
 Their life data cleaning in THE END."
140
Peter Gray @pgdataviz.bsky.social · 10/03/2026
#TidyTuesday Looks like Postgrads are the most pessimistic in terms of accepting the likelihood of something actually happening. Which, TBF, 100% tracks with my experience of working with postgrads. Code Here: pgdatavizandstats.netlify.app/data_visuali...
A bar chart showing that likligood meaning decreases with education level
000
Peter Gray @pgdataviz.bsky.social · 06/03/2026
Very bad with these when compared with last year but here's my #TidyTuesday / #PydyTuesfay for tortoises Code here: pgdatavizandstats.netlify.app/data_visuali...
A graph
101
Peter Gray @pgdataviz.bsky.social · 23/02/2026
Me? I'm just happy to be here #rstats
Everyone fighing over TIbble versus DF 

>| vs %>%

Me: googling what mean means
312823
Peter Gray @pgdataviz.bsky.social · 17/02/2026
Welsh sheep are obviously the best sheep, but the kiwis do a good sheep too Code Here: pgdatavizandstats.netlify.app/data_visuali... #TidyTuesday | #dataviz | #ggplot2
Layer plot of all the sheep in new Zealand over the years
050
Peter Gray @pgdataviz.bsky.social · 11/02/2026
I don't use it very often but I may have to update the "I have strong skills in python" part of the CV
>>> def add_two_nums():

num1 = input("Enter the first number you want to add:

num2 = input("Enter the second number you want to add: ")

if num1.isdigit() and num2.isdigit():

pass

else:

print("Error: One or both of the numbers you entered are not numbers. Enter a number numbskull")

sum = num1 + num2

print(f"The sum of the two numbers is: {sum}")

... add_two_nums()

Enter the first number you want to add: 6

Enter the second number you want to add: 7

The sum of the two numbers is: 67
010
Peter Gray @pgdataviz.bsky.social · 03/02/2026
Quick sunburst plot in python this morning. Better labelling of each layer would have been nice but I couldn't work it out Code Here: pgdatavizandstats.netlify.app/data_visuali... #TidyTuesday | #dataviz | #ggplot2 | #pydyTuesday
Sunburst chart
010
Peter Gray @pgdataviz.bsky.social · 12/01/2026
Back after a nice, long, winter break. African Languages this week and a chance to try out Tree Maps Code Here: pgdatavizandstats.netlify.app/data_visuali... #TidyTuesday | #dataviz | #ggplot2
A tree map of the various African languages
030
Peter Gray @pgdataviz.bsky.social · 09/12/2025
Family/Christmas/Birthday/Work means this may be the last attempt at #TidyTuesday this year. First full year doing it and enjoyed. Not sure if I got better though! Code Here: pgdatavizandstats.netlify.app/data_visuali... #rstats | #tidyverse | #dataviz
Picture of Qar-tar prices in Qatar
010
Peter Gray @pgdataviz.bsky.social · 28/11/2025
The adrenaline rush I am getting right now. This must be what Base jumping is like
RStudio is using 88 Gb of RAM
010
Peter Gray @pgdataviz.bsky.social · 18/11/2025
Tried doing a World cloud of the words in the entire Sherlock Holmes in python with a nasty head cold - can't recommend the head cold part. Code: pgdatavizandstats.netlify.app/datavis #PydyTuesday | #TidyTuesday | #Python
A word cloud of the words in Sherlock Holmes 

Man, one are the two biggest words
0120
Peter Gray @pgdataviz.bsky.social · 11/11/2025
This week's submission for #PydyTuesday. Missed ggplot slot when trying to make this plot Code here: pgdatavizandstats.netlify.app/data_visuali... #rstats | #python | #dataviz | #TidyTuesday
Two area plots of TB deaths hiv versus non hiv
020
Peter Gray @pgdataviz.bsky.social · 06/11/2025
My submission for #PydyTuesday. A quick jaunt back to Python and some Violin plots Code here: pgdatavizandstats.netlify.app/data_visuali... #rstats | #python | #dataviz | #TidyTuesday
120
Peter Gray @pgdataviz.bsky.social · 05/11/2025
Anyone here better with the ggsankey package than I am? - I am trying to label the flow with the number of people transitioning through each stage. I have found no examples on the internet of labeling the flow (plenty labeling the nodes). I have below what I need to try #rstats #dataviz #ggplot2
a pciture of a sankey plot
220
Peter Gray @pgdataviz.bsky.social · 30/10/2025
Looked at the percentage of Oxbridge educated people who have won various British Literary Prizes for #TidyTuesday. I used ggbrick and, as the bricks of look like books, tried to make it look like they were in bookshelves with meh results. Code here: tinyurl.com/bddsuuc3 #rstats | #dataviz
041
Peter Gray @pgdataviz.bsky.social · 23/10/2025
As a Welshman, taking the opportunity to ignore the English and focus only on Wales for #TidyTuesday. Looking at the average weather for Wales in 2024 and now I've made myself homesick. Code here: pgdatavizandstats.netlify.app/data_visuali... #rstats | #dataviz
Graph of Average Rainfall and SunshineGraph of Average Min and Max Temp
1110
Peter Gray @pgdataviz.bsky.social · 20/10/2025
It's Monday which mean my chaotic self is submitting last weeks #TidyTuesday. I chose to look at water access as most people had looked at food in much nicer ways than me. Code here: pgdatavizandstats.netlify.app/data_visuali... #rstats | #dataviz
Access to Safely Managed Drinking WAter
030
Peter Gray @pgdataviz.bsky.social · 14/10/2025
Holiday and job-hunting sucking my soul mean I am a week behind and needed to do a(nother) rush job for #TidyTuesday. I have been playing with Reactable though Code here: pgdatavizandstats.netlify.app/data_visuali... #rstats | #dataviz
A table showing the winners of the European Basketball League
070
Peter Gray @pgdataviz.bsky.social · 23/09/2025
Tried the datapasta package out, which is a form of minor miracle to get the country codes for the players. Managed to crack a map of grandmasters per country before flying home to the UK for a break Code here: pgdatavizandstats.netlify.app/data_visuali... #dataviz | #rstats | #tidytuesday
A chart of grand master
010
Peter Gray @pgdataviz.bsky.social · 16/09/2025
#TidyTuesday attempt for this week. #rstats | #dataviz Code here: pgdatavizandstats.netlify.app/data_visuali...
4 box plots for the calories, fat, carbs, and protein
040
Peter Gray @pgdataviz.bsky.social · 08/09/2025
Missed last week's #TidyTuesday / #pydyTuesday due to work/toddler commitments but I'm ahead for this one. Such is life Tried making a dashboard in python Whoever coded #streamlit is a genius Dashboard here tidytuespassportdashboard.streamlit.app Code here pgdatavizandstats.netlify.app/datavis
Dashboard screenshot of visa ranking Dashboard screenshot of visa map
030
Peter Gray @pgdataviz.bsky.social · 27/08/2025
For #TidyTuesday / #PydyTuesday I have struggled with the port of patchwork over to python. If anyone has any ideas on how to fix the titles of the graphs, I'm all ears. Also Plotnine is a minor miracle. Code Here: pgdatavizandstats.netlify.app/data_visuali... #dataviz | #python
4 charts
140
Peter Gray @pgdataviz.bsky.social · 19/08/2025
(Reposted because I can't spell) Back to the warm blanket that is ggplot2 for #TidyTuesday. A Sankey diagram of how the classifications of Scottish Munros have changed over time #rstats | #dataviz | #ggplot2 Code here: pgdatavizandstats.netlify.app/data_visuali...
A Sankey diagram of how the classifications of Scottish Munros have changed over time
061
Peter Gray @pgdataviz.bsky.social · 13/08/2025
Another #TidyTuesday / #PyDytuesday another week of thinking that making graphs in Python just isn't as nice as it is in R (Skill issue, I know) Code here: pgdatavizandstats.netlify.app/data_visuali... #dataviz | #python
000
Peter Gray @pgdataviz.bsky.social · 07/08/2025
Always picks an llmNothing beats an llmLinear regression beats an llm
010
Peter Gray @pgdataviz.bsky.social · 05/08/2025
I've been cursing out my Propensity Score Matching project all week at work so a very brief #TldyTuesday and #PyDyTuesday. If I have time I'll try and do a better job. Code here: pgdatavizandstats.netlify.app/data_visuali... #python | #dataviz | #rstats
A graph showing income inequality between first would countries
110
Peter Gray @pgdataviz.bsky.social · 23/07/2025
Created an Interactive map with Folium of all the New York MTA artworks for #TIdyTuesday and #PyDyTuesday #python | #dataviz | #gis Code here: pgdatavizandstats.netlify.app/data_visuali...
A screenshot of New York mapping out the Artworks displayed on MTA services
060
Peter Gray @pgdataviz.bsky.social · 15/07/2025
Back to ggplot2 because I was in a rush. British Library Funding Significant downturn in funding post 2010. As prospective employers may see this one day, I don't speculate on the reason. code here: pgdatavizandstats.netlify.app/data_visuali... #RStats | #TidyTuesday | #DataViz
A visualisation of the Proportion of British Library Funding
050
Peter Gray @pgdataviz.bsky.social · 01/07/2025
Anyway, tried something a bit more advanced this week, building a Model in Python to predict petrol (Americans it's a liquid - your name is stupid) prices. Borrowed heavily from here shorturl.at/3q1BR code here: pgdatavizandstats.netlify.app/data_visuali... #Python | #TidyTuesday | #PyDayTuesday
Tidy Tuesday Graph
120