Refineries Crude Imports

Note

available on platforms : Platform.Liquids

class kpler.sdk.resources.refineries.crude_imports.CrudeImports(configuration, column_ids=True, log_level=None)[source]

The CrudeImports endpoint returns the 30days moving average crude imports for a point of interest (installation/zone) on a daily, weekly, weekly EIA (for US), monthly and yearly basis. It also provides the weighted average API and Sulfur values over time.

get(players=None, installations=None, zones=None, start_date=None, end_date=None, products=None, unit=None, granularity=None, split=None, metric=None)[source]
Parameters
  • players – Optional[str] Names of players

  • installations – Optional[List[str]] Names of installations

  • zones – Optional[List[str]] Names of countries/geographical zones

  • start_date – Optional[date] Start of the period (YYYY-MM-DD), must be after 2017-01-01

  • end_date – Optional[date] End of the period (YYYY-MM-DD), maximum of 7 days from today

  • products – Optional[List[Enum]] RunsQualities Names of qualities

  • unit – Optional[Enum] ImportsUnit

  • granularity – Optional[Enum] ImportsGranularity

  • split – Optional[Enum] ImportsSplit

  • metric – Optional[Enum] ImportsMetric Returns only provided metrics

Examples

>>> from datetime import date
... from kpler.sdk.resources.refineries.crude_imports import CrudeImports
... from kpler.sdk import ImportsSplit, ImportsGranularity, RunsQualities, ImportsUnit, ImportsMetric
... crude_imports_client = CrudeImports(config)
... crude_imports_client.get(
...     installations=["xxxx"],
...     zones=["United States"],
...     start_date=date(2023, 4, 1),
...     end_date=date(2023, 7, 31),
...     player=["xxx"],
...     products=[RunsQualities.All],
...     unit=ImportsUnit.KBD,
...     granularity=ImportsGranularity.Monthly,
...     split=ImportsSplit.Total,
...     metric=ImportsMetric.Quantity,
... )

Date

Zones

Installations

Split Value

Metric

Value

Unit

2023-04-01

United States

Total

Imports

79644.0

kbd

2023-05-01

United States

Total

Imports

79417.0

kbd

2023-06-01

United States

Total

Imports

79540.0

kbd

2023-07-01

United States

Total

Imports

81059.0

kbd

2023-04-01

United States

Total

API - Weighted average

33.5

° API

2023-04-01

United States

Total

Sulfur - Weighted average

1.24

% wt

2023-05-01

United States

Total

API - Weighted average

33.4

° API

2023-05-01

United States

Total

Sulfur - Weighted average

1.25

% wt

2023-06-01

United States

Total

API - Weighted average

33.3

° API

Return type

DataFrame

get_api_sulfur_columns()[source]

This endpoint returns a recent and updated list of all columns available for the endpoint refineries crude-imports api-sulfur.

Examples

>>> from kpler.sdk.resources.refineries.crude_imports import CrudeImports
... crude_imports_client = CrudeImports(config)
... crude_imports_client.get_api_sulfur_columns()

id

name

description

deprecated

type

date

Date (timestamp)

Date, within the start_date and end_date. Data is provided with ascending order on date. Format YYYY-MM-DD.

False

string

zones

Zones

List of zones specified in the parameter zones.

False

list of string

installations

Installations

List of installations specified in the parameter installations.

False

list of string

splitValue

Split Value

Name of the bucket corresponding to the specified split. EG Americas or Asia for split by Continent.

False

string

metric

Metric

Corresponding to the endpoint.

False

string

Return type

DataFrame

get_columns()[source]

This endpoint returns a recent and updated list of all columns available for the endpoint refineries crude-imports.

Examples

>>> from kpler.sdk.resources.refineries.crude_imports import CrudeImports
... crude_imports_client = CrudeImports(config)
... crude_imports_client.get_columns()

id

name

description

deprecated

type

date

Date (timestamp)

Date (timestamp)

False

date yyyy-MM-dd

zones

Zones

Zones the row’s data uses

False

list of string

installations

Installations

Instalations the row’s data uses

False

list of string

splitValue

Split Value

Split Value

False

string

metric

Metric

Metric

False

string

Return type

DataFrame

class kpler.sdk.ImportsGranularity(value)[source]
Annually = 'year'
Daily = 'day'
EiaWeekly = 'eia-week'
Monthly = 'month'
Weekly = 'week'
class kpler.sdk.ImportsUnit(value)[source]
KB = 'kb'
KBD = 'kbd'
M3 = 'm3'
MBBL = 'Mbbl'
class kpler.sdk.RunsQualities(value)[source]
All = 'All'
Heavy = 'Heavy'
HeavySour = 'Heavy Sour'
HeavySweet = 'Heavy Sweet'
Light = 'Light'
LightSour = 'Light Sour'
LightSweet = 'Light Sweet'
Medium = 'Medium'
MediumSour = 'Medium Sour'
MediumSweet = 'Medium Sweet'
Sour = 'Sour'
Sweet = 'Sweet'
class kpler.sdk.ImportsSplit(value)[source]
Continent = 'Continent'
Country = 'Country'
CrudeProductionRegion = 'Crude Production Region'
CrudeQuality = 'Crude Quality'
Refinery = 'Refinery'
RefineryType = 'Refinery Type'
Subcontinent = 'Subcontinent'
Total = 'Total'
TradingRegion = 'Trading Region'
class kpler.sdk.ImportsMetric(value)[source]
APISulfur = 'API Sulfur'
Quantity = 'Quantity'