1 Configuración y Carga de Datos

ruta <- "C:/Users/cordo/OneDrive/Desktop/ESTADISITCA/Oil__Gas____Other_Regulated_Wells__Beginning_1860.csv"
datos_originales <- readr::read_delim(
  ruta, delim=";", trim_ws=TRUE, show_col_types=FALSE,
  name_repair="minimal", locale=readr::locale(encoding="UTF-8")
)
cat("Carga exitosa:", fmt_entero(nrow(datos_originales)), "registros.\n")
## Carga exitosa: 47.407 registros.

2 Extracción y Limpieza de la Variable

town_limpio <- datos_originales |>
  dplyr::transmute(Municipio=stringr::str_squish(as.character(.data[[columna_town]]))) |>
  dplyr::filter(!is.na(Municipio), Municipio != "", !toupper(Municipio) %in% c("NA", "N/A", "NULL"))
set.seed(2026)
town_limpio$Municipio <- factor(town_limpio$Municipio,
                               levels=sample(unique(town_limpio$Municipio)))
N <- nrow(town_limpio)
if (N == 0L) stop("No existen registros válidos de Town.")

cat("Registros válidos:", fmt_entero(N),
    " | Municipios distintos:", nlevels(town_limpio$Municipio), "\n")
## Registros válidos: 46.767  | Municipios distintos: 523

3 Identificación de la Variable

La variable Town (Municipio) es cualitativa nominal: identifica municipios sin establecer un orden jerárquico entre ellos.

tipo_variable <- "Cualitativa nominal"

4 Tabla de Distribución de Frecuencias

El Cuadro N° 1 muestra todos los municipios encontrados. Desplázate dentro de la tabla para consultar todas las categorías.

cat(crear_cuadro(tabla_frecuencias, 1,
  "Distribución de frecuencias de los pozos regulados según el Municipio en el estado de Nueva York, 1860 - Actualidad",
  desplazamiento=TRUE))
Cuadro N° 1: Distribución de frecuencias de los pozos regulados según el Municipio en el estado de Nueva York, 1860 - Actualidad
MUNICIPIO FRECUENCIA ABSOLUTA (nᵢ) FRECUENCIA RELATIVA (hᵢ) FRECUENCIA RELATIVA PORCENTUAL (%)
Centerville 3 0.0001 0.01%
Olean 1.498 0.0320 3.20%
Pavilion 119 0.0025 0.25%
Poland 207 0.0044 0.44%
Elba 9 0.0002 0.02%
Rushford 7 0.0001 0.01%
Persia 166 0.0035 0.35%
Hardenburgh 1 0.0000 0.00%
Throop 20 0.0004 0.04%
Sheridan 374 0.0080 0.80%
Lenox 1 0.0000 0.00%
Parish 2 0.0000 0.00%
Granger 11 0.0002 0.02%
Georgetown 2 0.0000 0.00%
Venice 11 0.0002 0.02%
Middlesex 15 0.0003 0.03%
Yorkshire 34 0.0007 0.07%
Cortlandville 6 0.0001 0.01%
Ischua 16 0.0003 0.03%
Castile 23 0.0005 0.05%
Somerset 1 0.0000 0.00%
Nunda 4 0.0001 0.01%
Root 3 0.0001 0.01%
Lyons 2 0.0000 0.00%
Ashford 40 0.0009 0.09%
Independence 840 0.0180 1.80%
Little Falls 2 0.0000 0.00%
Conewango 94 0.0020 0.20%
Caledonia 70 0.0015 0.15%
Horseheads 7 0.0001 0.01%
Marcellus 16 0.0003 0.03%
Newfane 2 0.0000 0.00%
Scipio 13 0.0003 0.03%
Van Buren 28 0.0006 0.06%
Sardinia 58 0.0012 0.12%
Byron 11 0.0002 0.02%
Mansfield 4 0.0001 0.01%
Niagara 1 0.0000 0.00%
Great Valley 7 0.0001 0.01%
Saratoga 1 0.0000 0.00%
Springfield 2 0.0000 0.00%
Farmersville 29 0.0006 0.06%
Fenner 1 0.0000 0.00%
Clarksville 368 0.0079 0.79%
Maine 4 0.0001 0.01%
Oxford 6 0.0001 0.01%
York 93 0.0020 0.20%
Ulysses 6 0.0001 0.01%
Dayton 117 0.0025 0.25%
French Creek 113 0.0024 0.24%
Ontario 1 0.0000 0.00%
Bethany 67 0.0014 0.14%
North Hempstead 2 0.0000 0.00%
Virgil 5 0.0001 0.01%
Brighton 1 0.0000 0.00%
Sidney 1 0.0000 0.00%
Fremont 3 0.0001 0.01%
Geneva City 1 0.0000 0.00%
East Bloomfield 60 0.0013 0.13%
Allegany 6.088 0.1302 13.02%
Wolcott 1 0.0000 0.00%
Portage 3 0.0001 0.01%
Elmira City 9 0.0002 0.02%
Avoca 19 0.0004 0.04%
Lewis 1 0.0000 0.00%
Albion 2 0.0000 0.00%
Mount Pleasant 9 0.0002 0.02%
Avon 37 0.0008 0.08%
Ledyard 9 0.0002 0.02%
Spafford 1 0.0000 0.00%
Colesville 13 0.0003 0.03%
Middlebury 443 0.0095 0.95%
Carlisle 1 0.0000 0.00%
Harrisburg 5 0.0001 0.01%
Salina 1 0.0000 0.00%
Brutus 3 0.0001 0.01%
Lodi 3 0.0001 0.01%
Barker 2 0.0000 0.00%
Wayland 2 0.0000 0.00%
Summerhill 1 0.0000 0.00%
Remsen 1 0.0000 0.00%
Wappinger 10 0.0002 0.02%
Caneadea 14 0.0003 0.03%
Lackawanna 11 0.0002 0.02%
Minden 2 0.0000 0.00%
Rockland 1 0.0000 0.00%
Canandaigua City 5 0.0001 0.01%
Delhi 1 0.0000 0.00%
Portland 203 0.0043 0.43%
Portville 28 0.0006 0.06%
Reading 160 0.0034 0.34%
Carrollton 2.724 0.0582 5.82%
Arcadia 1 0.0000 0.00%
Fenton 17 0.0004 0.04%
Roxbury 2 0.0000 0.00%
Torrey 5 0.0001 0.01%
Deposit 2 0.0000 0.00%
Owasco 4 0.0001 0.01%
Taylor 2 0.0000 0.00%
Oswego 1 0.0000 0.00%
Owego 57 0.0012 0.12%
North Dansville 6 0.0001 0.01%
Sullivan 2 0.0000 0.00%
Almond 8 0.0002 0.02%
Milton 1 0.0000 0.00%
Middletown 1 0.0000 0.00%
Concord 199 0.0043 0.43%
Westfield 338 0.0072 0.72%
Kirkwood 11 0.0002 0.02%
Starkey 13 0.0003 0.03%
Queensbury 1 0.0000 0.00%
Ellicottville 63 0.0013 0.13%
Italy 11 0.0002 0.02%
Mount Hope 1 0.0000 0.00%
Bath 73 0.0016 0.16%
Van Etten 27 0.0006 0.06%
Hounsfield 1 0.0000 0.00%
Bristol 59 0.0013 0.13%
Hornellsville 19 0.0004 0.04%
Triangle 5 0.0001 0.01%
New Hudson 10 0.0002 0.02%
Alexander 58 0.0012 0.12%
Olean City 3 0.0001 0.01%
Scio 1.341 0.0287 2.87%
Java 39 0.0008 0.08%
Smithfield 1 0.0000 0.00%
Onondaga 5 0.0001 0.01%
Saugerties 2 0.0000 0.00%
Perrysburg 272 0.0058 0.58%
Clymer 193 0.0041 0.41%
Tully 175 0.0037 0.37%
Chemung 10 0.0002 0.02%
Mina 100 0.0021 0.21%
Humphrey 17 0.0004 0.04%
Ossian 5 0.0001 0.01%
Baldwin 8 0.0002 0.02%
Machias 4 0.0001 0.01%
Oakfield 15 0.0003 0.03%
Fort Ann 1 0.0000 0.00%
Otto 101 0.0022 0.22%
Gerry 242 0.0052 0.52%
Canisteo 40 0.0009 0.09%
Richmond 32 0.0007 0.07%
Elma 102 0.0022 0.22%
Hamden 1 0.0000 0.00%
Hornby 39 0.0008 0.08%
Freedom 22 0.0005 0.05%
Batavia 67 0.0014 0.14%
Andover 857 0.0183 1.83%
Clarence 19 0.0004 0.04%
Carroll 116 0.0025 0.25%
Alma 3.621 0.0774 7.74%
Middleburg 1 0.0000 0.00%
Vestal 1 0.0000 0.00%
Victor 1 0.0000 0.00%
Lansing 44 0.0009 0.09%
Sandy Creek 69 0.0015 0.15%
Aurora 142 0.0030 0.30%
New Albion 28 0.0006 0.06%
West Turin 1 0.0000 0.00%
Attica 24 0.0005 0.05%
Galway 1 0.0000 0.00%
German 4 0.0001 0.01%
Stafford 15 0.0003 0.03%
Gaines 3 0.0001 0.01%
Jamestown 5 0.0001 0.01%
Tyrone 145 0.0031 0.31%
Camden 17 0.0004 0.04%
Jasper 50 0.0011 0.11%
Western 3 0.0001 0.01%
Stockbridge 2 0.0000 0.00%
Wellsville 248 0.0053 0.53%
Collins 413 0.0088 0.88%
Willing 236 0.0050 0.50%
Madison 4 0.0001 0.01%
Orangeville 8 0.0002 0.02%
Enfield 7 0.0001 0.01%
Franklin 5 0.0001 0.01%
Denmark 1 0.0000 0.00%
Eaton 16 0.0003 0.03%
Howard 29 0.0006 0.06%
Shelby 2 0.0000 0.00%
Stockton 170 0.0036 0.36%
Albany 1 0.0000 0.00%
Potter 11 0.0002 0.02%
Pompey 1 0.0000 0.00%
Burns 2 0.0000 0.00%
Barrington 47 0.0010 0.10%
Friendship 17 0.0004 0.04%
Kiantone 114 0.0024 0.24%
West Bloomfield 47 0.0010 0.10%
Brookfield 15 0.0003 0.03%
Florence 5 0.0001 0.01%
Sparta 2 0.0000 0.00%
Chautauqua 407 0.0087 0.87%
Wales 144 0.0031 0.31%
Chili 1 0.0000 0.00%
Mendon 1 0.0000 0.00%
Lyndon 5 0.0001 0.01%
North Collins 307 0.0066 0.66%
Rathbone 38 0.0008 0.08%
Wayne 30 0.0006 0.06%
Pike 3 0.0001 0.01%
Randolph 107 0.0023 0.23%
Arkwright 198 0.0042 0.42%
Ellicott 101 0.0022 0.22%
Marilla 100 0.0021 0.21%
Le Roy 22 0.0005 0.05%
Nichols 25 0.0005 0.05%
Cameron 24 0.0005 0.05%
Hume 13 0.0003 0.03%
Worcester 1 0.0000 0.00%
Fairfield 4 0.0001 0.01%
Constantia 1 0.0000 0.00%
Villenova 168 0.0036 0.36%
Leon 166 0.0035 0.35%
Belfast 14 0.0003 0.03%
Alfred 23 0.0005 0.05%
Glen Cove 2 0.0000 0.00%
Barre 3 0.0001 0.01%
Romulus 1 0.0000 0.00%
Redfield 1 0.0000 0.00%
Red House 181 0.0039 0.39%
Glen 2 0.0000 0.00%
Colden 162 0.0035 0.35%
Woodhull 69 0.0015 0.15%
Preston 13 0.0003 0.03%
Yates 5 0.0001 0.01%
Smyrna 97 0.0021 0.21%
Geneva 9 0.0002 0.02%
Mt Vernon 1 0.0000 0.00%
South Bristol 3 0.0001 0.01%
Hamlin 2 0.0000 0.00%
Big Flats 17 0.0004 0.04%
Ballston 1 0.0000 0.00%
Whitestown 1 0.0000 0.00%
Volney 19 0.0004 0.04%
Cairo 1 0.0000 0.00%
Queens 12 0.0003 0.03%
White Plains 2 0.0000 0.00%
Benton 21 0.0004 0.04%
Bergen 3 0.0001 0.01%
Napoli 8 0.0002 0.02%
Barton 8 0.0002 0.02%
Mount Morris 4 0.0001 0.01%
Auburn City 3 0.0001 0.01%
Lisle 1 0.0000 0.00%
Bainbridge 1 0.0000 0.00%
Tyre 11 0.0002 0.02%
Mayfield 1 0.0000 0.00%
Dix 63 0.0013 0.13%
Solon 3 0.0001 0.01%
Syracuse City 1 0.0000 0.00%
Glenville 1 0.0000 0.00%
Newburgh 16 0.0003 0.03%
Sheldon 85 0.0018 0.18%
Conesus 3 0.0001 0.01%
Freetown 2 0.0000 0.00%
Prattsburg 20 0.0004 0.04%
Darien 304 0.0065 0.65%
Addison 5 0.0001 0.01%
Urbana 12 0.0003 0.03%
Chenango 1 0.0000 0.00%
Ithaca 6 0.0001 0.01%
Genesee Falls 3 0.0001 0.01%
Hector 26 0.0006 0.06%
Coventry 15 0.0003 0.03%
Lewiston 2 0.0000 0.00%
North Harmony 269 0.0058 0.58%
Herkimer 1 0.0000 0.00%
Schroeppel 3 0.0001 0.01%
Columbus 1 0.0000 0.00%
Candor 16 0.0003 0.03%
Cherry Valley 4 0.0001 0.01%
Hamburg 141 0.0030 0.30%
Angelica 14 0.0003 0.03%
Henrietta 1 0.0000 0.00%
Charlotte 178 0.0038 0.38%
Trenton 2 0.0000 0.00%
Plattekill 1 0.0000 0.00%
Rochester 2 0.0000 0.00%
New Rochelle 7 0.0001 0.01%
Hartsville 29 0.0006 0.06%
Marcy 1 0.0000 0.00%
Waterloo 26 0.0006 0.06%
West Sparta 22 0.0005 0.05%
Rush 1 0.0000 0.00%
Greenwood 395 0.0084 0.84%
Scott 2 0.0000 0.00%
Granby 1 0.0000 0.00%
Martinsburg 1 0.0000 0.00%
German Flatts 3 0.0001 0.01%
Boonville 1 0.0000 0.00%
Wirt 1.537 0.0329 3.29%
Cherry Creek 158 0.0034 0.34%
Wawarsing 1 0.0000 0.00%
Sempronius 2 0.0000 0.00%
Bolivar 5.422 0.1159 11.59%
Covington 86 0.0018 0.18%
Palermo 2 0.0000 0.00%
Lima 7 0.0001 0.01%
Livonia 22 0.0005 0.05%
Burlington 1 0.0000 0.00%
Victory 2 0.0000 0.00%
Harrison 2 0.0000 0.00%
Cambria 5 0.0001 0.01%
Hinsdale 39 0.0008 0.08%
Groton 18 0.0004 0.04%
Hartwick 1 0.0000 0.00%
Little Valley 8 0.0002 0.02%
Ridgeway 1 0.0000 0.00%
Bronx 20 0.0004 0.04%
Wheeler 7 0.0001 0.01%
Windham 1 0.0000 0.00%
Ossining 3 0.0001 0.01%
Ovid 2 0.0000 0.00%
Milo 25 0.0005 0.05%
Perry 70 0.0015 0.15%
Nelson 1 0.0000 0.00%
Veteran 28 0.0006 0.06%
West Monroe 1 0.0000 0.00%
Grand Island 3 0.0001 0.01%
Mexico 2 0.0000 0.00%
Springport 147 0.0031 0.31%
West Seneca 40 0.0009 0.09%
Guilford 3 0.0001 0.01%
Eden 212 0.0045 0.45%
Gainesville 81 0.0017 0.17%
Nanticoke 1 0.0000 0.00%
Newfield 9 0.0002 0.02%
Campbell 18 0.0004 0.04%
Palatine 1 0.0000 0.00%
Southport 34 0.0007 0.07%
Yonkers 13 0.0003 0.03%
Amity 277 0.0059 0.59%
Spencer 12 0.0003 0.03%
Tonawanda 48 0.0010 0.10%
Tioga 7 0.0001 0.01%
Varick 85 0.0018 0.18%
Lapeer 1 0.0000 0.00%
Ogdensburg 1 0.0000 0.00%
Shandaken 4 0.0001 0.01%
Seneca 16 0.0003 0.03%
Covert 2 0.0000 0.00%
Catlin 25 0.0005 0.05%
Montour 3 0.0001 0.01%
Cold Spring 34 0.0007 0.07%
Broadalbin 1 0.0000 0.00%
Busti 966 0.0207 2.07%
Maryland 4 0.0001 0.01%
Thompson 2 0.0000 0.00%
Easton 1 0.0000 0.00%
Birdsall 3 0.0001 0.01%
Lysander 45 0.0010 0.10%
Corning 24 0.0005 0.05%
Groveland 28 0.0006 0.06%
Verona 4 0.0001 0.01%
Pendleton 1 0.0000 0.00%
Lindley 9 0.0002 0.02%
Tuscarora 30 0.0006 0.06%
Binghamton 1 0.0000 0.00%
Deerpark 3 0.0001 0.01%
Manhattan 213 0.0046 0.46%
Cincinnatus 1 0.0000 0.00%
Naples 21 0.0004 0.04%
Caton 24 0.0005 0.05%
Brownville 1 0.0000 0.00%
Dryden 10 0.0002 0.02%
Rodman 1 0.0000 0.00%
Pomfret 284 0.0061 0.61%
Hancock 26 0.0006 0.06%
Warsaw 12 0.0003 0.03%
Royalton 2 0.0000 0.00%
Pulteney 28 0.0006 0.06%
Carlton 3 0.0001 0.01%
Cayuta 3 0.0001 0.01%
Sherman 134 0.0029 0.29%
Wawayanda 1 0.0000 0.00%
Hastings 2 0.0000 0.00%
Smithville 23 0.0005 0.05%
Franklinville 3 0.0001 0.01%
Johnstown 1 0.0000 0.00%
Westmoreland 1 0.0000 0.00%
Niagara Falls 1 0.0000 0.00%
Catharine 6 0.0001 0.01%
Sanford 8 0.0002 0.02%
Cato 19 0.0004 0.04%
Manchester 1 0.0000 0.00%
Princetown 1 0.0000 0.00%
Rome 22 0.0005 0.05%
Homer 3 0.0001 0.01%
Murray 6 0.0001 0.01%
Sennett 9 0.0002 0.02%
Elbridge 7 0.0001 0.01%
Greenfield 1 0.0000 0.00%
West Almond 1 0.0000 0.00%
Ward 57 0.0012 0.12%
Orangetown 4 0.0001 0.01%
Erin 47 0.0010 0.10%
Irondequoit 1 0.0000 0.00%
Unadilla 1 0.0000 0.00%
Richland 102 0.0022 0.22%
Lancaster 183 0.0039 0.39%
Ellington 199 0.0043 0.43%
Scriba 2 0.0000 0.00%
East Otto 40 0.0009 0.09%
Brant 234 0.0050 0.50%
Grove 3 0.0001 0.01%
Greenburgh 21 0.0004 0.04%
Fleming 50 0.0011 0.11%
West Union 926 0.0198 1.98%
Norwich 1 0.0000 0.00%
Geneseo 10 0.0002 0.02%
Binghamton City 1 0.0000 0.00%
Butler 11 0.0002 0.02%
Steuben 1 0.0000 0.00%
Deruyter 2 0.0000 0.00%
Danby 9 0.0002 0.02%
Plattsburgh Cit 1 0.0000 0.00%
Le Ray 5 0.0001 0.01%
Thurston 11 0.0002 0.02%
Orwell 1 0.0000 0.00%
Adams 3 0.0001 0.01%
Sangerfield 8 0.0002 0.02%
Harmony 198 0.0042 0.42%
Williamstown 3 0.0001 0.01%
Seneca Falls 27 0.0006 0.06%
Caroline 1 0.0000 0.00%
Florida 1 0.0000 0.00%
McDonough 6 0.0001 0.01%
Winfield 2 0.0000 0.00%
Elmira 20 0.0004 0.04%
Jefferson 2 0.0000 0.00%
Hopewell 4 0.0001 0.01%
Knox 1 0.0000 0.00%
Canandaigua 7 0.0001 0.01%
Holland 66 0.0014 0.14%
New Scotland 1 0.0000 0.00%
Farmington 13 0.0003 0.03%
Arcade 69 0.0015 0.15%
Leicester 141 0.0030 0.30%
Pembroke 156 0.0033 0.33%
Locke 2 0.0000 0.00%
Riga 21 0.0004 0.04%
Pinckney 1 0.0000 0.00%
Ira 2 0.0000 0.00%
Otsego 1 0.0000 0.00%
Croghan 1 0.0000 0.00%
Newstead 100 0.0021 0.21%
Conquest 6 0.0001 0.01%
Dunkirk 66 0.0014 0.14%
Stark 1 0.0000 0.00%
Jerusalem 13 0.0003 0.03%
Genesee 1.405 0.0300 3.00%
Lafayette 4 0.0001 0.01%
Staten Island 2 0.0000 0.00%
Wethersfield 6 0.0001 0.01%
Buffalo 30 0.0006 0.06%
Boston 194 0.0041 0.41%
Plymouth 20 0.0004 0.04%
Erwin 28 0.0006 0.06%
Allen 29 0.0006 0.06%
Fayette 274 0.0059 0.59%
Gorham 23 0.0005 0.05%
Junius 25 0.0005 0.05%
Guilderland 16 0.0003 0.03%
Ashland 2 0.0000 0.00%
Ripley 233 0.0050 0.50%
Scarsdale 2 0.0000 0.00%
Otselic 2 0.0000 0.00%
Lebanon 97 0.0021 0.21%
Laurens 1 0.0000 0.00%
Sweden 2 0.0000 0.00%
Hornell 1 0.0000 0.00%
Cheektowaga 38 0.0008 0.08%
North Castle 1 0.0000 0.00%
Kendall 3 0.0001 0.01%
Bennington 193 0.0041 0.41%
Evans 173 0.0037 0.37%
Amherst 48 0.0010 0.10%
Utica 2 0.0000 0.00%
Bradford 14 0.0003 0.03%
Cohocton 9 0.0002 0.02%
Aurelius 174 0.0037 0.37%
Harford 5 0.0001 0.01%
North Tonawanda 1 0.0000 0.00%
Ephratah 1 0.0000 0.00%
Dansville 10 0.0002 0.02%
Alabama 34 0.0007 0.07%
Ellery 226 0.0048 0.48%
Pittsfield 1 0.0000 0.00%
Tonawanda City 30 0.0006 0.06%
Hanover 396 0.0085 0.85%
Genoa 10 0.0002 0.02%
Morris 3 0.0001 0.01%
Alden 171 0.0037 0.37%
Eagle 4 0.0001 0.01%
Clarendon 2 0.0000 0.00%
Dunkirk City 11 0.0002 0.02%
Montezuma 3 0.0001 0.01%
Troupsburg 32 0.0007 0.07%
South Valley 5 0.0001 0.01%
Orange 32 0.0007 0.07%
Watertown City 2 0.0000 0.00%
Orchard Park 115 0.0025 0.25%
Mentz 1 0.0000 0.00%
Clarkstown 3 0.0001 0.01%
Galen 19 0.0004 0.04%
Catskill 1 0.0000 0.00%
Macedon 3 0.0001 0.01%
Otisco 3 0.0001 0.01%
Vernon 3 0.0001 0.01%
Phelps 45 0.0010 0.10%
Hartford 1 0.0000 0.00%
Johnstown City 1 0.0000 0.00%
Warren 1 0.0000 0.00%
Afton 7 0.0001 0.01%
Union 2 0.0000 0.00%
Horicon 1 0.0000 0.00%
Greene 2 0.0000 0.00%
Camillus 7 0.0001 0.01%
Ticonderoga 3 0.0001 0.01%
Cuba 16 0.0003 0.03%
Total 46.767 1.0000 100.00%

Fuente: Oil, Gas & Other Regulated Wells: Beginning 1860.

Top 10 de categorías con mayor frecuencia absoluta

La tabla resume los 10 municipios más frecuentes y agrupa los demás en Otros, conservando el total de 46.767 registros válidos.

cat(crear_cuadro(tabla_resumen, 2,
  "Distribución de frecuencias de los pozos regulados: 10 municipios más frecuentes y Otros, Nueva York, 1860 - Actualidad"))
Cuadro N° 2: Distribución de frecuencias de los pozos regulados: 10 municipios más frecuentes y Otros, Nueva York, 1860 - Actualidad
MUNICIPIO FRECUENCIA ABSOLUTA (nᵢ) FRECUENCIA RELATIVA (hᵢ) FRECUENCIA RELATIVA PORCENTUAL (%)
Allegany 6.088 0.1302 13.02%
Bolivar 5.422 0.1159 11.59%
Alma 3.621 0.0774 7.74%
Carrollton 2.724 0.0582 5.82%
Wirt 1.537 0.0329 3.29%
Olean 1.498 0.0320 3.20%
Genesee 1.405 0.0300 3.00%
Scio 1.341 0.0287 2.87%
Busti 966 0.0207 2.07%
West Union 926 0.0198 1.98%
Otros 21.239 0.4541 45.41%
Total 46.767 1.0000 100.00%

Fuente: Oil, Gas & Other Regulated Wells: Beginning 1860.

5 Representación Gráfica

5.1 Gráfica N° 1 — Diagrama de Barras (Frecuencia Absoluta)

ggplot2::ggplot(tabla_plot, ggplot2::aes(Municipio, ni, fill=Municipio)) +
  ggplot2::geom_col(width=.72) +
  ggplot2::geom_text(ggplot2::aes(label=fmt_entero(ni)),vjust=-.4,size=3) +
  ggplot2::scale_fill_manual(values=colores) +
  ggplot2::scale_y_continuous(expand=ggplot2::expansion(mult=c(0,.14))) +
  ggplot2::labs(title="Gráfica N° 1: Frecuencia absoluta por municipio",x="Municipio",y="Frecuencia absoluta (nᵢ)") + tema_barras

5.2 Gráfica N° 2 — Diagrama de Barras (Porcentajes)

ggplot2::ggplot(tabla_plot, ggplot2::aes(Municipio, porcentaje, fill=Municipio)) +
  ggplot2::geom_col(width=.72) +
  ggplot2::geom_text(ggplot2::aes(label=sprintf("%.2f%%",porcentaje)),vjust=-.4,size=3) +
  ggplot2::scale_fill_manual(values=colores) +
  ggplot2::scale_y_continuous(expand=ggplot2::expansion(mult=c(0,.14))) +
  ggplot2::labs(title="Gráfica N° 2: Frecuencia porcentual por municipio",x="Municipio",y="Frecuencia relativa porcentual (%)") + tema_barras

5.3 Gráfica N° 3 — Gráfica Circular Porcentual

leyenda <- paste0(as.character(tabla_plot$Municipio), " — ", sprintf("%.2f%%",tabla_plot$porcentaje))
ggplot2::ggplot(tabla_plot,ggplot2::aes(x=1,y=ni,fill=Municipio)) +
  ggplot2::geom_col(width=1,color="white",linewidth=.35) +
  ggplot2::coord_polar(theta="y",start=0) +
  ggplot2::scale_fill_manual(values=colores,labels=leyenda) +
  ggplot2::labs(title="Gráfica N° 3: Distribución porcentual por municipio",fill="Municipio — porcentaje") +
  ggplot2::theme_void() + ggplot2::theme(plot.title=ggplot2::element_text(hjust=.5,face="bold"),legend.position="right")

6 Tabla de Indicadores

cat(crear_indicadores())
Cuadro N° 3: Indicadores estadísticos de Town (Municipio), Nueva York, 1860 - Actualidad
Variable
Tendencia central
Dispersión
Forma
Valores atípicos
VARIABLE ANALIZADA Media (X̄) Mediana (Me) Moda (Mo) Desviación estándar (Sd) Coeficiente de variación (CV %) Asimetría (As) Curtosis (K) Valores atípicos (Outliers)
Town (Municipio) N/A N/A Allegany N/A N/A N/A N/A N/A

N/A: No aplicable a una variable cualitativa nominal.

Registros válidos (N): 46.767   |   Categorías: 523   |   Frecuencia modal: 6.088   |   Porcentaje modal: 13.02%.

Fuente: Oil, Gas & Other Regulated Wells: Beginning 1860.

7 Conclusión

La variable Town (Municipio) es cualitativa nominal policotómica y presenta 523 categorías en 46.767 registros válidos. La moda corresponde a Allegany, con una frecuencia de 6.088 pozos (13.02% del total), lo que evidencia una concentración de los registros en determinados municipios del estado de Nueva York.

Autor: Jennifer Cordones | Análisis Estadístico — Oil, Gas & Other Regulated Wells - NY State