This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

Installing Basic Libraries

Libraries: devtools, dplyr, data.table, DT, ggplot2

Reading Data from CSV File

Reading a CSV file created by a Python routine that reads a .98c file

setwd("C:/Users/Dario/Documents/IHS/atascosa_r_project")
dfh <- tbl_df(read.table(file = "Atascosa_Header.csv", 
                         header = T, sep = ",", 
                         na.strings = c(NA, ""),
                         colClasses = c('character')
                         )
              )

Filtering Data - Only EagleFord - Active - Deviated/Horizontal

Dealing only with non-Multi Wells

##  [1] "prod_id"            "source_name"        "region_code"       
##  [4] "state_code"         "field_code"         "county_code"       
##  [7] "county_name"        "oper_code"          "prod_code"         
## [10] "mode_code"          "formtn_code"        "basin_code"        
## [13] "cbm_indi"           "enhrec_flag"        "lease_name"        
## [16] "oper_name"          "api_number"         "mms_suffix"        
## [19] "well_number"        "total_depth"        "bh_press"          
## [22] "bh_temp"            "type_well"          "direc_drill_flag"  
## [25] "well_stat"          "permit_number"      "bh_calc"           
## [28] "true_vdepth"        "well_serial_number" "latitude"          
## [31] "longitude"          "lat_long_source"    "surf_datum"        
## [34] "bh_latitude"        "bh_longitude"       "bh_lat_long_source"
## [37] "bh_datum"           "plugged_date"       "uppr_perf"         
## [40] "lowr_perf"         
## Source: local data frame [6 x 5]
## 
##           prod_id   lease_name well_number latitude longitude
##             (chr)        (chr)       (chr)    (dbl)     (dbl)
## 1  1420100152501H LITTLE L & C          1H 28.95393 -98.33186
## 2  1420100152502H LITTLE L & C          2H 28.95259 -98.34224
## 3 14201001525110H PEELER RANCH         10H 28.72055 -98.45613
## 4 14201001525111H PEELER RANCH         11H 28.72645 -98.45019
## 5 14201001525112H PEELER RANCH         12H 28.72943 -98.44755
## 6  1420100152512H PEELER RANCH          2H 28.72848 -98.45589

Miscelaneous Operations

Converting oper_name into a Factor

unique(dfh$direc_drill_flag)
names(dfh.sub)
dfh.sub[,3] <- lapply(dfh.sub[,3], as.factor)
str(dfh.sub)
levels(dfh.sub$oper_name)

Displaying Data using DT Table Manager

DT is a Javascript interface to display tabular data

Showing Well Locations with ggplot2

Note: ggplot2 is a library for plotting graphs - Static View

Installing Mapping Library

Installing library leaflet and raster for mapping well locations

Map Showing Well Locations

Note: Well name is displayed by clicking on a well symbol


cpq energy consultants