Skip navigation links
NPD I/O

Petroware AS - NPD I/O - June 2017

The Petroware AS NpdIo module is a Java library for accessing data from the Norwegian Petroleum Directorate (NPD) fact pages.

See: Description

Packages 
Package Description
no.petroware.npdio  
no.petroware.npdio.company  
no.petroware.npdio.facility  
no.petroware.npdio.field  
no.petroware.npdio.license  
no.petroware.npdio.survey  
no.petroware.npdio.well  
The Petroware AS NpdIo module is a Java library for accessing data from the Norwegian Petroleum Directorate (NPD) fact pages.

The NPD FactPages contain information regarding the petroleum activities on the Norwegian continental shelf. The information is synchronised with the NPD's databases on a daily basis.

A coding example is shown below. Note that the exact URLs for each NPD data type is available on the NPD web pages.

import no.petroware.npdio.well.*;
import no.petroware.npdio.field.*;
:

//
// Read development NPD wellbores
//
String url = "http://factpages.npd.no/ReportServer?/FactPages/TableView/wellbore_development_all" + "&" +
             "rs:Command=Render" + "&" +
             "rc:Toolbar=false" + "&" +
             "rc:Parameters=f" + "&" +
             "rs:Format=CSV" + "&" +
             "Top100=false" + "&" +
             "IpAddress=80.239.106.206" + "&" +
             "CultureCode=en";

List<NpdWellbore> npdWellbores = NpdWellDataReader.readDevelopmentWellbores(url);

// Loop over the wellbores and write to stdout
for (NpdWellbore npdWellbore : npdWellbores)
  System.out.println(npdWellbore);

:

//
// Read NPD fields
//
String url = ...
List<NpdField> npdFields = NpdFieldReader.readFields(url);

// Read production data for all fields
String url = ...
ProductionReader.readProduction(url, npdFields);

// Loop over the fields and write oil production to stdout
for (NpdField npdField : fields) {
  Production production = field.getProduction();

  for (Production.Entry productionEntry : production.getEntries()) {
    int year = productionEntry.getYear();
    int month = productionEntry.getMonth();

    double oilProduction = productionEntry.getOil();

    System.out.println("Oil production: " + year + "/" + month + ": " + oilProduction);
  }
}

:
Skip navigation links
NPD I/O

Copyright © 2017 - http://petroware.no