Appending comments for gas_input_locations
This commit is contained in:
parent
1a7dd850f2
commit
0cb0ad528a
@ -27,8 +27,7 @@ def build_gas_input_locations(lng_fn, entry_fn, prod_fn, countries):
|
||||
# LNG terminals
|
||||
lng = gpd.read_file(lng_fn)
|
||||
|
||||
for index in lng.index:
|
||||
lng.CapacityInMtpa[index] = float(lng.CapacityInMtpa[index])
|
||||
lng.CapacityInMtpa = lng.CapacityInMtpa.astype(float)
|
||||
|
||||
# Entry points from outside the model scope
|
||||
entry = read_scigrid_gas(entry_fn)
|
||||
|
@ -28,17 +28,10 @@ if __name__ == "__main__":
|
||||
remove_country = ['Cyprus','Turkey']
|
||||
remove_terminal = ['Puerto de la Luz LNG Terminal','Gran Canaria LNG Terminal']
|
||||
|
||||
for index in df.index:
|
||||
if df.Status[index] in remove_status:
|
||||
df = df.drop([index])
|
||||
elif df.Country[index] in remove_country:
|
||||
df = df.drop([index])
|
||||
elif df.TerminalName[index] in remove_terminal:
|
||||
df = df.drop([index])
|
||||
elif df.CapacityInMtpa[index] == "--":
|
||||
df = df.drop([index])
|
||||
else:
|
||||
continue
|
||||
df = df.query("Status != 'Cancelled' \
|
||||
& Country != @remove_country \
|
||||
& TerminalName != @remove_terminal \
|
||||
& CapacityInMtpa != '--'")
|
||||
|
||||
geometry = gpd.points_from_xy(df['Longitude'], df['Latitude'])
|
||||
lng = gpd.GeoDataFrame(df, geometry=geometry, crs="EPSG:4326")
|
||||
|
Loading…
Reference in New Issue
Block a user