Skip to content

Instantly share code, notes, and snippets.

View yohanesnuwara's full-sized avatar
:octocat:
Open to Work

yohanesnuwara yohanesnuwara

:octocat:
Open to Work
View GitHub Profile
@yohanesnuwara
yohanesnuwara / spe_data_machinelearning (2).ipynb
Last active August 24, 2021 22:55
Notebook for Hydraulic Fracturing Prediction Notebook TDS
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yohanesnuwara
yohanesnuwara / selected_features.csv
Last active August 3, 2021 07:48
Selected features for fracturing prediction
Feature name Correlation Description
Formation/Reservoir Encoded formation names
Reservoir Temperature (deg F) Positive Reservoir temperature in Fahrenheit
Net Pay (ft) Negative Net thickness of pay zone in feet 
Oil Saturation Positive Oil saturation in the reservoir
Gas Saturation Negative Gas saturation in the reservoir
Gas Specific Gravity Positive Specific gravity of gas in the reservoir
CO2 Positive CO2 content in the reservoir
N2 Positive N2 content in the reservoir
Oil Gravity (API) Positive Oil gravity in API unit
@yohanesnuwara
yohanesnuwara / SPE_data_ML_cluster_sorted.csv
Created August 3, 2021 03:13
Sorted SPE data based on cluster per stage
Lease # Clusters per Stage
CARDINAL 15.0
HAWK 15.0
FALCON 15.0
CROW 15.0
LARK 9.0
JAY 9.0
OSPREY 9.0
SPARROW 9.0
SWIFT 9.0
@yohanesnuwara
yohanesnuwara / SPE_ML_data.csv
Created August 3, 2021 02:58
First 10 rows of data for TDS article
We can make this file beautiful and searchable if this error is corrected: It looks like row 5 should actually have 27 columns, instead of 6 in line 4.
Lease,Formation/Reservoir, Reservoir Temperature (deg F) , Net Pay (ft) , Wellbore Diameter (ft) ,Porosity, Water Saturation , Oil Saturation , Gas Saturation , Gas Specific Gravity ,CO2, H2S ,N2,Condensate Gravity (API),Sep. Temperature (deg F),Sep. Pressure (psi), Oil Gravity (API) , TVD (ft) ,# Stages,# Clusters ,# Clusters per Stage,# of Total Proppant (Lbs), Lateral Length (ft) , Top Perf (ft) , Bottom Perf (ft) , Sandface Temp (deg F) , Static Wellhead Temp (deg F)
OSPREY,EAGLE FORD,225,78,0.7,0.063,0.26,0.74,0.0,0.9513,0.0217,0.0,0.0045000000000000005,37.29,100,100,37.29,7638.6,28,252,9.0,13514540.0,5883,8030,13913,225.0,70.0
FALCON,EAGLE FORD,225,66,0.7,0.063,0.27,0.73,0.0,0.9936,0.0217,0.0,0.0045000000000000005,34.6,100,100,34.6,7501.8758,64,960,15.0,35970960.0,9997,7828,17825,225.0,60.0
HAWK,EAGLE FORD,225,67,0.7,0.063,0.271,0.7290000000000001,0.0,0.9936,0.0217,0.0,0.0045000000000000005,34.6,100,100,34.6,7516.6753,68,1020,15.0,38064782.0,10672,7824,18496,225.0,60.0
EAGLE,EAGLE FORD,235,74,0.7,0.063
Lease Well Number State Formation/Reservoir Initial Pressure Estimate (psi) Reservoir Temperature (deg F) Net Pay (ft) Wellbore Diameter (ft) Porosity Water Saturation Oil Saturation Gas Saturation Gas Specific Gravity CO2 H2S N2 Condensate Yield (Bc/MMcf) Condensate Gravity (API) Dew Point Pressure (psi) Sep. Temperature (deg F) Sep. Pressure (psi) Oil Gravity (API) Initial GOR (scf/bbl) Bubble Point Pressure (psi) TVD (ft) Spacing # Stages # Clusters # Clusters per Stage Pre-Refrac Completion # Stages Pre-Refrac Completion # Clusters Initian Completion # Clusters per Stage # of Total Proppant (Lbs) Total Fluid (Bbls) Lateral Length (ft) Top Perf (ft) Bottom Perf (ft) Sandface Temp (deg F) Static Wellhead Temp (deg F) Configuration Production Path Pressure Loss Correlation Tubing ID (in) Tubing OD (in) Tubing Depth (ft) Casing ID 1 (in) Casing Footage 1 (ft) Casing ID 2 (in) Casing Footage 2 (ft) Casing Depth (ft) Configuration Change (Days Since F
url = 'https://raw.githubusercontent.com/yohanesnuwara/energy-analysis/main/data/SPE_welldata_string_preprocessed.csv'
df = pd.read_csv(url)
df.head()
@yohanesnuwara
yohanesnuwara / fruit_classification.csv
Created July 25, 2021 04:38
Illustration for erroneous features
Shape Color Fruit
Round Orange Orange
Round Red Apple
Round Red Apple
Round Green Watermelon
Round Orange Orange
@yohanesnuwara
yohanesnuwara / Filtered_Realtime_Drilling_F_15.csv
Created July 24, 2021 14:47
Feature selected Realtime drilling data for TDS article
TORQUE STRATESUM BIT_RPM PUMP FLOWOUT ROP_AVG TOTGAS WOB ECDBIT LITH
20991.543 1.6745582 1.3141475 17932214.0 0.038980972 0.004088054 0.00018335271 26217.864 1360.874 marl
22610.383 1.7667643 1.3287059 20878002.0 0.041079254 0.005159383 0.00017616453000000005 83492.293 1382.0713 marl
24296.981 1.7682852999999998 1.4208871 20728354.0 0.041359136 0.005971469300000001 0.00018825522 97087.882 1381.7741 claystone
24931.313 1.7833046 1.5959484 20553813.0 0.043607078 0.0054191089000000005 0.0002761118 54793.206 1381.5933 claystone
24330.264 1.7833333999999998 1.6532368999999998 20492430.0 0.043191221 0.0054352483 0.00025307232000000004 50301.57900000001 1381.1635 marl
23434.06 1.7834103 1.6577301 20656442.0 0.04294276 0.004738274000000001 0.00025245604 56835.194 1380.8744 marl
23348.027 1.8000275 2.1391571 20650815.0 0.044149725 0.008811767199999999 0.00036779115 37638.028 1380.8929999999998 marl
23348.027 1.8000275 2.1391571 20650815.0 0.044149725 0.008811767199999999 0.00036779115 37638.028 1380.8929999999998 marl
@yohanesnuwara
yohanesnuwara / Realtime_Drilling_F_15.csv
Created July 24, 2021 14:37
Realtime drilling data for TDS article
We can make this file beautiful and searchable if this error is corrected: It looks like row 4 should actually have 33 columns, instead of 23 in line 3.
Depth,LAGMWT,Time,EditFlag,TORQUE,MOTOR_RPM,STRATESUM,MWOUT,LAGMWDIFF,MWIN,BIT_RPM,DXC,MUDRETDEPTH,PUMP,LAGMTEMP,RigActivityCode,MRIN,FLOWOUT,ROP_AVG,LAGMRES,TOTGAS,MROUT,MTIN,LAGMRDIFF,FLOWIN,WOB,ONBOTTOM_TIME,ECDBIT,MTOUT,BIT_DIST,SURF_RPM,LAGMTDIFF,LITH
3300.0,1280.0,2013-11-28 12:54:29,0.0,3768.1461,0.0,0.30077287,1280.0,0.0,1280.0,0.26709381,0.98767405,3299.0,3112134.6,0.0,111.0,0.0,0.016037011,0.0050745891,0.0,0.00010829921,0.0,0.0,0.0,0.006662119100000001,-19762.743,194.0,1293.6605,0.0,0.99521129,0.26709381,0.0,claystone
3305.0,1280.0,2013-11-28 16:48:21,0.0,20991.543,0.0,1.6745582,1306.2254,26.225434000000003,1306.2254,1.3141475,0.98767405,3301.7245,17932214.0,0.0,111.0,0.0,0.038980972,0.004088054,0.0,0.00018335271,0.0,0.0,0.0,0.037091464,26217.864,1617.0,1360.874,0.0,5.995622,1.3147203,0.0,marl
3310.0,1315.2258,2013-11-28 17:01:59,0.0,22610.383,0.0,1.7667643,1320.0146,4.7887933,1320.0146,1.3287059,0.98767405,3301.7245,20878002.0,0.0,111.0,0.0,0.041079254,0.005159383,0.0,0.00017616453000000005,0.0,0.0
@yohanesnuwara
yohanesnuwara / idm1.py
Created July 3, 2021 10:53
Creating a superdataframe
import idm
# Combine trajectory and drilling data
df_data, df_new = traj_df, drill_df # trajectory and realtime drilling data
xdata, xnew = "md", "Depth"
ydata = ["surfNs", "surfEw", "TVD_calc"]
merge1_df = idm.merge_data_interpolation(df_data, df_new, xdata, ydata, xnew)