-
Notifications
You must be signed in to change notification settings - Fork 0
/
readme.Rmd
67 lines (37 loc) · 3.39 KB
/
readme.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
title: "An analysis of babies and pregnancy in Scotland"
author: "James Morgan"
date: "14/07/2021"
output:
github_document
---
![](docs/images/weight_smoker_age_image.png "Ratio of underweight babies vs expecting mothers who smoked"){width="100%"}
[<https://jhmmorgan.github.io/scotland/>](https://jhmmorgan.github.io/scotland/ "Visualisation")
## Introduction
I recently participated in the University of Edinburgh's **Data Visualisation for Professionals** course.
Through this course, I've developed a visualisation using D3/CSS and R/ggPlot.
My goal, through the use of Scottish Government datasets, was to explore the statistics around births and expecting mothers and to see if there's any change over the years, or relationship between various defining attributes, across the Scottish regions.
I've never developed in D3 before and my HTML/CSS is about 10 years out of date and rusty.
## Target Users
The target user for this data visualisation is the public.
The primary user is non-technical, who will be interested in a high-level overview. The visualisation is aimed at non-technical users, who may not understand how to read complex plot types, but will have knowledge to interact with the data and has an understanding of the high level attributes.
## Process
I've downloaded a number of csv datasets from the Scottish Government (please see the visualisation for full details on sources and licences).
Ideally, I would've obtained these via their API, however due to time constraints, I opted not to explore that route.
Some of the datasets needed to be downloaded into several files due to their size. This is because the data includes details for many types of regions, be it the local council regions, electoral wards, health boards and more!
After loading and stitching the datasets back together, I tidy these and create an output that includes the ratio (%) for each region, per year. There's also data on the count of each attribute, which I've collected, but have chosen not to use.
After some initial exploratory analysis, many hand-drawn sketches and some great tutorials during the course, I started to see which types of visualisations would have the biggest impact.
You can find the code to reproduce the data tidy and final ggplots in the r/data_clean.r file.
## D3
Following a very steep learning curve, I managed to get several types of D3 choropleth maps working using D3 v7.
I also managed to get some useful scatter charts and circular bar charts working. If I had time, I'd look to replace all of my ggplot visualisations with D3.
## Next Steps
There is so much more I could do with this visualisation, with more details given at the end of the visualisation.
- I'd like to include the remaining datasets
- Improve the choropleths to allow a better hover over / click experience, giving the user more details of each region.
- Allow the user to drill down into the data and focus on a given region or year.
## Summary
I'd like to thank the UoE for running this course, providing me with lots of learning opportunities, expanding my knowledge in visualisation design and giving me the opportunity to learn D3.
I'd also like to thank my family and friends for their feedback and patiences during the evaluation stage.
[<https://jhmmorgan.github.io/scotland/>](https://jhmmorgan.github.io/scotland/ "Visualisation")
![](docs/images/screenshot.png "Screenshot from visualisation"){width="100%"}