Skip to content

Commit de31325

Browse files
Added distance unit to Shipment Analyzer
1 parent a43b260 commit de31325

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

pyloghub/shipment_analyzer.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def forward_shipment_analyzer(shipments: pd.DataFrame, cost_adjustment: pd.DataF
6363
parameters (Dict): Dictionary containing parameters for the analysis.
6464
Keys and their types:
6565
- consolidation (bool): Boolean flag to indicate if consolidation should be considered in the analysis.
66+
- distanceUnit (str): Distance unit "km" or "mi".
6667
6768
api_key (str): Log-hub API key for accessing the shipment analyzer service.
6869
@@ -157,7 +158,8 @@ def forward_shipment_analyzer_sample_data():
157158
surcharges_df = pd.read_excel(data_path, sheet_name='surcharges', usecols='A:C').fillna("")
158159

159160
parameters = {
160-
"consolidation": False
161+
"consolidation": False,
162+
"distanceUnit": "km"
161163
}
162164

163165
save_scenario = {
@@ -226,6 +228,7 @@ def reverse_shipment_analyzer(shipments: pd.DataFrame, cost_adjustment: pd.DataF
226228
parameters (Dict): Dictionary containing parameters for the analysis.
227229
Keys and their types:
228230
- consolidation (bool): Boolean flag to indicate if consolidation should be considered in the analysis.
231+
- distanceUnit (str): Distance unit "km" or "mi".
229232
230233
api_key (str): API key for accessing the reverse shipment analyzer service.
231234
@@ -322,7 +325,8 @@ def reverse_shipment_analyzer_sample_data():
322325
surcharges_df = pd.read_excel(data_path, sheet_name='surcharges', usecols='A:C').fillna("")
323326

324327
parameters = {
325-
"consolidation": False
328+
"consolidation": False,
329+
"distanceUnit": "km"
326330
}
327331

328332
save_scenario = {

0 commit comments

Comments
 (0)