Skip to content

Commit

Permalink
Verify map output
Browse files Browse the repository at this point in the history
  • Loading branch information
vsriram24 committed Sep 20, 2024
1 parent cdc4c70 commit 53a5ff0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
1 change: 0 additions & 1 deletion R/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
## TODO:
## make Shiny app run when you call "oncarto" from the R console
## fill out additional tabs / background
## confirm that presented data are correctly updating

# Call required libraries / packages
library(pak)
Expand Down
7 changes: 1 addition & 6 deletions R/incidenceByState.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -330,8 +330,8 @@ merge_all_incidence <- function(cancer_types, race, sex, age, stage, year, con){
}
```


# Step 1. Ingest incidence data from {cancerprof}

```{r}
# Create a new DuckDB database, corresponding to incidence data from US states
con <- dbConnect(duckdb::duckdb(), "cancer-incidence-usa-state.duckdb")
Expand Down Expand Up @@ -359,7 +359,6 @@ for (cancer in cancer_types) {
dbListTables(con)
```


# Step 2. Merge DB data into a wide table

```{r}
Expand All @@ -375,8 +374,6 @@ incidence_by_cancer_type = merge_all_incidence(
dbDisconnect(con)
```



# Step 3. Visualize incidence data in a choropleth map

NOTE: the following code will likely be replaced for the full-scale Shiny app
Expand Down Expand Up @@ -442,5 +439,3 @@ leaflet(incidence_by_type_with_shape) %>%
title = "Cancer Incidence (All Sites)"
)
```


11 changes: 7 additions & 4 deletions R/incidenceByWAHSA.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -193,16 +193,19 @@ cancer_types = c(
)
```

Test code
```{r}
cancerprof::incidence_cancer(
"WA", "hsa",
"all cancer sites",
test_data = cancerprof::incidence_cancer(
"USA", "state",
"bladder",
"All Races (includes Hispanic)",
"males",
"both sexes",
"all ages",
"all stages",
"latest 5 year average"
)
test_data
```

```{r}
Expand Down

0 comments on commit 53a5ff0

Please sign in to comment.