map_bus

Contents

map_bus#

powerplantmatching.export.map_bus(df, buses)#

Assign a ‘bus’ column to the dataframe based on a list of coordinates.

Parameters:
  • df (pd.DataFrame) – power plant list with coordinates ‘lat’ and ‘lon’

  • buses (pd.DataFrame) – bus list with coordites ‘x’ and ‘y’

Return type:

DataFrame with an extra column ‘bus’ indicating the nearest bus.