fill_geoposition

fill_geoposition#

powerplantmatching.utils.fill_geoposition(df, use_saved_locations=True, saved_only=True, config=None)#

Fill missing ‘lat’ and ‘lon’ values. Uses geoparsing with the value given in ‘Name’, limits the search through value in ‘Country’. df must contain ‘Name’, ‘lat’, ‘lon’ and ‘Country’ as columns.

Parameters:
  • df (pandas.DataFrame) – DataFrame of power plants

  • use_saved_position (Boolean, default True) – Whether to firstly compare with cached results in powerplantmatching/data/parsed_locations.csv

  • saved_only (Boolean, default True) – Whether to only add geo-positions which are stored at pm.core._package_data(“parsed_locations.csv”)