ESTATUS GENERAL DE LOS POZOS EN BRASIL DESDE 1937-2018

1 Carga y exploración inicial de los datos

Se cargan los datos desde un archivo CSV y se revisa su estructura general.

setwd("C:/Users/Usuario/Desktop/TRABAJO DE ESTADISTICA/PDF-EXCEL-QGIS")
Datos <- read.csv("Pozos brasil 2.csv", header = TRUE, sep = ";", dec = ",", fileEncoding = "Latin1")
str(Datos)
## 'data.frame':    29575 obs. of  59 variables:
##  $ POCO                      : chr  "7-RO-123HP-RJS" "1-BP-7-RJS" "7-ARGO-4H-ESS" "7-ARGO-5H-ESS" ...
##  $ CADASTRO                  : num  7.43e+10 7.43e+10 3.43e+10 3.43e+10 3.43e+10 ...
##  $ OPERADOR                  : chr  "Petrobras" "BP Energy" "Shell Brasil" "Shell Brasil" ...
##  $ POCO_OPERADOR             : chr  "7RO123HPRJS" "ANU" "7ARGO4HESS" "7ARGO5HESS" ...
##  $ ESTADO                    : chr  "RJ" "RJ" "ES" "ES" ...
##  $ BACIA                     : chr  "Campos" "Campos" "Campos" "Campos" ...
##  $ BLOCO                     : chr  "" "C-M-473" "" "" ...
##  $ SIG_CAMPO                 : chr  "RO   " "" "ARGO " "ARGO " ...
##  $ CAMPO                     : chr  "RONCADOR" "" "ARGONAUTA" "ARGONAUTA" ...
##  $ TERRA_MAR                 : chr  "M" "M" "M" "M" ...
##  $ POCO_POS_ANP              : chr  "S" "S" "S" "S" ...
##  $ TIPO                      : chr  "Explotatório" "Exploratório" "Explotatório" "Explotatório" ...
##  $ CATEGORIA                 : chr  "Desenvolvimento" "Pioneiro" "Desenvolvimento" "Desenvolvimento" ...
##  $ RECLASSIFICACAO           : chr  "PRODUTOR COMERCIAL DE PETRÓLEO" "PORTADOR DE PETRÓLEO" "ABANDONADO POR OUTRAS RAZÕES" "INDEFINIDO" ...
##  $ SITUACAO                  : chr  "PRODUTOR" "ABANDONADO POR LOGÍSTICA EXPLORATÓRIA" "ABANDONADO DEFINITIVAMENTE" "PRODUTOR" ...
##  $ INICIO                    : chr  "03/03/2012" "14/03/2012" "12/04/2012" "14/04/2012" ...
##  $ TERMINO                   : chr  "10/03/2013" "20/09/2012" "19/09/2012" "02/05/2013" ...
##  $ CONCLUSAO                 : chr  "10/03/2013" "19/10/2012" "28/09/2012" "13/05/2013" ...
##  $ TITULARIDADE              : chr  "Público" "Público" "Público" "Público" ...
##  $ LATITUDE_BASE_4C          : chr  "-21:57:45,630" "-23:06:09,622" "-21:08:06,801" "-21:08:12,535" ...
##  $ LONGITUDE_BASE_4C         : chr  "-39:44:01,130" "-40:00:41,295" "-39:46:53,226" "-39:46:49,296" ...
##  $ LATITUDE_BASE_DD          : num  -22 -23.1 -21.1 -21.1 -21.1 ...
##  $ LONGITUDE_BASE_DD         : num  -39.7 -40 -39.8 -39.8 -39.8 ...
##  $ DATUM_HORIZONTAL          : chr  "SIRGAS2000" "SIRGAS2000" "SIRGAS2000" "SIRGAS2000" ...
##  $ TIPO_DE_COORDENADA_DE_BASE: chr  "Definitiva" "Definitiva" "Definitiva" "Definitiva" ...
##  $ DIRECAO                   : chr  "Horizontal" "Vertical" "Horizontal" "Horizontal" ...
##  $ PROFUNDIDADE_VERTICAL_M   : num  -3145 6900 2937 2934 2953 ...
##  $ PROFUNDIDADE_SONDADOR_M   : num  4050 6925 3809 4575 4570 ...
##  $ PROFUNDIDADE_MEDIDA_M     : num  4050 6925 3809 4575 4570 ...
##  $ REFERENCIA_DE_PROFUNDIDADE: chr  "MR" "MR" "MR" "MR" ...
##  $ MESA_ROTATIVA             : num  24 25 24.2 24.2 24.2 ...
##  $ COTA_ALTIMETRICA_M        : num  0 0 0 0 0 ...
##  $ LAMINA_D_AGUA_M           : num  1827 2730 1706 1705 1654 ...
##  $ DATUM_VERTICAL            : chr  "NM" "NM" "NM" "NM" ...
##  $ UNIDADE_ESTRATIGRAFICA    : chr  "" "" "" "" ...
##  $ GEOLOGIA_GRUPO_FINAL      : chr  "Campos" "Lagoa Feia" "Campos" "Campos" ...
##  $ GEOLOGIA_FORMACAO_FINAL   : chr  "Carapebus" "Macabu" "Ubatuba" "Ubatuba" ...
##  $ GEOLOGIA_MEMBRO_FINAL     : chr  "" "" "" "" ...
##  $ CDPE                      : chr  "Existe" "Existe" "Existe" "" ...
##  $ AGP                       : chr  "" "" "" "" ...
##  $ PC                        : chr  "" "Existe" "" "" ...
##  $ PAG                       : chr  "" "" "" "" ...
##  $ PERFIS_CONVENCIONAIS      : chr  "" "Existe" "" "" ...
##  $ DURANTE_PERFURACAO        : chr  "Existe" "Existe" "Existe" "Existe" ...
##  $ PERFIS_DIGITAIS           : chr  "" "" "" "" ...
##  $ PERFIS_PROCESSADOS        : chr  "" "" "" "" ...
##  $ PERFIS_ESPECIAIS          : chr  "" "" "" "" ...
##  $ AMOSTRA_LATERAL           : chr  "" "Existe" "" "" ...
##  $ SISMICA                   : chr  "" "Existe" "" "" ...
##  $ TABELA_TEMPO_PROFUNDIDADE : chr  "" "" "" "" ...
##  $ DADOS_DIRECIONAIS         : chr  "Existe" "Existe" "Existe" "Existe" ...
##  $ TESTE_A_CABO              : chr  "Existe" "Existe" "" "" ...
##  $ TESTE_DE_FORMACAO         : chr  "" "" "" "" ...
##  $ CANHONEIO                 : chr  "" "" "" "" ...
##  $ TESTEMUNHO                : chr  "" "" "" "" ...
##  $ GEOQUIMICA                : chr  "" "" "" "" ...
##  $ SIG_SONDA                 : chr  "SS-49" "DS4" "NB2" "NB2" ...
##  $ NOM_SONDA                 : chr  "SEDCO 707" "Deep Ocean Clarion" "Bully 2" "Bully 2" ...
##  $ DHA_ATUALIZACAO           : chr  "28/1/18 5:00" "28/1/18 5:00" "28/1/18 5:00" "28/1/18 5:00" ...

2 Tabla de distribución de frecuencia del estatus

Se obtiene la frecuencia absoluta de los estatus de los pozos.

Estatus_General <- Datos$CATEGORIA
TDFEstatus <- as.data.frame(table(Estatus_General))
TDFEstatus
##        Estatus_General  Freq
## 1      Desenvolvimento 18276
## 2             Especial  1965
## 3       Estratigráfico   327
## 4             Extensão  2302
## 5              Injeção  1644
## 6 Jazida Mais Profunda   144
## 7     Jazida Mais Rasa    35
## 8             Pioneiro  4059
## 9   Pioneiro Adjacente   823

3 Reasignación de nombres de categorías

Se cambian los nombres de las categorías para mejorar la interpretación.

library(dplyr)
## 
## Adjuntando el paquete: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
TDFEstatus$Estatus_General <- recode(TDFEstatus$Estatus_General,
"Desenvolvimento"      = "Producción Comercial",
"Especial"             = "Otros",
"Estratigráfico"       = "Estudio Geológico",
"Extensão"             = "Delimitación",
"Injeção"              = "Inyección",
"Jazida Mais Profunda" = "Búsqueda Profunda",
"Jazida Mais Rasa"     = "Búsqueda Superficial",
"Pioneiro"             = "Exploración Inicial",
"Pioneiro Adjacente"   = "Exploración Vecina"
)

head(TDFEstatus)
##        Estatus_General  Freq
## 1 Producción Comercial 18276
## 2                Otros  1965
## 3    Estudio Geológico   327
## 4         Delimitación  2302
## 5            Inyección  1644
## 6    Búsqueda Profunda   144

4 Orden de importancia jerárquico y cálculo de frecuencias absolutas y relativas

Se establece un orden lógico del estatus de los pozos según su grado de avance e importancia operativa, con el fin de tratar la variable como cualitativa ordinal y se calculan las frecuencias absolutas y porcentuales.

library(dplyr)

orden_importancia <- c(
  "Exploración Inicial",
  "Exploración Vecina",
  "Delimitación",
  "Estudio Geológico",
  "Producción Comercial",
  "Búsqueda Profunda",
  "Búsqueda Superficial",
  "Inyección",
  "Otros"
)

TDFEstatusfinal <- TDFEstatus %>%
  mutate(Estatus_General = factor(Estatus_General, 
                                  levels = orden_importancia, 
                                  ordered = TRUE)) %>%
  group_by(Estatus_General) %>%
  summarise(
    ni = sum(Freq),
    hi = round(sum(Freq) / sum(TDFEstatus$Freq) * 100, 2)
  ) %>%
  arrange(Estatus_General)

TDFEstatusfinal <- data.frame(TDFEstatusfinal)

5 Tabla final con totales

Se agregan los totales generales de frecuencia absoluta y relativa.

library(dplyr)
orden_importancia <- c(
"Exploración Inicial",
"Exploración Vecina",
"Delimitación",
"Estudio Geológico",
"Producción Comercial",
"Búsqueda Profunda",
"Búsqueda Superficial",
"Inyección",
"Otros")

TDFEstatusfinal$Estatus_General <- factor(
TDFEstatusfinal$Estatus_General,
levels = orden_importancia)

DFEstatusfinal <- TDFEstatusfinal %>%
arrange(desc(ni))
total_ni <- sum(TDFEstatusfinal$ni)
total_hi <- round(sum(TDFEstatusfinal$hi), 2)
TDFEstatusCompleta <- rbind(
TDFEstatusfinal,
data.frame(
Estatus_General = "Total",
ni = total_ni,
hi = total_hi))

print(TDFEstatusCompleta)
##         Estatus_General    ni     hi
## 1   Exploración Inicial  4059  13.72
## 2    Exploración Vecina   823   2.78
## 3          Delimitación  2302   7.78
## 4     Estudio Geológico   327   1.11
## 5  Producción Comercial 18276  61.80
## 6     Búsqueda Profunda   144   0.49
## 7  Búsqueda Superficial    35   0.12
## 8             Inyección  1644   5.56
## 9                 Otros  1965   6.64
## 10                Total 29575 100.00

6 Presentación tabular de resultados gt

Se presenta la tabla de frecuencias en formato visual.

library(gt)
gt(TDFEstatusCompleta) %>%
  tab_header( 
    title = md("**DISTRIBUCIÓN DE FRECUENCIAS DE POZOS PETROLEROS DE BRASIL**"), 
    subtitle = "Estatus de los pozos petrolíferos en Brasil") %>% 
  cols_align(align = "center", columns = everything()) %>%
  tab_style(
    style = list(cell_fill(color = "#2E4053"), cell_text(color = "white", weight = "bold")),
    locations = cells_title()
  ) %>%
  tab_style(
    style = list(cell_fill(color = "#F2F3F4"), cell_text(weight = "bold", color = "#2E4053")),
    locations = cells_column_labels()
  ) %>%
  tab_options(
    table.border.top.color = "#2E4053",
    table.border.bottom.color = "#2E4053",
    column_labels.border.bottom.color = "#2E4053",
    data_row.padding = px(6))
DISTRIBUCIÓN DE FRECUENCIAS DE POZOS PETROLEROS DE BRASIL
Estatus de los pozos petrolíferos en Brasil
Estatus_General ni hi
Exploración Inicial 4059 13.72
Exploración Vecina 823 2.78
Delimitación 2302 7.78
Estudio Geológico 327 1.11
Producción Comercial 18276 61.80
Búsqueda Profunda 144 0.49
Búsqueda Superficial 35 0.12
Inyección 1644 5.56
Otros 1965 6.64
Total 29575 100.00

7 Gráficas

7.1 Histograma de frecuencia absoluta local

Se muestra la cantidad de pozos según su estatus.

TDFEstatusCompleta<- TDFEstatusCompleta[TDFEstatusCompleta$Estatus_General != "Total", ]
par(mar = c(9, 4, 4, 2))
barplot(TDFEstatusCompleta$ni,
        main = "Gráfica N°1: Distribución en cantidad del estatus general de los pozos petrolíferos en Brasil",
        ylab = "Cantidad",
        col = "#2E4053", names.arg = TDFEstatusCompleta$Estatus_General,
        las = 2, cex.names = 0.7, cex.axis = 0.8, cex.main = 0.8)
mtext(" ESTATUS GENERAL", side = 1, line = 7, adj = 0.4, cex = 1)

7.2 Histograma de frecuencia absoluta global

Representa la distribución total de pozos por estatus.

par(mar = c(9, 4, 4, 2))
barplot(TDFEstatusCompleta$ni,
        main = "Gráfica N°2: Distribución en cantidad del estatus general de los pozos petrolíferos en Brasil",
        ylab = "Cantidad",
        col = "#2E4053", names.arg = TDFEstatusCompleta$Estatus_General,
        las = 2, cex.names = 0.7, cex.axis = 0.8, cex.main = 0.8,
        ylim = c(0,30000)) 
mtext("ESTATUS GENERAL", side = 1, line = 7, adj = 0.4, cex = 1)

7.3 Histograma de frecuencia relativa local

Muestra el porcentaje de pozos por estatus.

par(mar = c(9, 4, 4, 2))
barplot(TDFEstatusCompleta$hi,
        main = "Gráfica N°3: Distribución en porcentaje del estatus general de los pozos petrolíferos ",
        ylab = "Porcentaje",
        col = "#2E4053", names.arg = TDFEstatusCompleta$Estatus_General,
        las = 2, cex.names = 0.7, cex.axis = 0.8, cex.main = 0.8)
mtext("ESTATUS GENERAL", side = 1, line = 7, adj = 0.4, cex = 1)

7.4 Histograma de frecuencia relativa global

Presenta el porcentaje global de cada estatus.

par(mar = c(9, 4, 4, 2))
barplot(TDFEstatusCompleta$hi,
        main = "Gráfica N°4: Distribución en porcentaje del estatus general de los pozos petrolíferos ",
        ylab = "Porcentaje",
        col = "#2E4053", names.arg = TDFEstatusCompleta$Estatus_General,
        las = 2, cex.names = 0.7, cex.axis = 0.8, cex.main = 0.8,
        ylim = c(0,100))
mtext("ESTATUS GENERAL", side = 1, line =7, adj = 0.4, cex = 1)

7.5 Diagrama circular

Visualización de la distribución porcentual del estatus de los pozos.

library(ggplot2)
library(ggrepel)
datos_circ <- TDFEstatusCompleta
datos_circ$ymax <- cumsum(datos_circ$hi)
datos_circ$ymin <- c(0, head(datos_circ$ymax, n=-1))
datos_circ$posicion_label <- (datos_circ$ymax + datos_circ$ymin) / 2
colores <- c("#FFBF80", "#FF8000", "#FFFF33", "#B2FF8C", "#33FF00", "#A6EDFF", "#1AB2FF", "#664CFF", "#E61A33")
ggplot(datos_circ, aes(ymax=ymax, ymin=ymin, xmax=4, xmin=0, fill=Estatus_General)) +
  geom_rect(color = "black") +
  coord_polar(theta="y") + 
  geom_label_repel(aes(y = posicion_label, x = 4, label = paste0(round(hi, 2))),
                   size = 4, 
                   nudge_x = 0.5,  
                   show.legend = FALSE) +
  scale_fill_manual(values = colores) +
  ggtitle("Gráfica N°5: Distribución en porcentaje del estatus general de los pozos") +
  theme_void()+
  theme(
    legend.position = "right",
    plot.title = element_text(hjust = 0.5, margin = margin(l = 40)),
    legend.background = element_rect(color = "black", 
                                     fill = "white",    
                                     linewidth = 0.5, 
                                     linetype = "solid"),
    legend.margin = margin(t = 10, r = 10, b = 10, l = 10))

8 Resumen Estadístico

Conclusiones <- data.frame(
Variable = "Estatus General de los Pozos",
`Rango [Min; Max]` = "N/A",
`Media (X̄)` = "N/A",
`Mediana (Me)` = "N/A",
`Moda (Mo)` = "Producción comercial",
`Varianza (S²)` = "N/A",
`Desv. Est. (S)` = "N/A",
`C.V. (%)` = "N/A",
`Asimetría (As)` = "N/A",
`Curtosis (K)` = "N/A",
`Valores Atípicos` = "N/A",
check.names = FALSE
)
library(gt)

gt(Conclusiones) %>%
tab_header(
title = md("**CONCLUSIONES Y ESTADÍSTICOS**"),
subtitle = "Resumen de Indicadores del Estatus General de los Pozos Petrolíferos en Brasil") %>%
tab_source_note(source_note = "Autor: Benjamin Salazar") %>%
  cols_align(align = "center", columns = everything()) %>%
  tab_style(
    style = list(cell_fill(color = "#2E4053"), cell_text(color = "white", weight = "bold")),
    locations = cells_title()
  ) %>%
  tab_style(
    style = list(cell_fill(color = "#F2F3F4"), cell_text(weight = "bold", color = "#2E4053")),
    locations = cells_column_labels()
  ) %>%
  tab_options(
    table.border.top.color = "#2E4053",
    table.border.bottom.color = "#2E4053",
    column_labels.border.bottom.color = "#2E4053",
    data_row.padding = px(6))
CONCLUSIONES Y ESTADÍSTICOS
Resumen de Indicadores del Estatus General de los Pozos Petrolíferos en Brasil
Variable Rango [Min; Max] Media (X̄) Mediana (Me) Moda (Mo) Varianza (S²) Desv. Est. (S) C.V. (%) Asimetría (As) Curtosis (K) Valores Atípicos
Estatus General de los Pozos N/A N/A N/A Producción comercial N/A N/A N/A N/A N/A N/A
Autor: Benjamin Salazar

8.1 Conclusiones

8.1.1 Análisis Descriptivo

La Producción comercial constituye la moda del estatus general, lo que indica que la mayor proporción de pozos en Brasil corresponde a fases productivas consolidadas, evidenciando un predominio de actividades extractivas frente a etapas exploratorias.