Andrew Allen Bruce
Andrew Allen Bruce
Code ``` r url httr2::resp_body_json(check_type = FALSE, simplifyVector = TRUE) results tidyr::separate_wider_delim(period, delim = "/", names = c('period_start', 'period_end')) ``` ``` r results #> # A tibble: 74 × 11...
Code ``` r library(tictoc) library(provider) library(tidyverse) library(gt) tic() ind ✖ No results for year = 2013 and npi = 1043245657 check_xmark gt::text_case_when( x == TRUE ~ gt::html( fontawesome::fa("check", prefer_type =...
Code ``` r library(tictoc) library(provider) library(tidyverse) library(gt) tic() ind ✖ No results for year = 2013 and npi = 1043245657 gt pivot_longer(cols = c(Beneficiaries, Services, Charges, Allowed, Payment), names_to =...
Code ``` r library(tictoc) library(provider) library(tidyverse) library(gt) tic() ind ✖ No results for year = 2013 and npi = 1043245657 chronic cols_nanoplot( columns = contains("State"), reference_line = "mean", new_col_name =...
Code ``` r library(tictoc) library(provider) library(tidyverse) library(gt) tic() ind ✖ No results for year = 2013 and npi = 1043245657 gt select(-tot_hcpcs, -tot_std_pymt) |> change(starts_with("tot_")) |> select(-ends_with("_cum")) |> gt(rowname_col =...
Code ``` r library(provider) library(tidyverse) library(gt) library(gtExtras) val unnest(demographics) |> mutate(year = as.integer(year)) |> select(year, entity_type, gender, specialty, tot_hcpcs:bene_age_avg) |> group_by(year, entity_type) |> summarise( providers = n(), benes = mean(tot_benes,...
> Code > Created on 2023-10-18 with [reprex v2.0.2](https://reprex.tidyverse.org) > >  Code ``` r library(provider) library(tidyverse) library(gt) library(gtExtras) ind1 ✖ No results for year = 2013 and npi =...
Code ``` r library(provider) library(tidyverse) library(gt) library(gtExtras) val group_by(year) |> summarise( provs = n(), benes = sum(tot_benes), srvcs = sum(tot_srvcs), pymt = sum(tot_payment), .groups = "drop") |> change(!year) |> select(year,...
``` r library(provider) library(tidyverse) library(gt) library(gtExtras) ex select(-c(state_name, fips)) |> filter(state %in% c("US", "AL")) state_total mutate(bene_tstate = state_total, .before = bene_total) |> group_by(year, state, county) |> summarise(total = bene_total /...
### Using [**{ivs}**:](https://davisvaughan.github.io/ivs/index.html) Code ``` r short