npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

qp-well-parser

v4.0.1

Published

A small package to help destructure api responses into standard well objects

Downloads

18

Readme

qp-well-parser

A helper function that parses wells from the api into a standard format

Usage

Importing:

const WellParser = require('qp-well-parser')
// import WellParser from 'qp-well-parser'

// initialize the parser to use a specific QueryPark api version
// defaults to latest
const wellParser = WellParser('v1')

API

version

console.log(wellParser.apiVersion) // v1

parse

const standardWell = wellParser.valueOf()
console.log(standardWell)
/*
{
  uuid: '',
  primaryHeader: {
    label: '',
    value: ''
  },
  subheader: {
    label: '',
    value: ''
  },
  govId: {
    label: '',
    value: ''
  },
  surfaceLocation: {
    label: '',
    value: ''
  },
  owner: {
    label: '',
    value: ''
  },
  attributes: {
    country: '',
    region: '',
    coordinates: {
      lat: 0,
      lon: 0
    },
    wellStatus: '',
    substance: '',
    drillDirection: '',

    isLatest: true
  },
  wellData: {}
}
*/

const well = {
  "FieldCenter": "Medicine Hat",
  "WellName": "HANSAR ENERGY DD CHINCO 1-1-8-13",
  "LicenseNumber": "0443004",
  "DrillingOperation": "DIRECTIONAL",
  "UWI": "100/01-01-008-13W4/00",
  "WellType": "PRODUCTION",
  "ProjectedDepth": 1132,
  "TerminatingZone": "LIVINGSTONE FM",
  "Field": "UNDEFINED",
  "GroundElevation": 847.4,
  "WellPurpose": "NEW",
  "LaheeClassification": "NPW (C)",
  "MineralRights": "ALBERTA CROWN",
  "CreatedDate": 1326870000000,
  "SurfaceCoordinates": "N 395.8M W 546.8M",
  "Substance": "GAS",
  "SurfaceLocation": "02-01-008-13W4",
  "Licensee": "HANSAR ENERGY CORP.",
  "Uuid": "30d3c778-ef5e-44b4-903e-3daa26c291b5",
  "Region": "AB",
  "Country": "CA",
  "StatusDate": 1330637400000,
  "Next": "null",
  "Prev": "32e919af-3744-4eb1-a4d1-3846e8f6a264",
  "LicenseeName": "Hansar Energy Corp.",
  "ActivityType": "Drill To LD",
  "ContractorCode": "0ZM7",
  "ContractorName": "Champion Drilling Inc.",
  "LicenseeCode": "A645",
  "RigNumber": "333"
}

const parsedWell = wellParser(well)
// const parsedWell = wellParser.v1Parse(well)

console.log(parsedWell)
/*
{
  uuid: '30d3c778-ef5e-44b4-903e-3daa26c291b5',
  primaryHeader: {
    label: 'Well Name',
    value: 'HANSAR ENERGY DD CHINCO 1-1-8-13'
  },
  subheader: {
    label: 'UWI',
    value: '100/01-01-008-13W4/00'
  },
  govId: {
    label: 'License Number',
    value: '0443004'
  },
  surfaceLocation: {
    label: 'Surface Location',
    value: '02-01-008-13W4'
  },
  owner: {
    label: 'Licensee',
    value: 'HANSAR ENERGY CORP.'
  },
  attributes: {
    country: 'CA',
    region: 'AB',
    coordinates: null,

    wellStatus: 'NPW (C)',
    substance: 'GAS',
    drillDirection: 'DIR',

    isLatest: true
  },
  wellData: { ... }
}
*/