Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
"source": [
"# Get monthly forecast explanation for a Handymax MR2 clean route from Rotterdam to Houston\n",
"result = AnywhereFreightPricingForecastExplanation().search(\n",
" origin_port=\"68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e\",\n",
" destination_port=\"ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb\",\n",
" origin=\"68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e\",\n",
" destination=\"ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb\",\n",
" vessel_class=\"oil_handymax_mr2\",\n",
" product=\"clean\",\n",
" frequency=\"month\",\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
"# Get weekly forecast pricing for a Handymax MR2 clean route from Rotterdam to Houston\n",
"routes = [\n",
" {\n",
" \"origin_port\": \"68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e\",\n",
" \"destination_port\": \"ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb\",\n",
" \"origin\": \"68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e\",\n",
" \"destination\": \"ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb\",\n",
" \"product\": \"clean\",\n",
" \"vessel_class\": \"oil_handymax_mr2\",\n",
" }\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
"result = AnywhereFreightPricingGetPriceDetails().search(\n",
" time_min=datetime(2024, 1, 1),\n",
" time_max=datetime(2024, 12, 31),\n",
" origin_port=\"7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f\",\n",
" destination_port=\"68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e\",\n",
" origin=\"7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f\",\n",
" destination=\"68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e\",\n",
" vessel_class=\"oil_aframax_lr2\",\n",
" product=\"crude\",\n",
" unit=\"usd_per_tonne\",\n",
Expand Down Expand Up @@ -83,14 +83,19 @@
" <th>suggested_tonnage</th>\n",
" <th>suggested_tonnage_overridden</th>\n",
" <th>avoid_zone</th>\n",
" <th>via_waypoint</th>\n",
" <th>rates</th>\n",
" <th>lumpsums</th>\n",
" <th>confidences</th>\n",
" <th>product</th>\n",
" <th>origin.id</th>\n",
" <th>...</th>\n",
" <th>origin.lon</th>\n",
" <th>origin_port.id</th>\n",
" <th>origin_port.lat</th>\n",
" <th>origin_port.lon</th>\n",
" <th>destination.id</th>\n",
" <th>destination.lat</th>\n",
" <th>destination.lon</th>\n",
" <th>destination_port.id</th>\n",
" <th>destination_port.lat</th>\n",
" <th>destination_port.lon</th>\n",
Expand All @@ -104,43 +109,60 @@
" <td>85000.0</td>\n",
" <td>False</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" <td>[{'date': '2024-01-01', 'breakdown': [{'type':...</td>\n",
" <td>[{'date': '2024-01-01', 'breakdown': [{'type':...</td>\n",
" <td>[{'date': '2024-01-01', 'value': 2}, {'date': ...</td>\n",
" <td>crude</td>\n",
" <td>7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030e...</td>\n",
" <td>...</td>\n",
" <td>-95.14733</td>\n",
" <td>7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030e...</td>\n",
" <td>29.71926</td>\n",
" <td>-95.14733</td>\n",
" <td>68faf65af1345067f11dc6723b8da32f00e304a6f33c00...</td>\n",
" <td>51.90924</td>\n",
" <td>4.27941</td>\n",
" <td>68faf65af1345067f11dc6723b8da32f00e304a6f33c00...</td>\n",
" <td>51.90924</td>\n",
" <td>4.27941</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>1 rows × 21 columns</p>\n",
"</div>"
],
"text/plain": [
" vessel_class max_dwt suggested_tonnage suggested_tonnage_overridden \\\n",
"0 oil_aframax_lr2 119999.0 85000.0 False \n",
"\n",
" avoid_zone via_waypoint rates \\\n",
"0 None None [{'date': '2024-01-01', 'breakdown': [{'type':... \n",
" avoid_zone rates \\\n",
"0 None [{'date': '2024-01-01', 'breakdown': [{'type':... \n",
"\n",
" lumpsums \\\n",
"0 [{'date': '2024-01-01', 'breakdown': [{'type':... \n",
"\n",
" confidences product \\\n",
"0 [{'date': '2024-01-01', 'value': 2}, {'date': ... crude \n",
"\n",
" origin_port.id origin_port.lat \\\n",
"0 7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030e... 29.71926 \n",
" origin.id ... origin.lon \\\n",
"0 7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030e... ... -95.14733 \n",
"\n",
" origin_port.id origin_port.lat \\\n",
"0 7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030e... 29.71926 \n",
"\n",
" origin_port.lon destination_port.id \\\n",
" origin_port.lon destination.id \\\n",
"0 -95.14733 68faf65af1345067f11dc6723b8da32f00e304a6f33c00... \n",
"\n",
" destination_port.lat destination_port.lon \n",
"0 51.90924 4.27941 "
" destination.lat destination.lon \\\n",
"0 51.90924 4.27941 \n",
"\n",
" destination_port.id destination_port.lat \\\n",
"0 68faf65af1345067f11dc6723b8da32f00e304a6f33c00... 51.90924 \n",
"\n",
" destination_port.lon \n",
"0 4.27941 \n",
"\n",
"[1 rows x 21 columns]"
]
},
"execution_count": 3,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@
"# Get price details for multiple routes\n",
"routes = [\n",
" {\n",
" \"origin_port\": \"7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f\",\n",
" \"destination_port\": \"68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e\",\n",
" \"origin\": \"7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f\",\n",
" \"destination\": \"68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e\",\n",
" \"product\": \"crude\",\n",
" \"vessel_class\": \"oil_aframax_lr2\",\n",
" },\n",
" {\n",
" \"origin_port\": \"68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e\",\n",
" \"destination_port\": \"ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb\",\n",
" \"origin\": \"68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e\",\n",
" \"destination\": \"ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb\",\n",
" \"product\": \"clean\",\n",
" \"vessel_class\": \"oil_handymax_mr2\",\n",
" }\n",
Expand Down Expand Up @@ -92,14 +92,19 @@
" <th>suggested_tonnage</th>\n",
" <th>suggested_tonnage_overridden</th>\n",
" <th>avoid_zone</th>\n",
" <th>via_waypoint</th>\n",
" <th>rates</th>\n",
" <th>lumpsums</th>\n",
" <th>confidences</th>\n",
" <th>product</th>\n",
" <th>origin.id</th>\n",
" <th>...</th>\n",
" <th>origin.lon</th>\n",
" <th>origin_port.id</th>\n",
" <th>origin_port.lat</th>\n",
" <th>origin_port.lon</th>\n",
" <th>destination.id</th>\n",
" <th>destination.lat</th>\n",
" <th>destination.lon</th>\n",
" <th>destination_port.id</th>\n",
" <th>destination_port.lat</th>\n",
" <th>destination_port.lon</th>\n",
Expand All @@ -113,17 +118,22 @@
" <td>85000.0</td>\n",
" <td>False</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" <td>[{'date': '2024-01-01', 'breakdown': [{'type':...</td>\n",
" <td>[{'date': '2024-01-01', 'breakdown': [{'type':...</td>\n",
" <td>[{'date': '2024-01-01', 'value': 2}, {'date': ...</td>\n",
" <td>crude</td>\n",
" <td>7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030e...</td>\n",
" <td>...</td>\n",
" <td>-95.14733</td>\n",
" <td>7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030e...</td>\n",
" <td>29.71926</td>\n",
" <td>-95.14733</td>\n",
" <td>68faf65af1345067f11dc6723b8da32f00e304a6f33c00...</td>\n",
" <td>51.90924</td>\n",
" <td>4.27941</td>\n",
" <td>68faf65af1345067f11dc6723b8da32f00e304a6f33c00...</td>\n",
" <td>51.90924</td>\n",
" <td>4.27941</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
Expand All @@ -132,30 +142,36 @@
" <td>37000.0</td>\n",
" <td>False</td>\n",
" <td>None</td>\n",
" <td>None</td>\n",
" <td>[{'date': '2024-01-01', 'breakdown': [{'type':...</td>\n",
" <td>[{'date': '2024-01-01', 'breakdown': [{'type':...</td>\n",
" <td>[{'date': '2024-01-01', 'value': 3}, {'date': ...</td>\n",
" <td>clean</td>\n",
" <td>68faf65af1345067f11dc6723b8da32f00e304a6f33c00...</td>\n",
" <td>...</td>\n",
" <td>4.27941</td>\n",
" <td>68faf65af1345067f11dc6723b8da32f00e304a6f33c00...</td>\n",
" <td>51.90924</td>\n",
" <td>4.27941</td>\n",
" <td>ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da...</td>\n",
" <td>40.68878</td>\n",
" <td>-74.05066</td>\n",
" <td>ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da...</td>\n",
" <td>40.68878</td>\n",
" <td>-74.05066</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>2 rows × 21 columns</p>\n",
"</div>"
],
"text/plain": [
" vessel_class max_dwt suggested_tonnage \\\n",
"0 oil_aframax_lr2 119999.0 85000.0 \n",
"1 oil_handymax_mr2 54999.0 37000.0 \n",
"\n",
" suggested_tonnage_overridden avoid_zone via_waypoint \\\n",
"0 False None None \n",
"1 False None None \n",
" suggested_tonnage_overridden avoid_zone \\\n",
"0 False None \n",
"1 False None \n",
"\n",
" rates \\\n",
"0 [{'date': '2024-01-01', 'breakdown': [{'type':... \n",
Expand All @@ -169,17 +185,31 @@
"0 [{'date': '2024-01-01', 'value': 2}, {'date': ... crude \n",
"1 [{'date': '2024-01-01', 'value': 3}, {'date': ... clean \n",
"\n",
" origin_port.id origin_port.lat \\\n",
"0 7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030e... 29.71926 \n",
"1 68faf65af1345067f11dc6723b8da32f00e304a6f33c00... 51.90924 \n",
" origin.id ... origin.lon \\\n",
"0 7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030e... ... -95.14733 \n",
"1 68faf65af1345067f11dc6723b8da32f00e304a6f33c00... ... 4.27941 \n",
"\n",
" origin_port.id origin_port.lat \\\n",
"0 7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030e... 29.71926 \n",
"1 68faf65af1345067f11dc6723b8da32f00e304a6f33c00... 51.90924 \n",
"\n",
" origin_port.lon destination_port.id \\\n",
" origin_port.lon destination.id \\\n",
"0 -95.14733 68faf65af1345067f11dc6723b8da32f00e304a6f33c00... \n",
"1 4.27941 ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da... \n",
"\n",
" destination_port.lat destination_port.lon \n",
"0 51.90924 4.27941 \n",
"1 40.68878 -74.05066 "
" destination.lat destination.lon \\\n",
"0 51.90924 4.27941 \n",
"1 40.68878 -74.05066 \n",
"\n",
" destination_port.id destination_port.lat \\\n",
"0 68faf65af1345067f11dc6723b8da32f00e304a6f33c00... 51.90924 \n",
"1 ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da... 40.68878 \n",
"\n",
" destination_port.lon \n",
"0 4.27941 \n",
"1 -74.05066 \n",
"\n",
"[2 rows x 21 columns]"
]
},
"execution_count": 3,
Expand All @@ -197,13 +227,6 @@
"source": [
"That's it! You've successfully loaded data using the Vortexa SDK. Check out https://vortechsa.github.io/python-sdk/ for more examples"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
"# Get daily pricing for a Handymax MR2 clean route from Rotterdam to New York\n",
"routes = [\n",
" {\n",
" \"origin_port\": \"68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e\",\n",
" \"destination_port\": \"ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb\",\n",
" \"origin\": \"68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e\",\n",
" \"destination\": \"ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb\",\n",
" \"product\": \"clean\",\n",
" \"vessel_class\": \"oil_handymax_mr2\",\n",
" }\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"source": [
"# Get top destination ports for clean products from Houston using MR2 vessels\n",
"result = AnywhereFreightPricingTopPortsDestination().search(\n",
" origin_id=\"7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f\",\n",
" origin=\"7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f\",\n",
" vessel_class=\"oil_handymax_mr2\",\n",
" product=\"clean\",\n",
" unit=\"usd_per_tonne\",\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"source": [
"# Get top origin ports for clean products to Rotterdam using MR2 vessels\n",
"result = AnywhereFreightPricingTopPortsOrigin().search(\n",
" destination_id=\"68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e\",\n",
" destination=\"68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e\",\n",
" vessel_class=\"oil_handymax_mr2\",\n",
" product=\"clean\",\n",
" unit=\"usd_per_tonne\",\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
class TestAnywhereFreightPricingForecastExplanation(TestCaseUsingRealAPI):
def test_search_returns_data(self):
result = AnywhereFreightPricingForecastExplanation().search(
origin_port="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e",
destination_port="ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb",
origin="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e",
destination="ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb",
vessel_class="oil_handymax_mr2",
product="clean",
frequency="month",
Expand All @@ -19,8 +19,8 @@ def test_search_returns_data(self):

def test_search_to_df(self):
result = AnywhereFreightPricingForecastExplanation().search(
origin_port="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e",
destination_port="ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb",
origin="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e",
destination="ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb",
vessel_class="oil_handymax_mr2",
product="clean",
frequency="month",
Expand All @@ -33,8 +33,8 @@ def test_search_to_df(self):

def test_search_with_week_frequency(self):
result = AnywhereFreightPricingForecastExplanation().search(
origin_port="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e",
destination_port="ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb",
origin="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e",
destination="ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb",
vessel_class="oil_handymax_mr2",
product="clean",
frequency="week",
Expand All @@ -47,8 +47,8 @@ def test_search_with_week_frequency(self):

def test_search_with_avoid_zone(self):
result = AnywhereFreightPricingForecastExplanation().search(
origin_port="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e",
destination_port="ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb",
origin="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e",
destination="ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb",
vessel_class="oil_handymax_mr2",
product="clean",
frequency="month",
Expand All @@ -60,8 +60,8 @@ def test_search_with_avoid_zone(self):

def test_search_with_include_port_costs(self):
result = AnywhereFreightPricingForecastExplanation().search(
origin_port="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e",
destination_port="ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb",
origin="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e",
destination="ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb",
vessel_class="oil_handymax_mr2",
product="clean",
frequency="month",
Expand Down
Loading
Loading