odysseus.utils package¶
Submodules¶
odysseus.utils.cost_utils module¶
- charging_station_lord_cost(costs)¶
- get_fuelcost_from_energy(fuel_type, fuel_costs, energy_mj)¶
- insert_scenario_costs(df, sim_scenario_conf, vehicles_cost_conf, poles_cost_conf)¶
- insert_sim_costs(df, sim_scenario_conf, fuel_costs, administrative_cost_conf, vehicles_cost_conf)¶
odysseus.utils.geospatial_utils module¶
- add_grouped_count_to_grid(grid, trips_locations, group_col, od_key, aggfunc='count')¶
- get_city_grid_as_gdf(total_bounds, crs, bin_side_length)¶
- get_city_grid_as_matrix(total_bounds, bin_side_length)¶
- get_od_distance(grid, origin_id, destination_id)¶
- get_random_point_from_linestring(linestring)¶
- get_random_point_from_shape(shape)¶
- miles_to_meters(miles)¶
- my_haversine(lon1, lat1, lon2, lat2)¶
odysseus.utils.time_utils module¶
- get_grouped_aggfunc(df, group_cols, stats_col, aggfuncs)¶
- get_grouped_resampled_aggfunc(df, group_cols, freq, stats_col, aggfuncs)¶
- get_grouped_resampled_count(df, group_cols, freq)¶
- get_grouped_resampled_count_aggfunc(df, group_cols, freq, aggfuncs)¶
- get_hourly_count_with_time_cols(trips_df_norm, start_or_end)¶
- get_hourly_mean_with_time_cols(df_norm, start_or_end, mean_col)¶
- get_resampled_aggfunc(df, freq, stats_col, aggfuncs)¶
- get_resampled_grouped_aggfunc(trips_df_norm, start_or_end, stats_col, time_categorical_col, freq, aggfunc)¶
- get_resampled_grouped_count_aggfunc(trips_df_norm, start_or_end, time_group_col, freq, aggfunc)¶
- get_time_group_columns(trips_df_norm)¶
- get_time_grouped_hourly_count(df_norm, start_or_end, which_df)¶
- get_time_grouped_hourly_mean(df_norm, start_or_end, which_df, mean_col)¶
- get_weekday_int_from_string(s)¶
- get_weekday_string_from_int(i)¶
- month_year_iter(start_month, start_year, end_month, end_year)¶
MonthYear Iterator. End month is included. :param start_month: :param start_year: :param end_month: :param end_year: :return:
- reshape_time_grouped_signature(time_grouped_signatures)¶
- update_req_time_info(booking_request)¶
- weekday2vec(weekdays)¶
Weekdays to one-hot vector :param weekdays: Array of integer weekdays, where Monday is 0 and Sunday is 6. :return: Array of one-hot vectors, representing weekdays.