Skip to content

Commit 4d75b70

Browse files
authored
Merge pull request #84 from NIEHS/dariusmb_0219
Dariusmb 0721
2 parents 34e0746 + 0906bd4 commit 4d75b70

File tree

3 files changed

+44
-13
lines changed

3 files changed

+44
-13
lines changed

chapters/05-01-hcup-amadeus-usecase.Rmd

Lines changed: 44 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -399,25 +399,48 @@ asthma_prevalence <- asthma_cases / total_individuals
399399

400400
### Visualizing the Relationship Between Heavy Smoke Exposure and Asthma
401401

402-
We will now generate a boxplot to visualize the distribution of average heavy smoke days across individuals with and without an asthma diagnosis.
402+
We will now generate a violin plot to visualize the distribution of average heavy smoke days across individuals with and without an asthma diagnosis.
403403

404404
```{r eval=FALSE}
405-
ggplot(smoke_summary, aes(x = factor(has_asthma), y = avg_heavy,
406-
fill = factor(has_asthma))) +
407-
geom_boxplot() +
405+
ggplot(smoke_long, aes(x = factor(has_asthma), y = smoke_days,
406+
fill = factor(has_asthma))) +
407+
geom_violin(trim = FALSE, alpha = 0.6) +
408+
geom_boxplot(width = 0.1, outlier.shape = NA, alpha = 0.5) +
409+
facet_wrap(~ smoke_type, scales = "free_y") +
408410
labs(
409-
x = "Has Asthma (J45)",
410-
y = "Average Heavy Smoke Days",
411-
fill = "Has Asthma",
412-
title = "Average Heavy Smoke Days vs Asthma Diagnosis"
411+
x = "Asthma Diagnosis (J45)",
412+
y = "Average Smoke Days",
413+
fill = "Asthma Status",
414+
title = "Violin Plots: Smoke Exposure by Asthma Diagnosis",
415+
subtitle = "Faceted by smoke type (light, medium, heavy)"
413416
) +
414417
theme_minimal()
418+
415419
```
416420

417421
::: figure
418-
<img src="images/hcup_amadeus_usecase/asthma_vs_heavy_smoke.png" style="width:100%"/>
422+
<img src="images/hcup_amadeus_usecase/JointViolinPlot.png" style="width:100%"/>
419423
:::
420424

425+
This figure shows the distribution of average smoke exposure days by asthma status (J45 diagnosis), separated into three smoke types: light, medium, and heavy. Each subplot is a violin plot faceted by smoke type, comparing individuals with asthma (TRUE) and without asthma (FALSE).
426+
427+
**Key Observations from Violin Plots**
428+
429+
`avg_light`
430+
431+
- Both asthma and non-asthma groups are centered around \~0.2 average light smoke days.\
432+
- The distributions are broad and overlapping, suggesting **no strong visual difference**.
433+
434+
`avg_medium`
435+
436+
- Both groups have a narrower range than light exposure, mostly between **0.1–0.3 days**.\
437+
- There is **slightly more central density** in the asthma group around 0.2, but overall the distributions **still overlap substantially**.
438+
439+
`avg_heavy`
440+
441+
- This variable shows the **greatest skew**: most individuals have very low or zero average heavy smoke exposure.\
442+
- However, there is a **small tail in the asthma group** suggesting **higher exposure in some individuals**.
443+
421444
### Bivariate Map Analysis: Asthma and Heavy Smoke Exposure
422445

423446
The code below producess a bivariate map for spatial analysis of asthma prevalence and heavy smoke exposure across ZIP codes in Oregon. Using hospital discharge data HCUP and NOAA's HMS smoke plume data, ZIP-level asthma rates were calculated and paired with the average number of heavy smoke days over the same time period.
@@ -501,16 +524,24 @@ final_plot
501524

502525
Each ZIP code is shaded based on the intersection of these two variables using a 3x3 quantile classification. The bivariate color scale in the legend shows increasing smoke exposure along the x-axis (red) and increasing asthma prevalence along the y-axis (blue):
503526

504-
Dark red areas: High smoke exposure, low asthma prevalence
527+
`Dark red areas`: High smoke exposure, low asthma prevalence
505528

506-
Dark blue areas: High asthma prevalence, low smoke exposure
529+
`Dark blue areas`: High asthma prevalence, low smoke exposure
507530

508-
Dark purple areas: High asthma and high smoke — indicating areas with compounded health and environmental burdens
531+
`Dark purple areas`: High asthma and high smoke — indicating areas with compounded health and environmental burdens
509532

510-
Light gray areas: Low on both dimensions
533+
`Light gray areas`: Low on both dimensions
511534

512535
This bivariate map helps identify regions where environmental and health vulnerabilities intersect and can inform targeted public health responses.
513536

537+
We observe clusters of purple areas, particularly in southern and eastern Oregon — ZIPs that face both high smoke exposure and high asthma prevalence. In contrast, parts of the western coastal area are red — high smoke but low asthma, while parts of northeastern Oregon are blue — high asthma but lower smoke.
538+
539+
This can be explained by: Smoke from fires (especially in southwestern Oregon and northern California) is carried eastward/northeastward by prevailing winds.
540+
541+
As smoke moves inland, it encounters the Cascade Range, where it: Is forced to rise and spill over peaks, gets concentrated in valleys and downwind ZIP codes. This orographic uplift and channeling can increase heavy smoke exposure in ZIP codes east of the mountains, aligning with the purple zones in your bivariate map—areas with both heavy smoke exposure and high asthma prevalence.
542+
543+
**Public Health Relevance** This type of bivariate mapping can help prioritize resources for ZIP codes that are most vulnerable. For example, purple regions may benefit from both air quality interventions and respiratory health programs, while blue regions may warrant investigation into other asthma risk factors.
544+
514545
### Logistic Regression Analysis
515546

516547
Finally, we fit a logistic regression model to examine the relationship between asthma diagnoses and exposure to different levels of smoke density.
57.6 KB
Loading
129 KB
Loading

0 commit comments

Comments
 (0)