Arsenic and fluoride are well documented toxins that can be found in the private well water many people in Maine use as their primary source of drinking water. Those who are exposed to high levels of both toxins may be at risk of experiencing worse side effects than those who are exposed to just one.To read more about arsenic and fluoride co-exposure click here. The purpose of this analysis is to identify areas that may be particularly vulnerable to co-exposure to arsenic, As, and fluoride, F. Data is supplied by the Maine Environmental Public Health Tracking Program.
The arsenic and fluoride datasets were combined using the inner_join() function. Observations were joined by common locations. As we are only interested in some of the variables provided, relevant data was selected to form a second data frame, relevantData. Any records containing missing data are removed from the set using na.omit() function.
| location | above_As_guideline | above_F_guideline | wells_tested_As | wells_tested_F | |
|---|---|---|---|---|---|
| Length:341 | Min. : 0.00 | Min. : 0.000 | Min. : 20.00 | Min. : 21.00 | |
| Class :character | 1st Qu.: 3.20 | 1st Qu.: 0.000 | 1st Qu.: 36.00 | 1st Qu.: 43.00 | |
| Mode :character | Median : 8.30 | Median : 0.700 | Median : 57.00 | Median : 69.00 | |
| NA | Mean :12.37 | Mean : 2.465 | Mean : 86.69 | Mean : 97.21 | |
| NA | 3rd Qu.:18.30 | 3rd Qu.: 3.100 | 3rd Qu.:109.00 | 3rd Qu.:126.00 | |
| NA | Max. :58.90 | Max. :30.000 | Max. :632.00 | Max. :503.00 |
We can see from the relevantData summary that arsenic is a bigger problem in well water than fluoride. The average location has 12% of its tested well water with arsenic above the state guidelines (max approaching 60%) compared to 2% above the fluoride guidelines (max approaching 30%). This distribution may be better illustrated with a box plot.
Next the locations are grouped by the extent of exposure. A case:when statement is used to group the locations that have no wells with water above the guidelines for either toxin. Locations with both toxins above guidelines are grouped together, and locations with either one of the toxins above guidelines are grouped together. The count of each group is displayed below with the mean number of wells tested for each group.
ELSE=TRUE
relevantData<-relevantData %>% mutate(.,group = with(.,case_when(
(above_As_guideline == 0 & above_F_guideline == 0) ~ "All toxins within guidelines",
((above_As_guideline == 0 & above_F_guideline != 0) | (above_As_guideline != 0 & above_F_guideline == 0)) ~ "One toxin above guidelines",
(above_As_guideline > 0 & above_F_guideline > 0)~"Both toxins above guidelines",
ELSE ~ "error"
)))
summary<-relevantData%>% group_by(group)%>%count(group)%>%inner_join(relevantData%>%group_by(group)%>%summarise(mean_wells_tested=mean(total_tested)))
kable(summary)
| group | n | mean_wells_tested |
|---|---|---|
| All toxins within guidelines | 27 | 77.40741 |
| Both toxins above guidelines | 158 | 253.32278 |
| One toxin above guidelines | 156 | 132.00641 |
Moving forward the next step would be to map the percentage_above_guidelines data in order to allow us to identify any clusters of high exposure areas that may be present. The resulting map could be used to compare against the locations that were omitted due to missing data. Well owners in omitted locations that are close to high exposure clusters should be encouraged to test their well water as they too may be exposed to high levels of arsenic and fluoride.