RPubs will retire in June 2027. Your existing documents will stay accessible through December 31, 2031
and Connect Cloud is the recommended home for new publishing. Read the blog post

Recently Published

Activity 3 Data 101
activity 3
Intro R
Hidalgo County Hoon Map (Uninsured below 2x Poverty Threshold)
library(dplyr) library(stringr) library(sf) library(tmap) library(scales) rbind(load_variables(2023, "acs5", cache = TRUE) %>% .[,1:3], load_variables(2023, "acs5/profile", cache = TRUE), load_variables(2023, "acs5/subject", cache = TRUE), load_variables(2023, "acs5/cprofile", cache = TRUE)) %>% as.data.frame(.) ->all_acs_vars lrgv_24<- get_acs(geography = "tract", county = c("Hidalgo", "Cameron", "Willacy", "Starr"), table = "C27016", state = "TX", year = 2024, survey = "acs5", geometry = TRUE) %>% left_join(., all_acs_vars, by = c("variable"="name")) %>% separate_wider_delim(., cols = "label", delim = "!!", names_sep="", too_few = "align_start") %>% separate_wider_delim(., cols = "variable", delim = "_", names_sep="", too_few = "align_start") %>% mutate(variable2 = as.numeric(variable2)) lrgv_24 %>% filter(grepl("205.05; H|206; H|207.29; H|207.30; H;| 207.24; H", NAME)) %>% dplyr::select(NAME, geometry) %>% unique(.) %>% st_as_sf(.) %>% st_union(.) %>% st_boundary() -> hoon_boundary rbind(load_variables(2023, "acs5", cache = TRUE) %>% .[,1:3], load_variables(2023, "acs5/profile", cache = TRUE), load_variables(2023, "acs5/subject", cache = TRUE), load_variables(2023, "acs5/cprofile", cache = TRUE)) %>% as.data.frame(.) ->all_acs_vars lrgv_24<- get_acs(geography = "tract", county = c("Hidalgo", "Cameron", "Willacy", "Starr"), table = "C27016", state = "TX", year = 2024, survey = "acs5", geometry = TRUE) %>% left_join(., all_acs_vars, by = c("variable"="name")) %>% separate_wider_delim(., cols = "label", delim = "!!", names_sep="", too_few = "align_start") %>% separate_wider_delim(., cols = "variable", delim = "_", names_sep="", too_few = "align_start") %>% mutate(variable2 = as.numeric(variable2)) lrgv_24 %>% mutate(over_under = case_when( str_detect(label3, "1.00|1.38") ~ "UNDER", str_detect(label3, "2.00|4.00") ~ "OVER", TRUE ~ "SUMMARY_VAR")) %>% group_by(NAME, label5, over_under) %>% mutate(grouped_ests = sum(estimate)) %>% filter(variable2 != 1 & !is.na(label4) & !is.na(label5)) %>% ungroup() %>% dplyr::select(NAME, label5, over_under, grouped_ests, geometry) %>% unique() %>% group_by(NAME) %>% mutate(tract_est = sum(grouped_ests), pct = grouped_ests/tract_est) %>% ungroup() %>% filter(over_under != "OVER" & !is.na(pct)) %>% group_by(NAME) %>% mutate(pct_nocoverage = sum(pct) %>% scales::percent(.)) %>% filter(grepl("Hidalgo", NAME)) %>% mutate(pct_two = pct*100, pct = pct %>% scales::percent(.), ) %>% dplyr::rename(., `Tract Name`=1, `Insurance Coverage`=2, `Under 2.0x Poverty Threshold?`=3, `Number Uninsured`=4, `Tract Pop. Size`=6, `Percent Uninsured under 2.0x Threshold` = 7, `Percent Under 2.0x Poverty Threshold`=8, `Under 2.0x Poverty Threshold (%)`=9) %>% filter(grepl("No", `Insurance Coverage`)) %>% st_as_sf() %>% tm_shape() + tm_polygons( fill = "Under 2.0x Poverty Threshold (%)", fill_alpha = 0.35, popup.vars = c("Tract Name", "Percent Under 2.0x Poverty Threshold", "Percent Uninsured under 2.0x Threshold", "Number Uninsured", "Tract Pop. Size"), fill.scale = tm_scale_intervals( style = "jenks" )) + tm_shape(hoon_boundary) + tm_lines(col = "red") + tm_basemap("OpenStreetMap")
Nebo_Veg
landfire vegetation data, simplified/re-classified into main habitat classes
Plot
Week 1: Learn R and Python with Heatmaps
Nura Uddin's Learning R and Python with Heatmaps
Volatility Garch Model
Inteligencia Territorial Electoral 2027 GOMEZ PALACIO Lectura de seguridad, gobernabilidad y oportunidad política
Este documento contiene información sensible para uso exclusivo del destinatario. Las fuentes son públicas; el análisis es propietario. Este reporte integra información pública y bases estructuradas para interpretar condiciones territoriales relevantes para planeación política y análisis municipal.
Summer by the Baltic Sea: An Interactive Travel Map
Explore some of my favourite places along the Polish Baltic coast through an interactive map built with Leaflet in R.