datos_originales <- readr::read_delim(ruta, delim=delimitador, trim_ws=TRUE, show_col_types=FALSE, name_repair="minimal")
## Carga exitosa: 47.501 registros.
# La limpieza es únicamente para el análisis: el archivo CSV no se modifica.
municipio_limpio <- datos_originales |>
dplyr::transmute(Municipio=stringr::str_squish(as.character(.data[[columna_municipio]]))) |>
dplyr::filter(!is.na(Municipio), Municipio != "",
!toupper(Municipio) %in% c("NA", "N/A", "NULL"))
N <- nrow(municipio_limpio)
if (N == 0L) stop("No se encontraron municipios válidos en TOWN.")
k_municipios <- dplyr::n_distinct(municipio_limpio$Municipio)
cat("Registros válidos:", fmt_entero(N),
" | Municipios distintos:", fmt_entero(k_municipios), "\n")
## Registros válidos: 46.884 | Municipios distintos: 523
| VARIABLE | TIPO | ESCALA DE MEDICIÓN | UNIDAD DE ANÁLISIS | CATEGORÍAS (k) | REGISTROS VÁLIDOS (N) |
|---|---|---|---|---|---|
| TOWN (Municipio) | Cualitativa nominal | Nominal | Pozo regulado | 523 | 46.884 |
El Cuadro N° 1 presenta la frecuencia absoluta (nᵢ), la frecuencia relativa (hᵢ) y el porcentaje de pozos regulados de cada uno de los 523 municipios, sobre un total de 46.884 registros válidos. 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, Nueva York, 1860 - 2026",
desplazamiento=TRUE))
| MUNICIPIO | FRECUENCIA ABSOLUTA (nᵢ) | FRECUENCIA RELATIVA (hᵢ) | FRECUENCIA RELATIVA PORCENTUAL (%) |
|---|---|---|---|
| Middleburg | 1 | 0.0000 | 0.00% |
| Collins | 415 | 0.0089 | 0.89% |
| Fort Ann | 1 | 0.0000 | 0.00% |
| Genesee | 1.405 | 0.0300 | 3.00% |
| Remsen | 1 | 0.0000 | 0.00% |
| Martinsburg | 1 | 0.0000 | 0.00% |
| New Albion | 28 | 0.0006 | 0.06% |
| Caroline | 1 | 0.0000 | 0.00% |
| Otselic | 2 | 0.0000 | 0.00% |
| Concord | 200 | 0.0043 | 0.43% |
| Royalton | 2 | 0.0000 | 0.00% |
| Queens | 12 | 0.0003 | 0.03% |
| McDonough | 6 | 0.0001 | 0.01% |
| Vernon | 3 | 0.0001 | 0.01% |
| Parish | 2 | 0.0000 | 0.00% |
| Alma | 3.637 | 0.0776 | 7.76% |
| Napoli | 8 | 0.0002 | 0.02% |
| Hounsfield | 1 | 0.0000 | 0.00% |
| Morris | 3 | 0.0001 | 0.01% |
| Barton | 8 | 0.0002 | 0.02% |
| Wethersfield | 6 | 0.0001 | 0.01% |
| Lebanon | 97 | 0.0021 | 0.21% |
| Villenova | 168 | 0.0036 | 0.36% |
| Bethany | 67 | 0.0014 | 0.14% |
| New Scotland | 1 | 0.0000 | 0.00% |
| Clarendon | 2 | 0.0000 | 0.00% |
| Lewis | 1 | 0.0000 | 0.00% |
| Niagara | 1 | 0.0000 | 0.00% |
| Gainesville | 81 | 0.0017 | 0.17% |
| Lafayette | 4 | 0.0001 | 0.01% |
| Holland | 66 | 0.0014 | 0.14% |
| Steuben | 1 | 0.0000 | 0.00% |
| Perry | 70 | 0.0015 | 0.15% |
| Ischua | 16 | 0.0003 | 0.03% |
| Dunkirk | 66 | 0.0014 | 0.14% |
| Guilderland | 16 | 0.0003 | 0.03% |
| Ontario | 1 | 0.0000 | 0.00% |
| Independence | 840 | 0.0179 | 1.79% |
| North Dansville | 6 | 0.0001 | 0.01% |
| Saugerties | 2 | 0.0000 | 0.00% |
| Sullivan | 2 | 0.0000 | 0.00% |
| Mount Morris | 4 | 0.0001 | 0.01% |
| Williamstown | 3 | 0.0001 | 0.01% |
| Clarkstown | 3 | 0.0001 | 0.01% |
| North Castle | 1 | 0.0000 | 0.00% |
| Irondequoit | 1 | 0.0000 | 0.00% |
| Farmington | 13 | 0.0003 | 0.03% |
| Camden | 17 | 0.0004 | 0.04% |
| Newfield | 9 | 0.0002 | 0.02% |
| Ovid | 2 | 0.0000 | 0.00% |
| Lodi | 3 | 0.0001 | 0.01% |
| East Bloomfield | 60 | 0.0013 | 0.13% |
| Riga | 21 | 0.0004 | 0.04% |
| Grand Island | 3 | 0.0001 | 0.01% |
| West Sparta | 22 | 0.0005 | 0.05% |
| West Bloomfield | 47 | 0.0010 | 0.10% |
| Schroeppel | 3 | 0.0001 | 0.01% |
| Solon | 3 | 0.0001 | 0.01% |
| Geneva City | 1 | 0.0000 | 0.00% |
| Cold Spring | 34 | 0.0007 | 0.07% |
| Clarksville | 368 | 0.0078 | 0.78% |
| Seneca Falls | 27 | 0.0006 | 0.06% |
| Saratoga | 1 | 0.0000 | 0.00% |
| Ballston | 1 | 0.0000 | 0.00% |
| Wirt | 1.539 | 0.0328 | 3.28% |
| Varick | 85 | 0.0018 | 0.18% |
| Cairo | 1 | 0.0000 | 0.00% |
| Hastings | 2 | 0.0000 | 0.00% |
| Phelps | 45 | 0.0010 | 0.10% |
| Throop | 20 | 0.0004 | 0.04% |
| Minden | 2 | 0.0000 | 0.00% |
| Alabama | 34 | 0.0007 | 0.07% |
| Wawarsing | 1 | 0.0000 | 0.00% |
| Lapeer | 1 | 0.0000 | 0.00% |
| Wellsville | 248 | 0.0053 | 0.53% |
| Pavilion | 119 | 0.0025 | 0.25% |
| Springport | 147 | 0.0031 | 0.31% |
| Olean City | 3 | 0.0001 | 0.01% |
| Camillus | 7 | 0.0001 | 0.01% |
| Plattsburgh Cit | 1 | 0.0000 | 0.00% |
| Wawayanda | 1 | 0.0000 | 0.00% |
| Geneva | 9 | 0.0002 | 0.02% |
| Madison | 4 | 0.0001 | 0.01% |
| Le Ray | 5 | 0.0001 | 0.01% |
| Van Buren | 28 | 0.0006 | 0.06% |
| Catlin | 25 | 0.0005 | 0.05% |
| Troupsburg | 32 | 0.0007 | 0.07% |
| Wheeler | 7 | 0.0001 | 0.01% |
| Conquest | 6 | 0.0001 | 0.01% |
| Mendon | 1 | 0.0000 | 0.00% |
| Elmira | 20 | 0.0004 | 0.04% |
| Cohocton | 9 | 0.0002 | 0.02% |
| Macedon | 3 | 0.0001 | 0.01% |
| Murray | 6 | 0.0001 | 0.01% |
| Triangle | 5 | 0.0001 | 0.01% |
| Cato | 19 | 0.0004 | 0.04% |
| Wayland | 2 | 0.0000 | 0.00% |
| Owego | 57 | 0.0012 | 0.12% |
| Sardinia | 60 | 0.0013 | 0.13% |
| Unadilla | 1 | 0.0000 | 0.00% |
| Baldwin | 8 | 0.0002 | 0.02% |
| Rush | 1 | 0.0000 | 0.00% |
| Sidney | 1 | 0.0000 | 0.00% |
| Chili | 1 | 0.0000 | 0.00% |
| Fairfield | 4 | 0.0001 | 0.01% |
| Yorkshire | 34 | 0.0007 | 0.07% |
| Dayton | 117 | 0.0025 | 0.25% |
| Constantia | 1 | 0.0000 | 0.00% |
| Mt Vernon | 1 | 0.0000 | 0.00% |
| Barre | 3 | 0.0001 | 0.01% |
| Lysander | 46 | 0.0010 | 0.10% |
| Colden | 162 | 0.0035 | 0.35% |
| Avon | 37 | 0.0008 | 0.08% |
| Tyre | 11 | 0.0002 | 0.02% |
| Barrington | 47 | 0.0010 | 0.10% |
| Greenfield | 1 | 0.0000 | 0.00% |
| Westfield | 338 | 0.0072 | 0.72% |
| Ellery | 226 | 0.0048 | 0.48% |
| Buffalo | 30 | 0.0006 | 0.06% |
| Nelson | 1 | 0.0000 | 0.00% |
| Mayfield | 1 | 0.0000 | 0.00% |
| Harford | 5 | 0.0001 | 0.01% |
| North Hempstead | 2 | 0.0000 | 0.00% |
| Centerville | 3 | 0.0001 | 0.01% |
| Almond | 8 | 0.0002 | 0.02% |
| York | 93 | 0.0020 | 0.20% |
| Sheridan | 374 | 0.0080 | 0.80% |
| Lyndon | 5 | 0.0001 | 0.01% |
| Mina | 100 | 0.0021 | 0.21% |
| Croghan | 1 | 0.0000 | 0.00% |
| Fremont | 3 | 0.0001 | 0.01% |
| Hornellsville | 19 | 0.0004 | 0.04% |
| Oxford | 6 | 0.0001 | 0.01% |
| Mount Hope | 1 | 0.0000 | 0.00% |
| Hornell | 1 | 0.0000 | 0.00% |
| Ira | 2 | 0.0000 | 0.00% |
| Oakfield | 15 | 0.0003 | 0.03% |
| Guilford | 3 | 0.0001 | 0.01% |
| Chemung | 10 | 0.0002 | 0.02% |
| New Hudson | 10 | 0.0002 | 0.02% |
| Ossian | 5 | 0.0001 | 0.01% |
| Amherst | 48 | 0.0010 | 0.10% |
| Homer | 3 | 0.0001 | 0.01% |
| Genoa | 10 | 0.0002 | 0.02% |
| Wolcott | 1 | 0.0000 | 0.00% |
| Belfast | 14 | 0.0003 | 0.03% |
| Orange | 32 | 0.0007 | 0.07% |
| Gaines | 3 | 0.0001 | 0.01% |
| Cherry Valley | 4 | 0.0001 | 0.01% |
| Rome | 22 | 0.0005 | 0.05% |
| Orangeville | 8 | 0.0002 | 0.02% |
| Addison | 5 | 0.0001 | 0.01% |
| Smyrna | 97 | 0.0021 | 0.21% |
| Nichols | 25 | 0.0005 | 0.05% |
| Woodhull | 69 | 0.0015 | 0.15% |
| Bristol | 59 | 0.0013 | 0.13% |
| Florence | 5 | 0.0001 | 0.01% |
| German Flatts | 3 | 0.0001 | 0.01% |
| North Collins | 309 | 0.0066 | 0.66% |
| Westmoreland | 1 | 0.0000 | 0.00% |
| Angelica | 14 | 0.0003 | 0.03% |
| Taylor | 2 | 0.0000 | 0.00% |
| Thurston | 11 | 0.0002 | 0.02% |
| Horseheads | 7 | 0.0001 | 0.01% |
| Queensbury | 1 | 0.0000 | 0.00% |
| Palatine | 1 | 0.0000 | 0.00% |
| Enfield | 7 | 0.0001 | 0.01% |
| Jasper | 50 | 0.0011 | 0.11% |
| Ashland | 2 | 0.0000 | 0.00% |
| Prattsburg | 20 | 0.0004 | 0.04% |
| Shandaken | 4 | 0.0001 | 0.01% |
| Marcy | 1 | 0.0000 | 0.00% |
| Denmark | 1 | 0.0000 | 0.00% |
| Lyons | 2 | 0.0000 | 0.00% |
| Italy | 11 | 0.0002 | 0.02% |
| Cambria | 5 | 0.0001 | 0.01% |
| Butler | 11 | 0.0002 | 0.02% |
| Leicester | 141 | 0.0030 | 0.30% |
| Watertown City | 2 | 0.0000 | 0.00% |
| Harrisburg | 5 | 0.0001 | 0.01% |
| Amity | 277 | 0.0059 | 0.59% |
| Lancaster | 185 | 0.0039 | 0.39% |
| Ossining | 3 | 0.0001 | 0.01% |
| Milton | 1 | 0.0000 | 0.00% |
| Bronx | 20 | 0.0004 | 0.04% |
| Rockland | 1 | 0.0000 | 0.00% |
| Maryland | 4 | 0.0001 | 0.01% |
| Arcade | 69 | 0.0015 | 0.15% |
| Marilla | 100 | 0.0021 | 0.21% |
| Otto | 101 | 0.0022 | 0.22% |
| Groton | 18 | 0.0004 | 0.04% |
| Rochester | 2 | 0.0000 | 0.00% |
| Rathbone | 38 | 0.0008 | 0.08% |
| Van Etten | 27 | 0.0006 | 0.06% |
| Covert | 2 | 0.0000 | 0.00% |
| Great Valley | 7 | 0.0001 | 0.01% |
| Veteran | 28 | 0.0006 | 0.06% |
| Sennett | 9 | 0.0002 | 0.02% |
| Olean | 1.498 | 0.0320 | 3.20% |
| Deruyter | 2 | 0.0000 | 0.00% |
| Boonville | 1 | 0.0000 | 0.00% |
| Busti | 966 | 0.0206 | 2.06% |
| Little Valley | 8 | 0.0002 | 0.02% |
| Montour | 3 | 0.0001 | 0.01% |
| Orchard Park | 115 | 0.0025 | 0.25% |
| Palermo | 2 | 0.0000 | 0.00% |
| Henrietta | 1 | 0.0000 | 0.00% |
| Eagle | 4 | 0.0001 | 0.01% |
| Attica | 24 | 0.0005 | 0.05% |
| Binghamton | 1 | 0.0000 | 0.00% |
| Manhattan | 213 | 0.0045 | 0.45% |
| Wayne | 30 | 0.0006 | 0.06% |
| Hanover | 396 | 0.0084 | 0.84% |
| West Monroe | 1 | 0.0000 | 0.00% |
| Groveland | 28 | 0.0006 | 0.06% |
| Nanticoke | 1 | 0.0000 | 0.00% |
| Marcellus | 16 | 0.0003 | 0.03% |
| Maine | 4 | 0.0001 | 0.01% |
| Summerhill | 1 | 0.0000 | 0.00% |
| Ellicott | 101 | 0.0022 | 0.22% |
| Tuscarora | 30 | 0.0006 | 0.06% |
| Scipio | 13 | 0.0003 | 0.03% |
| Colesville | 13 | 0.0003 | 0.03% |
| Smithfield | 1 | 0.0000 | 0.00% |
| Deposit | 2 | 0.0000 | 0.00% |
| Bradford | 14 | 0.0003 | 0.03% |
| Granger | 11 | 0.0002 | 0.02% |
| South Valley | 5 | 0.0001 | 0.01% |
| Darien | 304 | 0.0065 | 0.65% |
| Glen | 2 | 0.0000 | 0.00% |
| Little Falls | 2 | 0.0000 | 0.00% |
| Stockton | 170 | 0.0036 | 0.36% |
| Windham | 1 | 0.0000 | 0.00% |
| Florida | 1 | 0.0000 | 0.00% |
| Western | 3 | 0.0001 | 0.01% |
| Waterloo | 26 | 0.0006 | 0.06% |
| Ellington | 199 | 0.0042 | 0.42% |
| Verona | 4 | 0.0001 | 0.01% |
| Elma | 103 | 0.0022 | 0.22% |
| Alfred | 23 | 0.0005 | 0.05% |
| Brant | 234 | 0.0050 | 0.50% |
| Potter | 11 | 0.0002 | 0.02% |
| Onondaga | 5 | 0.0001 | 0.01% |
| Benton | 21 | 0.0004 | 0.04% |
| Kirkwood | 11 | 0.0002 | 0.02% |
| Pomfret | 284 | 0.0061 | 0.61% |
| North Tonawanda | 1 | 0.0000 | 0.00% |
| West Turin | 1 | 0.0000 | 0.00% |
| Junius | 25 | 0.0005 | 0.05% |
| Sheldon | 83 | 0.0018 | 0.18% |
| Elmira City | 9 | 0.0002 | 0.02% |
| Tonawanda | 48 | 0.0010 | 0.10% |
| Hamden | 1 | 0.0000 | 0.00% |
| Knox | 1 | 0.0000 | 0.00% |
| Horicon | 1 | 0.0000 | 0.00% |
| Arcadia | 1 | 0.0000 | 0.00% |
| Portville | 28 | 0.0006 | 0.06% |
| Johnstown | 1 | 0.0000 | 0.00% |
| Candor | 16 | 0.0003 | 0.03% |
| Erwin | 28 | 0.0006 | 0.06% |
| Randolph | 107 | 0.0023 | 0.23% |
| Carroll | 116 | 0.0025 | 0.25% |
| Newstead | 104 | 0.0022 | 0.22% |
| Byron | 11 | 0.0002 | 0.02% |
| Charlotte | 178 | 0.0038 | 0.38% |
| Jamestown | 5 | 0.0001 | 0.01% |
| Hartsville | 29 | 0.0006 | 0.06% |
| Urbana | 12 | 0.0003 | 0.03% |
| Greene | 2 | 0.0000 | 0.00% |
| Scott | 2 | 0.0000 | 0.00% |
| Roxbury | 2 | 0.0000 | 0.00% |
| Starkey | 13 | 0.0003 | 0.03% |
| Big Flats | 17 | 0.0004 | 0.04% |
| Shelby | 2 | 0.0000 | 0.00% |
| Delhi | 1 | 0.0000 | 0.00% |
| Mexico | 2 | 0.0000 | 0.00% |
| Southport | 34 | 0.0007 | 0.07% |
| Otsego | 1 | 0.0000 | 0.00% |
| Franklin | 5 | 0.0001 | 0.01% |
| Cayuta | 3 | 0.0001 | 0.01% |
| Cincinnatus | 1 | 0.0000 | 0.00% |
| Burlington | 1 | 0.0000 | 0.00% |
| Aurora | 142 | 0.0030 | 0.30% |
| Worcester | 1 | 0.0000 | 0.00% |
| Fleming | 50 | 0.0011 | 0.11% |
| Glen Cove | 2 | 0.0000 | 0.00% |
| Thompson | 2 | 0.0000 | 0.00% |
| Albion | 2 | 0.0000 | 0.00% |
| Howard | 29 | 0.0006 | 0.06% |
| Tully | 175 | 0.0037 | 0.37% |
| Tioga | 7 | 0.0001 | 0.01% |
| Sweden | 2 | 0.0000 | 0.00% |
| Rushford | 7 | 0.0001 | 0.01% |
| Clymer | 193 | 0.0041 | 0.41% |
| Otisco | 3 | 0.0001 | 0.01% |
| Chenango | 1 | 0.0000 | 0.00% |
| Poland | 207 | 0.0044 | 0.44% |
| Carlton | 3 | 0.0001 | 0.01% |
| Avoca | 19 | 0.0004 | 0.04% |
| Vestal | 1 | 0.0000 | 0.00% |
| Harrison | 2 | 0.0000 | 0.00% |
| Fenton | 17 | 0.0004 | 0.04% |
| Torrey | 5 | 0.0001 | 0.01% |
| Plattekill | 1 | 0.0000 | 0.00% |
| Brutus | 3 | 0.0001 | 0.01% |
| Eden | 213 | 0.0045 | 0.45% |
| Montezuma | 3 | 0.0001 | 0.01% |
| Bergen | 3 | 0.0001 | 0.01% |
| German | 4 | 0.0001 | 0.01% |
| Niagara Falls | 1 | 0.0000 | 0.00% |
| Winfield | 2 | 0.0000 | 0.00% |
| Mount Pleasant | 9 | 0.0002 | 0.02% |
| Aurelius | 174 | 0.0037 | 0.37% |
| Scriba | 2 | 0.0000 | 0.00% |
| Castile | 23 | 0.0005 | 0.05% |
| Stockbridge | 2 | 0.0000 | 0.00% |
| Alexander | 58 | 0.0012 | 0.12% |
| Batavia | 67 | 0.0014 | 0.14% |
| Trenton | 2 | 0.0000 | 0.00% |
| Cuba | 16 | 0.0003 | 0.03% |
| Staten Island | 2 | 0.0000 | 0.00% |
| Lima | 7 | 0.0001 | 0.01% |
| Utica | 2 | 0.0000 | 0.00% |
| Orangetown | 4 | 0.0001 | 0.01% |
| Evans | 175 | 0.0037 | 0.37% |
| Lenox | 1 | 0.0000 | 0.00% |
| Fayette | 274 | 0.0058 | 0.58% |
| Arkwright | 198 | 0.0042 | 0.42% |
| New Rochelle | 7 | 0.0001 | 0.01% |
| Boston | 194 | 0.0041 | 0.41% |
| Burns | 2 | 0.0000 | 0.00% |
| Kendall | 3 | 0.0001 | 0.01% |
| Danby | 9 | 0.0002 | 0.02% |
| Carlisle | 1 | 0.0000 | 0.00% |
| Adams | 3 | 0.0001 | 0.01% |
| Allegany | 6.118 | 0.1305 | 13.05% |
| Farmersville | 29 | 0.0006 | 0.06% |
| Broadalbin | 1 | 0.0000 | 0.00% |
| Freedom | 22 | 0.0005 | 0.05% |
| Victor | 1 | 0.0000 | 0.00% |
| Willing | 236 | 0.0050 | 0.50% |
| Cameron | 24 | 0.0005 | 0.05% |
| Root | 3 | 0.0001 | 0.01% |
| Syracuse City | 1 | 0.0000 | 0.00% |
| Genesee Falls | 3 | 0.0001 | 0.01% |
| Scarsdale | 2 | 0.0000 | 0.00% |
| Columbus | 1 | 0.0000 | 0.00% |
| Ulysses | 6 | 0.0001 | 0.01% |
| Conesus | 3 | 0.0001 | 0.01% |
| Hume | 13 | 0.0003 | 0.03% |
| Carrollton | 2.731 | 0.0583 | 5.83% |
| Locke | 2 | 0.0000 | 0.00% |
| Middlesex | 15 | 0.0003 | 0.03% |
| Hartwick | 1 | 0.0000 | 0.00% |
| Allen | 29 | 0.0006 | 0.06% |
| Hamlin | 2 | 0.0000 | 0.00% |
| Elba | 9 | 0.0002 | 0.02% |
| South Bristol | 3 | 0.0001 | 0.01% |
| Brownville | 1 | 0.0000 | 0.00% |
| Caledonia | 70 | 0.0015 | 0.15% |
| Nunda | 4 | 0.0001 | 0.01% |
| Lisle | 1 | 0.0000 | 0.00% |
| Eaton | 16 | 0.0003 | 0.03% |
| Yonkers | 13 | 0.0003 | 0.03% |
| Java | 39 | 0.0008 | 0.08% |
| Birdsall | 3 | 0.0001 | 0.01% |
| Stark | 1 | 0.0000 | 0.00% |
| Canisteo | 40 | 0.0009 | 0.09% |
| Reading | 162 | 0.0035 | 0.35% |
| Conewango | 94 | 0.0020 | 0.20% |
| Hartford | 1 | 0.0000 | 0.00% |
| Bolivar | 5.458 | 0.1164 | 11.64% |
| Somerset | 1 | 0.0000 | 0.00% |
| Bainbridge | 1 | 0.0000 | 0.00% |
| Tonawanda City | 30 | 0.0006 | 0.06% |
| Union | 2 | 0.0000 | 0.00% |
| Cortlandville | 6 | 0.0001 | 0.01% |
| Sparta | 2 | 0.0000 | 0.00% |
| Ledyard | 9 | 0.0002 | 0.02% |
| Lewiston | 2 | 0.0000 | 0.00% |
| Naples | 21 | 0.0004 | 0.04% |
| Ithaca | 6 | 0.0001 | 0.01% |
| Sempronius | 2 | 0.0000 | 0.00% |
| Warsaw | 12 | 0.0003 | 0.03% |
| Ephratah | 1 | 0.0000 | 0.00% |
| Newfane | 2 | 0.0000 | 0.00% |
| Pembroke | 156 | 0.0033 | 0.33% |
| West Almond | 1 | 0.0000 | 0.00% |
| Smithville | 23 | 0.0005 | 0.05% |
| Gerry | 242 | 0.0052 | 0.52% |
| Romulus | 1 | 0.0000 | 0.00% |
| Ellicottville | 63 | 0.0013 | 0.13% |
| Pendleton | 1 | 0.0000 | 0.00% |
| Elbridge | 7 | 0.0001 | 0.01% |
| Sandy Creek | 69 | 0.0015 | 0.15% |
| Milo | 25 | 0.0005 | 0.05% |
| Machias | 4 | 0.0001 | 0.01% |
| Victory | 2 | 0.0000 | 0.00% |
| Dansville | 10 | 0.0002 | 0.02% |
| Sanford | 8 | 0.0002 | 0.02% |
| White Plains | 2 | 0.0000 | 0.00% |
| French Creek | 113 | 0.0024 | 0.24% |
| Galen | 19 | 0.0004 | 0.04% |
| Covington | 86 | 0.0018 | 0.18% |
| Ward | 57 | 0.0012 | 0.12% |
| North Harmony | 269 | 0.0057 | 0.57% |
| Dix | 63 | 0.0013 | 0.13% |
| Middletown | 1 | 0.0000 | 0.00% |
| Bennington | 193 | 0.0041 | 0.41% |
| Oswego | 1 | 0.0000 | 0.00% |
| Afton | 7 | 0.0001 | 0.01% |
| Richmond | 32 | 0.0007 | 0.07% |
| Portland | 203 | 0.0043 | 0.43% |
| Newburgh | 16 | 0.0003 | 0.03% |
| Binghamton City | 1 | 0.0000 | 0.00% |
| Whitestown | 1 | 0.0000 | 0.00% |
| Portage | 3 | 0.0001 | 0.01% |
| Canandaigua | 7 | 0.0001 | 0.01% |
| West Seneca | 41 | 0.0009 | 0.09% |
| Sangerfield | 8 | 0.0002 | 0.02% |
| Canandaigua City | 5 | 0.0001 | 0.01% |
| Sherman | 134 | 0.0029 | 0.29% |
| Lansing | 44 | 0.0009 | 0.09% |
| Hector | 26 | 0.0006 | 0.06% |
| Owasco | 4 | 0.0001 | 0.01% |
| Virgil | 5 | 0.0001 | 0.01% |
| Hardenburgh | 1 | 0.0000 | 0.00% |
| Livonia | 22 | 0.0005 | 0.05% |
| Wales | 146 | 0.0031 | 0.31% |
| Kiantone | 114 | 0.0024 | 0.24% |
| Ticonderoga | 3 | 0.0001 | 0.01% |
| Greenburgh | 21 | 0.0004 | 0.04% |
| Georgetown | 2 | 0.0000 | 0.00% |
| Red House | 181 | 0.0039 | 0.39% |
| Mentz | 1 | 0.0000 | 0.00% |
| Pulteney | 28 | 0.0006 | 0.06% |
| Hancock | 26 | 0.0006 | 0.06% |
| Middlebury | 443 | 0.0094 | 0.94% |
| Leon | 166 | 0.0035 | 0.35% |
| Alden | 171 | 0.0036 | 0.36% |
| Easton | 1 | 0.0000 | 0.00% |
| East Otto | 40 | 0.0009 | 0.09% |
| Pompey | 1 | 0.0000 | 0.00% |
| Humphrey | 17 | 0.0004 | 0.04% |
| Wappinger | 10 | 0.0002 | 0.02% |
| Pittsfield | 1 | 0.0000 | 0.00% |
| Seneca | 16 | 0.0003 | 0.03% |
| Preston | 13 | 0.0003 | 0.03% |
| Franklinville | 3 | 0.0001 | 0.01% |
| Persia | 166 | 0.0035 | 0.35% |
| Lackawanna | 11 | 0.0002 | 0.02% |
| Scio | 1.341 | 0.0286 | 2.86% |
| Auburn City | 3 | 0.0001 | 0.01% |
| Cherry Creek | 158 | 0.0034 | 0.34% |
| Herkimer | 1 | 0.0000 | 0.00% |
| Stafford | 15 | 0.0003 | 0.03% |
| Caton | 24 | 0.0005 | 0.05% |
| Friendship | 17 | 0.0004 | 0.04% |
| Deerpark | 3 | 0.0001 | 0.01% |
| Glenville | 1 | 0.0000 | 0.00% |
| Campbell | 18 | 0.0004 | 0.04% |
| Manchester | 1 | 0.0000 | 0.00% |
| Erin | 47 | 0.0010 | 0.10% |
| Le Roy | 22 | 0.0005 | 0.05% |
| Laurens | 1 | 0.0000 | 0.00% |
| Mansfield | 4 | 0.0001 | 0.01% |
| Springfield | 2 | 0.0000 | 0.00% |
| Corning | 24 | 0.0005 | 0.05% |
| Cheektowaga | 38 | 0.0008 | 0.08% |
| Rodman | 1 | 0.0000 | 0.00% |
| Galway | 1 | 0.0000 | 0.00% |
| Warren | 1 | 0.0000 | 0.00% |
| Gorham | 24 | 0.0005 | 0.05% |
| Redfield | 1 | 0.0000 | 0.00% |
| Harmony | 198 | 0.0042 | 0.42% |
| Caneadea | 14 | 0.0003 | 0.03% |
| Ripley | 233 | 0.0050 | 0.50% |
| Albany | 1 | 0.0000 | 0.00% |
| Freetown | 2 | 0.0000 | 0.00% |
| Dunkirk City | 11 | 0.0002 | 0.02% |
| Ridgeway | 1 | 0.0000 | 0.00% |
| Barker | 2 | 0.0000 | 0.00% |
| Brighton | 1 | 0.0000 | 0.00% |
| Orwell | 1 | 0.0000 | 0.00% |
| Hopewell | 4 | 0.0001 | 0.01% |
| Yates | 5 | 0.0001 | 0.01% |
| Volney | 20 | 0.0004 | 0.04% |
| Catharine | 6 | 0.0001 | 0.01% |
| Jefferson | 2 | 0.0000 | 0.00% |
| Coventry | 15 | 0.0003 | 0.03% |
| Greenwood | 395 | 0.0084 | 0.84% |
| Hinsdale | 39 | 0.0008 | 0.08% |
| Grove | 3 | 0.0001 | 0.01% |
| Perrysburg | 272 | 0.0058 | 0.58% |
| Richland | 102 | 0.0022 | 0.22% |
| Dryden | 10 | 0.0002 | 0.02% |
| Andover | 857 | 0.0183 | 1.83% |
| West Union | 928 | 0.0198 | 1.98% |
| Pike | 3 | 0.0001 | 0.01% |
| Pinckney | 1 | 0.0000 | 0.00% |
| Bath | 73 | 0.0016 | 0.16% |
| Ogdensburg | 1 | 0.0000 | 0.00% |
| Hamburg | 142 | 0.0030 | 0.30% |
| Spafford | 1 | 0.0000 | 0.00% |
| Fenner | 1 | 0.0000 | 0.00% |
| Plymouth | 20 | 0.0004 | 0.04% |
| Salina | 1 | 0.0000 | 0.00% |
| Brookfield | 15 | 0.0003 | 0.03% |
| Jerusalem | 13 | 0.0003 | 0.03% |
| Chautauqua | 407 | 0.0087 | 0.87% |
| Granby | 1 | 0.0000 | 0.00% |
| Johnstown City | 1 | 0.0000 | 0.00% |
| Geneseo | 10 | 0.0002 | 0.02% |
| Catskill | 1 | 0.0000 | 0.00% |
| Venice | 11 | 0.0002 | 0.02% |
| Hornby | 39 | 0.0008 | 0.08% |
| Lindley | 9 | 0.0002 | 0.02% |
| Norwich | 1 | 0.0000 | 0.00% |
| Ashford | 40 | 0.0009 | 0.09% |
| Tyrone | 145 | 0.0031 | 0.31% |
| Princetown | 1 | 0.0000 | 0.00% |
| Spencer | 12 | 0.0003 | 0.03% |
| Clarence | 19 | 0.0004 | 0.04% |
| TOTAL GENERAL | 46.884 | 1.0000 | 100.00% |
Fuente: Oil, Gas & Other Regulated Wells: Beginning 1860.
Interpretación: el municipio con mayor frecuencia es Allegany, con 6.118 pozos (13.05% del total). La frecuencia mínima es de 1 pozo(s) y corresponde a 115 municipio(s).
La tabla resume los 10 municipios más frecuentes y, si existen más de diez categorías, agrupa los restantes en Otros municipios. Se conserva el total de 46.884 registros válidos. Los municipios principales concentran el 54.65% de los pozos.
cat(crear_cuadro(tabla_resumen, 2,
"Distribución de frecuencias de los pozos regulados: municipios más frecuentes y otros, Nueva York, 1860 - 2026"))
| MUNICIPIO | FRECUENCIA ABSOLUTA (nᵢ) | FRECUENCIA RELATIVA (hᵢ) | FRECUENCIA RELATIVA PORCENTUAL (%) |
|---|---|---|---|
| Allegany | 6.118 | 0.1305 | 13.05% |
| Bolivar | 5.458 | 0.1164 | 11.64% |
| Alma | 3.637 | 0.0776 | 7.76% |
| Carrollton | 2.731 | 0.0583 | 5.83% |
| Wirt | 1.539 | 0.0328 | 3.28% |
| Olean | 1.498 | 0.0320 | 3.20% |
| Genesee | 1.405 | 0.0300 | 3.00% |
| Scio | 1.341 | 0.0286 | 2.86% |
| Busti | 966 | 0.0206 | 2.06% |
| West Union | 928 | 0.0198 | 1.98% |
| Otros municipios | 21.263 | 0.4535 | 45.35% |
| TOTAL GENERAL | 46.884 | 1.0000 | 100.00% |
Fuente: Oil, Gas & Other Regulated Wells: Beginning 1860.
ggplot2::ggplot(tabla_local, ggplot2::aes(x=Municipio,y=ni,fill=Municipio)) +
ggplot2::geom_col(width=.72,color="#244861",linewidth=.36) +
ggplot2::geom_text(ggplot2::aes(label=fmt_entero(ni)),vjust=-.48,
size=4.5,fontface="bold",color="#15364C") +
ggplot2::scale_fill_manual(values=colores) +
escala_municipios +
ggplot2::scale_y_continuous(limits=c(0,limite_ni_local),
labels=fmt_entero,
expand=ggplot2::expansion(mult=c(0,0))) +
ggplot2::labs(title="Gráfica N° 1: Frecuencia absoluta (nᵢ) local",
x="Municipio",y="Frecuencia absoluta (nᵢ)",caption=fuente_graficas) +
tema_barras
ggplot2::ggplot(tabla_global, ggplot2::aes(x=Municipio,y=ni)) +
ggplot2::geom_col(fill="#286492",color="#244861",width=.72,linewidth=.36) +
ggplot2::geom_text(ggplot2::aes(label=fmt_entero(ni)),vjust=-.48,
size=4.5,fontface="bold",color="#15364C") +
escala_municipios +
ggplot2::scale_y_continuous(limits=c(0,limite_ni_global),
labels=fmt_entero,
expand=ggplot2::expansion(mult=c(0,0))) +
ggplot2::labs(title="Gráfica N° 2: Frecuencia absoluta (nᵢ) global",
x="Municipio",y="Frecuencia absoluta (nᵢ)",caption=fuente_graficas) +
tema_barras
ggplot2::ggplot(tabla_local, ggplot2::aes(x=Municipio,y=hi,fill=Municipio)) +
ggplot2::geom_col(width=.72,color="#244861",linewidth=.36) +
ggplot2::geom_text(ggplot2::aes(label=sprintf("%.2f%%",100*hi)),vjust=-.48,
size=4.3,fontface="bold",color="#15364C") +
ggplot2::scale_fill_manual(values=colores) +
escala_municipios +
ggplot2::scale_y_continuous(limits=c(0,limite_hi_local),labels=etiqueta_pct,
expand=ggplot2::expansion(mult=c(0,0))) +
ggplot2::labs(title="Gráfica N° 3: Frecuencia relativa (hᵢ) local",
x="Municipio",y="Frecuencia relativa (%)",caption=fuente_graficas) +
tema_barras
ggplot2::ggplot(tabla_global, ggplot2::aes(x=Municipio,y=hi)) +
ggplot2::geom_col(fill="#286492",color="#244861",width=.72,linewidth=.36) +
ggplot2::geom_text(ggplot2::aes(label=sprintf("%.2f%%",100*hi)),vjust=-.48,
size=4.3,fontface="bold",color="#15364C") +
escala_municipios +
ggplot2::scale_y_continuous(limits=c(0,limite_hi_global),
breaks=seq(0,1,by=.2),labels=etiqueta_pct,
expand=ggplot2::expansion(mult=c(0,0))) +
ggplot2::labs(title="Gráfica N° 4: Frecuencia relativa (hᵢ) global",
x="Municipio",y="Frecuencia relativa (%)",caption=fuente_graficas) +
tema_barras
leyenda <- paste0(stringr::str_wrap(as.character(tabla_local$Municipio),width=23),
" — ",sprintf("%.2f%%",tabla_local$porcentaje))
ggplot2::ggplot(tabla_local,ggplot2::aes(x=1,y=ni,fill=Municipio)) +
ggplot2::geom_col(width=1,color="#244861",linewidth=.48) +
ggplot2::coord_polar(theta="y",start=0) +
ggplot2::scale_fill_manual(values=colores,labels=leyenda) +
ggplot2::labs(title="Gráfica N° 5: Distribución porcentual según el municipio",
fill="Municipio — porcentaje",caption=fuente_graficas) +
ggplot2::theme_void(base_size=15) +
ggplot2::theme(
plot.title=ggplot2::element_text(hjust=.5,face="bold",size=17,color="#15364C"),
plot.subtitle=ggplot2::element_text(hjust=.5,size=12,color="#49657A",
margin=ggplot2::margin(t=7,b=12)),
legend.position="right",
legend.title=ggplot2::element_text(face="bold",size=13,color="#15364C"),
legend.text=ggplot2::element_text(size=12,color="#253B4B",lineheight=1.05),
legend.key.size=grid::unit(.56,"cm"),
plot.caption=ggplot2::element_text(hjust=0,face="italic",size=10.5,
color="#546775",margin=ggplot2::margin(t=14)),
plot.margin=ggplot2::margin(18,30,25,24)
)
cat(crear_indicadores())
| 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.884 | Categorías: 523 | Frecuencia modal: 6.118 | Porcentaje modal: 13.05%.
Fuente: Oil, Gas & Other Regulated Wells: Beginning 1860.
La variable TOWN (Municipio) es cualitativa nominal y presenta 523 categorías en 46.884 registros válidos. La moda corresponde a Allegany, con una frecuencia de 6.118 pozos (13.05% 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