map_country_bus

map_country_bus#

powerplantmatching.export.map_country_bus(df, buses)#

Assign a ‘bus’ column based on a list of coordinates and countries.

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

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

Return type:

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