Skip to content

Instantly share code, notes, and snippets.

View nathangeology's full-sized avatar

Nathaniel Jones nathangeology

  • Amazon Web Services
  • Seattle, WA
View GitHub Profile
@nathangeology
nathangeology / test_bokeh.js
Created June 7, 2020 22:25
testing importing a function to a bokeh server
function myModule() {
function say_hi(){
console.log('Hi!')
}
}
module.exports = myModule
@nathangeology
nathangeology / plot_log.js
Created June 7, 2020 17:16
test script to plot a well log as part of a hackathon
async function plot_log(div_id) {
let ShaleSiltCutOff = 80
let SiltSandCutOff = 55
var fileUrltoWellLog = "https://gist.github.com/JustinGOSSES/2685e588d5c2f2a0ba1591ec7b9c9421/raw/415fe8a2f27dc7621f06f60ffd40a62c0d55a0f0/00-01-01-095-19W4-0.las"
var fetched = await fetch(fileUrltoWellLog)
var well_as_string = await fetched.text()
var well_json_01_01_095_19W4 = wellio.las2json(well_as_string)
let depth_curve_name = "DEPT"
let three_things_2 = wellioviz.fromJSONofWEllGetThingsForPlotting(well_json_01_01_095_19W4, depth_curve_name)
let curve_names2 = Array(6) ["DEPT", "GR", "CALI", "NPHI", "DPHI", "ILD"]
@nathangeology
nathangeology / vega_well_log_spec_v2.json
Last active May 29, 2020 22:06
Zoomable well log curve
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"width": 400,
"height": 200,
"padding": {
"top": 10,
"left": 40,
"bottom": 20,
"right": 10
},
@nathangeology
nathangeology / well_log_experiment.json
Created May 29, 2020 00:22
Well Log to use to develop my vega well log spec
[{"ESOZ16_BADHOLE":1.0,"ESOZ16_KA":13.8428,"ESOZ16_LITHNUM":5.0,"ESOZ16_PHIE":0.2959,"ESOZ16_PHIT":0.3262,"ESOZ16_RHOB_P":2.1117,"ESOZ16_NPHIS_P":0.4916,"ESOZ16_SAND":0.0,"ESOZ16_SHAL":1.0,"ESOZ16_DOLO":0.0,"ESOZ16_VCL":0.3038,"ESOZ16_BVHE":0.0,"ESOZ16_BVHT":0.0,"ESOZ16_BVWE":0.2959,"ESOZ16_BVWT":0.3262,"ESOZ16_SGE":0.0,"ESOZ16_SGT":0.0,"ESOZ16_SOE":0.0,"ESOZ16_SOT":0.0,"ESOZ16_SWE":1.0,"ESOZ16_SWT":1.0,"DepthMD":2660.0},{"ESOZ16_BADHOLE":1.0,"ESOZ16_KA":1.7278,"ESOZ16_LITHNUM":5.0,"ESOZ16_PHIE":0.2555,"ESOZ16_PHIT":0.3051,"ESOZ16_RHOB_P":2.1467,"ESOZ16_NPHIS_P":0.5273,"ESOZ16_SAND":0.0,"ESOZ16_SHAL":1.0,"ESOZ16_DOLO":0.0,"ESOZ16_VCL":0.4953,"ESOZ16_BVHE":0.0,"ESOZ16_BVHT":0.0,"ESOZ16_BVWE":0.2555,"ESOZ16_BVWT":0.3051,"ESOZ16_SGE":0.0,"ESOZ16_SGT":0.0,"ESOZ16_SOE":0.0,"ESOZ16_SOT":0.0,"ESOZ16_SWE":1.0,"ESOZ16_SWT":1.0,"DepthMD":2660.5},{"ESOZ16_BADHOLE":1.0,"ESOZ16_KA":5.4541,"ESOZ16_LITHNUM":5.0,"ESOZ16_PHIE":0.2803,"ESOZ16_PHIT":0.3183,"ESOZ16_RHOB_P":2.1247,"ESOZ16_NPHIS_P":0.5049,"ESOZ16_SAND":0.0,"ESOZ16
@nathangeology
nathangeology / vega_well_log_spec_v1.json
Last active May 29, 2020 01:01
Test vega spec for a well log v1
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"width": 400,
"height": 200,
"padding": 5,
"signals": [
{
"name": "tooltip",
"value": {},
"on": [
@nathangeology
nathangeology / LasDocumentStore
Created March 12, 2019 00:48
Code to create a lookup dictionary for fast loading of las well log files
class LasDocumentStore(InputSource):
las_dict = defaultdict(list)
__directory_path = ''
column_cleaner = Column_Cleaner( )
def __init__(self, *, directory_path):
self.__directory_path = directory_path
self.path = self.__directory_path + '/las_document_store.pkl'
self.name = 'WellLogs'
self.las_dict = defaultdict(list)