Skip to content

Commit

Permalink
lint 05-bivariate_pm_patient.Rmd
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellmanware committed Feb 1, 2024
1 parent 6fd4407 commit d819ce3
Showing 1 changed file with 19 additions and 14 deletions.
33 changes: 19 additions & 14 deletions 05-bivariate_pm_patient.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ ma_counties_data <- us_counties_MA %>% left_join(df_agg, by = c("NAMELSAD" = "co
head(ma_counties_data)
```

```{r}
# ggplot() +
# geom_sf(data = ma_counties_data,
# aes(fill = patient_count),
# color = NA) +
# scale_fill_viridis() +
# theme_void() +
# theme(legend.position = "bottom") +
# labs(fill = "Patient count")
```{r, eval = FALSE}
ggplot() +
geom_sf(data = ma_counties_data,
aes(fill = patient_count),
color = NA) +
scale_fill_viridis() +
theme_void() +
theme(legend.position = "bottom") +
labs(fill = "Patient count")
```

### Set color on both varaibles
Expand Down Expand Up @@ -136,9 +136,12 @@ m4 <- mapplot(rownames(ma_counties_data) ~ class2,
)
```

```{r, eval = FALSE}
print(nbins)
matrix(1:(nbins * nbins), nrow = nbins)
```

```{r}
# print(nbins)
# matrix(1:(nbins*nbins), nrow=nbins)
m4leg <- levelplot(matrix(1:(nbins * nbins), nrow = nbins),
axes = FALSE, col.regions = cols(),
xlab = "patient", ylab = "pm_2.5", cuts = 8, colorkey = FALSE,
Expand All @@ -151,11 +154,13 @@ print(m4leg, newpage = FALSE)
popViewport()
```

```{r}
# suppressWarnings(print( m4 ))
```{r, eval = FALSE}
suppressWarnings(print(m4))
# table(apply(data_sample, 1, paste, collapse = ""))
table(apply(data_sample, 1, paste, collapse = ""))
```

```{r}
m4leg <- levelplot(matrix(1:(nbins * nbins), nrow = nbins),
axes = FALSE, col.regions = cols(),
xlab = "patient", ylab = "pm_2.5", cuts = 8, colorkey = FALSE,
Expand Down

0 comments on commit d819ce3

Please sign in to comment.