Visualizing the effects of fluoride in drinking water


Hey folks,

We’re still slogging our way through Thanksgiving leftovers. As time passes from last Thursday, there’s a fine line between setting a good example about not wasting food and setting a bad example by getting every food poisoning!

Speaking of eating, our teeth are pretty important, don’t you think? In the US, Trump’s expected head for the Department of Health and Human Services has a number of interesting views about health. One example is that its a bad idea to spike our drinking water with fluoride. As a father of 9 kids who all have teeth that rival Johnny Rotten’s (pre-surgery), I’ve always blamed it on the fact that we drink non-fluoridated well water. How could someone be so stupid to suggest that we not put fluoride in our water?!

Well, CNN dug into the controversy. It turns out that the relationship between the number of decayed, missing, and filled teeth and whether a country fluoridates their water is pretty weak. I’ll let you read the article and judge for yourself. I was struck by a figure in the article that is about half way down

Thinking about this figure from the perspective of how I would recreate it in R, a few things stood out. First, the data are available through Malmö University’s Oral Health Country/Area Profile Project (CAPP). At the bottom of this newsletter I’ve extracted the data presented in the figure in case you want to play with recreating the CNN version or want to try creating your own.

First, I think I was struck by this plot because it reminds me of the slope plots I’ve made of COVID-19 vaccine attitudes or of perceptions of quality life attributes. But it’s slightly different. The primary difference here is that the x-axis positions are different years for each country whereas before we had one x-axis position for the first time point and one x-axis position for the second time point. As an aside, when I was looking through the CAPP data, I noticed that many of these countries have more than two time points. I suspect including all of that data makes for a more complicated version of the figure that CNN didn’t want to confuse people with.

Second, the figure could be made by generating two separate figures and putting them together with the patchwork package. But my preference would have been to do something like faceting with countries that use fluoride on the left and those that don’t on the right. I liked how they linked the color of the facet title to the color of the points and lines in the facet.

Third, I like how everything that doesn’t relate to the trend seems to fade inot the background. What we really care about is the overall downward trend in decayed, missing, and filled teeth and how that trend differs between the fluoridation policies. So those trends should be bold and colorful. So things like the country name are really of secondary importance. I liked how those names are relatively small and gray so that they seem to fade into the background. Related to the country names, the number of screwed up teeth doesn’t really matter either since it’s the slope of the lines that we are concerned with. So again, the y-axis text and grid lines also fade into the background.

To generate this figure using the table below, I’d use geom_point and geom_line to get the balls at the end of the line. I’d map year to the x aesthetic, dmft to the y aesthetic, fluoridates_water to the color aesthetic, and country to the group aesthetic. The group aesthetic will make sure that we get one line per country rather than one line per fluoridation policy. I’d also use facet_wrap to facet the data on fluoridates_water with one row (or two columns). We may need to do something with factors to put the FALSE values on the right and the TRUE values on the left. I’d likely use tools from the ggrepel package to add the country names using the label aesthetic without having those names overlap each other or the data.

As far as styling the plot, the major points are the colors, axes, and theming. The y-axis starts at zero (without showing zero) and goes to 10 by twos with a grid line on the labelled y-axis values. The x-axis starts at 1970 and goes to about 2023 labelling the axis every 20 years. I’d use scale_*_continuous for both and would turn off expand for both axes. As far as theming, we’d want to turn off the y-axis line and ticks. I’d also set the general color of all text and lines to be something like lightgray.

This plot should be fairly straightforward. Perhaps that’s why I was drawn to it - it’s simple and doesn’t let a lot of ornamentation clutter up the figure. The thing I really wonder about are all of the other years that they aren’t showing. For example, in addition to 1984 and 2002, Ireland also has data for 1992 and 1993. The data are pretty fascinating and have other interesting comparisons, which make me wonder why they weren’t included. For example, there are data for Ireland in 1984 for kids who both received fluoridated and non-fluoridated water in 1984 and 2002. The values drop from 3.3 to 1.8 and 2.6 to 1.4 for non-fluoridated and fluoridated water, respectively (the published plot seems to mistakenly show the non-fluoridated water value).


library(tidyverse)

fluoride <- tribble(
  ~country, ~year, ~dmft, ~fluoridates_water,
  "brazil",1976,9.89,TRUE,
  "brazil",2006,0.9,TRUE,
  "new_zealand",1977,7,TRUE,
  "new_zealand",2022,0.72,TRUE,
  "ireland",1984,2.6,TRUE,
  "ireland",2002,1.4,TRUE,
  "usa",1980,2.6,TRUE,
  "usa",2004,1.2,TRUE,
  "iceland",1982,8.3,FALSE,
  "iceland",2005,1.4,FALSE,
  "italy",1979,6.9,FALSE,
  "italy",2005,1.1,FALSE,
  "japan",1975,5.9,FALSE,
  "japan",2021,0.63,FALSE,
  "uk",1983,3.1,FALSE,
  "uk",2013,0.8,FALSE
)

If you come across any figures in popular media that resonate with you, please let me know! I’d love to see other examples of “public-facing” figures that tell an interesting story.

Workshops

I'm pleased to be able to offer you one of three recent workshops! With each you'll get access to 18 hours of video content, my code, and other materials. Click the buttons below to learn more

In case you missed it…

Here are some videos that I published this week that relate to previous content from these newsletters. Enjoy!

video previewvideo preview

Finally, if you would like to support the Riffomonas project financially, please consider becoming a patron through Patreon! There are multiple tiers and fun gifts for each. By no means do I expect people to become patrons, but if you need to be asked, there you go :)

I’ll talk to you more next week!

Pat

Riffomonas Professional Development

Read more from Riffomonas Professional Development

In case you missed it, I have nine kids ranging in age from 23 to 7 that my wife homeschools. They’re a riot. Each of them has to find a way to be different from all of the others. This makes for some real characters. Let me introduce you to Peter. This week, Peter, who is 11, has been working on a times table. You may remember these from when you were a kid. Say you want to know what 7 times 8 is (this was always my hardest “times” to remember). You take your finger down the rows to the...

Hey folks, I’m really enjoying sharing with you my 30,000 foot view of how I would go about making figures that I find in the “wild”. Following up on these emails with a couple of related YouTube videos has been a lot of fun for me. Of course if you find any figures you like, send them my way - I love seeing what interests you all. I was reminded recently though that not everyone feels enough confidence with their R and tidyverse skills to keep up. Sorry! Towards the bottom of this email I...

Hey folks, Next week is Thanksgiving here in the US and I’ll skip sending you another newsletter. In exchange, you’ll get three videos on YouTube inspired by a newsletter post from October talking about a descending bar plot with a pattern in one of the bars. Before you thank me, you might want to check out today’s newsletter🤣! I’ve always enjoyed the old 538’s articles and appreciated the data centric point of view of its founder Nate Silver. He has a Substack newsletter, “Silver Bulletin”,...