library(dplyr)
library(readxl)
library(gt)
datos <- read_excel("dataset_mundial_petro.xlsx")
Variable <- datos$Country
str(datos)
## tibble [8,334 × 23] (S3: tbl_df/tbl/data.frame)
## $ Unit ID : chr [1:8334] "OG0000001" "OG0000002" "OG0000006" "OG0000007" ...
## $ Unit Name : chr [1:8334] "Matzen" "Abalone" "Aguilhada" "Agulha" ...
## $ Unit name local script : chr [1:8334] NA "Abalone" "Aguilhada" "Agulha" ...
## $ Fuel type : chr [1:8334] "oil and gas" "oil and gas" "oil and gas" "oil and gas" ...
## $ Unit type : chr [1:8334] "field" "field" "field" "field" ...
## $ Country : chr [1:8334] "Austria" "Brazil" "Brazil" "Brazil" ...
## $ Subnational unit (province, state): chr [1:8334] NA "Espírito Santo" "Sergipe" "Rio Grande do Norte" ...
## $ Latitude : num [1:8334] 48.4 -21.4 -10.7 -4.9 -22.1 ...
## $ Longitude : num [1:8334] 16.7 -39.6 -36.9 -36.3 -40 ...
## $ Location accuracy : chr [1:8334] "approximate" "exact" "exact" "exact" ...
## $ Status : chr [1:8334] "operating" "operating" "operating" "operating" ...
## $ Status year : num [1:8334] 2023 2022 2022 2022 2022 ...
## $ Discovery year : num [1:8334] 1949 2001 1966 1975 1984 ...
## $ FID Year : chr [1:8334] NA NA NA NA ...
## $ Production start year : chr [1:8334] "1951" "2009" "1969" "1979" ...
## $ Operator : chr [1:8334] "OMV" "Shell Brasil Petróleo Ltda." NA NA ...
## $ Owner : chr [1:8334] "OMV (100%)" "Shell Brasil (50%);ONGC Campos (27%);Qatarenergy (23%)" "Petrobras (100%)" "Petrobras (100%)" ...
## $ Parent : chr [1:8334] "OMV Aktiengesellschaft (100%)" "Shell plc (50%);Oil and Natural Gas Corporation (ONGC) (27%)" "Petróleo Brasileiro S.A. (100%)" "Petróleo Brasileiro S.A. (100%)" ...
## $ Basin : chr [1:8334] NA NA NA NA ...
## $ Concession / block : chr [1:8334] NA NA NA NA ...
## $ Project or complex : chr [1:8334] "Matzen" NA NA NA ...
## $ Government unit ID : chr [1:8334] NA NA NA NA ...
## $ Wiki URL : chr [1:8334] "https://www.gem.wiki/Matzen_Oil_and_Gas_Field_(Austria)" "https://www.gem.wiki/Abalone_Oil_and_Gas_Field_%28Esp%C3%ADrito_Santo%2C_Brazil%29" "https://www.gem.wiki/Aguilhada_Oil_and_Gas_Field_%28Sergipe%2C_Brazil%29" "https://www.gem.wiki/Agulha_Oil_and_Gas_Field_%28Rio_Grande_do_Norte%2C_Brazil%29" ...
Se extrajo la variable Country del dataset, la cual registra el país donde se encuentra ubicado cada yacimiento de extracción de petróleo y gas. El dataset contiene un total de 8,334 observaciones distribuidas en 104 países a nivel mundial.
Variable <- datos$Country
Se calculó la distribución de frecuencias absolutas (\(n_i\)) y relativas (\(h_i\)). Los resultados muestran que Estados Unidos concentra la mayor cantidad de yacimientos con el 37.11%, seguido de Canadá con el 14.13%, lo que evidencia una fuerte concentración en América del Norte.
Tabla <- as.data.frame(table(Variable))
colnames(Tabla) <- c("País", "ni")
Tabla$"País" <- as.character(Tabla$"País")
Tabla$`hi (%)` <- round((Tabla$ni / sum(Tabla$ni)) * 100, 2)
fila_total <- tibble(
`País` = "TOTAL",
ni = sum(Tabla$ni),
`hi (%)` = 100.00
)
tabla_Final <- bind_rows(Tabla, fila_total)
tabla_gt <- tabla_Final %>%
gt() %>%
tab_header(
title = md("**Tabla N°7.1 de Distribución de Frecuencias por País de los Yacimientos de Petróleo y Gas**")
) %>%
tab_source_note(
source_note = "Autor: Grupo 5"
) %>%
cols_label(
`País` = "País",
ni = "Frecuencia (ni)",
`hi (%)` = "Porcentaje (hi%)"
) %>%
fmt_number(
columns = `hi (%)`,
decimals = 2
) %>%
tab_options(
heading.title.font.size = px(16),
column_labels.background.color = "#F0F0F0"
)
tabla_gt
| Tabla N°7.1 de Distribución de Frecuencias por País de los Yacimientos de Petróleo y Gas | ||
| País | Frecuencia (ni) | Porcentaje (hi%) |
|---|---|---|
| Albania | 1 | 0.01 |
| Algeria | 58 | 0.70 |
| Angola | 77 | 0.92 |
| Argentina | 202 | 2.42 |
| Australia | 179 | 2.15 |
| Austria | 3 | 0.04 |
| Azerbaijan | 22 | 0.26 |
| Bahrain | 2 | 0.02 |
| Bangladesh | 7 | 0.08 |
| Barbados | 6 | 0.07 |
| Bolivia | 11 | 0.13 |
| Brazil | 97 | 1.16 |
| Brunei | 14 | 0.17 |
| Cameroon | 4 | 0.05 |
| Canada | 1178 | 14.13 |
| Chad | 10 | 0.12 |
| Chile | 1 | 0.01 |
| China | 111 | 1.33 |
| China-Japan | 1 | 0.01 |
| Colombia | 288 | 3.46 |
| Côte d'Ivoire | 5 | 0.06 |
| Cuba | 10 | 0.12 |
| Cyprus | 5 | 0.06 |
| Denmark | 23 | 0.28 |
| Ecuador | 93 | 1.12 |
| Egypt | 96 | 1.15 |
| Ethiopia | 5 | 0.06 |
| France | 2 | 0.02 |
| Gabon | 2 | 0.02 |
| Germany | 52 | 0.62 |
| Ghana | 4 | 0.05 |
| Grenada | 1 | 0.01 |
| Guatemala | 4 | 0.05 |
| Guyana | 19 | 0.23 |
| Hungary | 2 | 0.02 |
| India | 56 | 0.67 |
| Indonesia | 76 | 0.91 |
| Iran | 100 | 1.20 |
| Iran-Iraq | 3 | 0.04 |
| Iraq | 57 | 0.68 |
| Ireland | 15 | 0.18 |
| Israel | 14 | 0.17 |
| Italy | 38 | 0.46 |
| Jamaica | 1 | 0.01 |
| Japan | 1 | 0.01 |
| Kazakhstan | 47 | 0.56 |
| Kenya | 2 | 0.02 |
| Kuwait | 14 | 0.17 |
| Kuwait-Saudi Arabia | 6 | 0.07 |
| Kuwait-Saudi Arabia-Iran | 2 | 0.02 |
| Libya | 41 | 0.49 |
| Madagascar | 1 | 0.01 |
| Malaysia | 73 | 0.88 |
| Mauritania | 4 | 0.05 |
| Mexico | 197 | 2.36 |
| Morocco | 1 | 0.01 |
| Mozambique | 17 | 0.20 |
| Myanmar | 6 | 0.07 |
| Namibia | 5 | 0.06 |
| Netherlands | 164 | 1.97 |
| New Zealand | 7 | 0.08 |
| Nigeria | 246 | 2.95 |
| Norway | 113 | 1.36 |
| Oman | 41 | 0.49 |
| Pakistan | 38 | 0.46 |
| Palestine | 1 | 0.01 |
| Papua New Guinea | 5 | 0.06 |
| Peru | 26 | 0.31 |
| Philippines | 2 | 0.02 |
| Poland | 111 | 1.33 |
| Qatar | 25 | 0.30 |
| Republic of the Congo | 14 | 0.17 |
| Romania | 67 | 0.80 |
| Russia | 277 | 3.32 |
| Russia-Kazakhstan | 2 | 0.02 |
| Saudi Arabia | 28 | 0.34 |
| Saudi Arabia-Bahrain | 1 | 0.01 |
| Saudi Arabia-Iran | 1 | 0.01 |
| Senegal | 3 | 0.04 |
| Senegal-Mauritania | 1 | 0.01 |
| South Africa | 4 | 0.05 |
| South Sudan | 5 | 0.06 |
| Spain | 1 | 0.01 |
| Suriname | 5 | 0.06 |
| Syria | 8 | 0.10 |
| Tanzania | 22 | 0.26 |
| Thailand | 42 | 0.50 |
| Thailand-Malaysia | 2 | 0.02 |
| Timor-Leste | 2 | 0.02 |
| Timor Gap | 1 | 0.01 |
| Trinidad and Tobago | 35 | 0.42 |
| Tunisia | 5 | 0.06 |
| Türkiye | 6 | 0.07 |
| Turkmenistan | 23 | 0.28 |
| Uganda | 3 | 0.04 |
| Ukraine | 16 | 0.19 |
| United Arab Emirates | 42 | 0.50 |
| United Arab Emirates-Iran | 1 | 0.01 |
| United Kingdom | 317 | 3.80 |
| United States | 3093 | 37.11 |
| Venezuela | 128 | 1.54 |
| Vietnam | 26 | 0.31 |
| Vietnam-Malaysia | 1 | 0.01 |
| Zimbabwe | 1 | 0.01 |
| TOTAL | 8334 | 100.00 |
| Autor: Grupo 5 | ||