Recently Published
Statistical Functions In Julia
Statistical Functions In Julia
Proportion of those aged 65+ who are Living Alone by Census Tract across the Rio Grande Valley
This map should describe the proportion -- as a percentage -- of those 65 and older across the Rio Grande Valley who report living alone. The denominator for this proportion should be interpreted as the *total number* of those 65 and older in each tract.
The data is grouped via Jenks Natural Breaks classification which, per the CDC, "...clusters data into groups that minimize the within-group variance and maximize the between-group variance."
When hovering over any given tract, one should be able to see:
a) the Census Tract
b) the total population estimate for those aged 65 and older
c) the margin-of-error (MOE) for the total population estimate mentioned above,
d) the sum of those living alone in each tract (which was originally delineated by sex in variables "B09020_015" and "B09020_018", and
e) the proportion of individuals living alone in each tract as a percentage, where bullet 'd' above is divided by bullet 'b', the total population estimate >=65y/o for that area.
Thank you!
..
Relevant code:
get_acs("tract", table = "B09020", state = "TX", county = c("Cameron","Hidalgo", "Willacy", "Starr"), year= 2023, survey = "acs5", summary_var = "B09020_001", geometry = TRUE) -> living_alone_65_LRGV_tracts_alt
living_alone_65_LRGV_tracts_alt %>% left_join(., acs_2023_vars, by = c("variable"="name")) %>% separate_wider_delim(cols="label", delim = "!!", names_sep = "", too_few = "align_start") %>% filter(label7 == "Living alone") %>% transform(tract_alone_sum = ave(.$estimate, .$NAME, FUN=sum)) %>% mutate(proportion_of_population = round(100 * (tract_alone_sum/summary_est),2), tract_alone_sum = round(tract_alone_sum,2)) %>% dplyr::rename(., `Total 65+`=6, `Total 65+ MOE`=7, `Sum Living Alone`=18, `Proportion Living Alone`=19) %>% st_as_sf(.) %>% filter(!st_is_empty(.)) %>% tm_shape(.) + tm_polygons(col = "Proportion Living Alone", style = "jenks", fill_alpha = 0.30, palette = "reds", title = "Density of Isolation", popup.vars = c("NAME", "Sum Living Alone", "Total 65+", "Total 65+ MOE", "Proportion Living Alone")) + tm_layout(title = "Proportion of those aged 65+ who are Living Alone by Census Tract across the Rio Grande Valley") + tm_credits("Source: U.S. Census Bureau. 'Relationship by Household Type (Including Living Alone) for the Population 65 Years and Over.' American Community Survey, ACS 5-Year Estimates Detailed Tables, Table B09020, 2019-2023, https://data.census.gov/table/ACSDT1Y2022.B09020. Accessed on February 3, 2025.") + tm_basemap("OpenStreetMap")
Game Theory with Julia
Game Theory with Julia