pypsa-meets-earth / pypsa-earth-sec

GNU General Public License v3.0
19 stars 16 forks source link

add the airports workflow #231

Closed hazemakhalek closed 10 months ago

hazemakhalek commented 10 months ago

Closes # (if applicable).

Changes proposed in this Pull Request

Checklist

Eddy-JV commented 10 months ago

I have the following comments:

  1. Why did you comment out: keeping only large and medium airport (see below)?
    # Keep only airports that are of type medium and large
    # df = df.loc[df["type"].isin(["large_airport", "medium_airport"])]

Originally, the code keeps only medium and large airports and make the weighting like this (Please note that the last line must be equal to 2 and not 3:

    # Keep only airports that are of type medium and large
    df = df.loc[df["type"].isin(["large_airport", "medium_airport"])]

    df.insert(2, "airport_size_nr", 1)
    df.loc[df["type"].isin(["medium_airport"]), "airport_size_nr"] = 1
    df.loc[df["type"].isin(["large_airport"]), "airport_size_nr"] = 2
  1. If you did this on purpose, then we have to adapt the following snippet in the script because we have to deal with these types of airports for the weighting and remove the colsed ones: ['small_airport', 'heliport', 'seaplane_base', 'medium_airport', 'large_airport', 'closed'].
    df.insert(2, "airport_size_nr", 1)
    df.loc[df["type"].isin(["medium_airport"]), "airport_size_nr"] = 1
    df.loc[df["type"].isin(["large_airport"]), "airport_size_nr"] = 3

I suggest, that we keep only medium and large airports, as we originally did.

hazemakhalek commented 10 months ago

3. pt the following snippet in the script because we have to deal with these types of airports for the weighting and remove the colsed ones: ['small_airport', 'heliport', 'seaplane_base', 'medium_airport', 'large_airport', 'closed'].

I did not intend to keep the small one, that was commented out by mistake. I changed the sizing factor however to 3. Judging by a few checks in 3 countries, the large airports are usually much larger than the medium ones. I can set that as a config parameter to change accordingly