prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Lat Long order is wrong in WKT example
  In regards to documentation of converting WKT format to geopandas GeoDataFrame, the order of LAT LONG is wrong.
  See #690 
  In the WKT POINT, you put the Lat first, amd then Long. It should be the opposite. 
  When plotting the WKT example, and comparing it to the simple Long Lat example, you can clearly see that the WKT points are not placed where they should be.
  
  From what I understand, WKT should follow the WGS84 standard.
  See for example: https://www.drupal.org/project/geo/issues/511370
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `examples/create_geopandas_from_pandas.py`
  Content:
  ```
  1 """
  2 Creating a GeoDataFrame from a DataFrame with coordinates
  3 ---------------------------------------------------------
  4 
  5 This example shows how to create a ``GeoDataFrame`` when starting from
  6 a *regular* ``DataFrame`` that has coordinates either WKT
  7 (`well-known text <https://en.wikipedia.org/wiki/Well-known_text>`_)
  8 format, or in
  9 two columns.
  10 
  11 """
  12 import pandas as pd
  13 import geopandas
  14 import matplotlib.pyplot as plt
  15 
  16 ###############################################################################
  17 # From longitudes and latitudes
  18 # =============================
  19 #
  20 # First, let's consider a ``DataFrame`` containing cities and their respective
  21 # longitudes and latitudes.
  22 
  23 df = pd.DataFrame(
  24     {'City': ['Buenos Aires', 'Brasilia', 'Santiago', 'Bogota', 'Caracas'],
  25      'Country': ['Argentina', 'Brazil', 'Chile', 'Colombia', 'Venezuela'],
  26      'Latitude': [-34.58, -15.78, -33.45, 4.60, 10.48],
  27      'Longitude': [-58.66, -47.91, -70.66, -74.08, -66.86]})
  28 
  29 ###############################################################################
  30 # A ``GeoDataFrame`` needs a ``shapely`` object. We use geopandas
  31 # ``points_from_xy()`` to transform **Longitude** and **Latitude** into a list
  32 # of ``shapely.Point`` objects and set it as a ``geometry`` while creating the
  33 # ``GeoDataFrame``. (note that ``points_from_xy()`` is an enhanced wrapper for
  34 # ``[Point(x, y) for x, y in zip(df.Longitude, df.Latitude)]``)
  35 
  36 gdf = geopandas.GeoDataFrame(
  37     df, geometry=geopandas.points_from_xy(df.Longitude, df.Latitude))
  38 
  39 
  40 ###############################################################################
  41 # ``gdf`` looks like this :
  42 
  43 print(gdf.head())
  44 
  45 ###############################################################################
  46 # Finally, we plot the coordinates over a country-level map.
  47 
  48 world = geopandas.read_file(geopandas.datasets.get_path('naturalearth_lowres'))
  49 
  50 # We restrict to South America.
  51 ax = world[world.continent == 'South America'].plot(
  52     color='white', edgecolor='black')
  53 
  54 # We can now plot our GeoDataFrame.
  55 gdf.plot(ax=ax, color='red')
  56 
  57 plt.show()
  58 
  59 ###############################################################################
  60 # From WKT format
  61 # ===============
  62 # Here, we consider a ``DataFrame`` having coordinates in WKT format.
  63 
  64 df = pd.DataFrame(
  65     {'City': ['Buenos Aires', 'Brasilia', 'Santiago', 'Bogota', 'Caracas'],
  66      'Country': ['Argentina', 'Brazil', 'Chile', 'Colombia', 'Venezuela'],
  67      'Coordinates': ['POINT(-34.58 -58.66)', 'POINT(-15.78 -47.91)',
  68                      'POINT(-33.45 -70.66)', 'POINT(4.60 -74.08)',
  69                      'POINT(10.48 -66.86)']})
  70 
  71 ###############################################################################
  72 # We use ``shapely.wkt`` sub-module to parse wkt format:
  73 from shapely import wkt
  74 
  75 df['Coordinates'] = df['Coordinates'].apply(wkt.loads)
  76 
  77 ###############################################################################
  78 #  The ``GeoDataFrame`` is constructed as follows :
  79 
  80 gdf = geopandas.GeoDataFrame(df, geometry='Coordinates')
  81 
  82 print(gdf.head())
  83
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/examples/create_geopandas_from_pandas.py b/examples/create_geopandas_from_pandas.py
  --- a/examples/create_geopandas_from_pandas.py
  +++ b/examples/create_geopandas_from_pandas.py
  @@ -51,7 +51,7 @@
   ax = world[world.continent == 'South America'].plot(
       color='white', edgecolor='black')
   
  -# We can now plot our GeoDataFrame.
  +# We can now plot our ``GeoDataFrame``.
   gdf.plot(ax=ax, color='red')
   
   plt.show()
  @@ -64,9 +64,9 @@
   df = pd.DataFrame(
       {'City': ['Buenos Aires', 'Brasilia', 'Santiago', 'Bogota', 'Caracas'],
        'Country': ['Argentina', 'Brazil', 'Chile', 'Colombia', 'Venezuela'],
  -     'Coordinates': ['POINT(-34.58 -58.66)', 'POINT(-15.78 -47.91)',
  -                     'POINT(-33.45 -70.66)', 'POINT(4.60 -74.08)',
  -                     'POINT(10.48 -66.86)']})
  +     'Coordinates': ['POINT(-58.66 -34.58)', 'POINT(-47.91 -15.78)',
  +                     'POINT(-70.66 -33.45)', 'POINT(-74.08 4.60)',
  +                     'POINT(-66.86 10.48)']})
   
   ###############################################################################
   # We use ``shapely.wkt`` sub-module to parse wkt format:
  @@ -80,3 +80,9 @@
   gdf = geopandas.GeoDataFrame(df, geometry='Coordinates')
   
   print(gdf.head())
  +
  +#################################################################################
  +# Again, we can plot our ``GeoDataFrame``.
  +gdf.plot(ax=ax, color='red')
  +
  +plt.show()
  
verification_info: {"golden_diff": "diff --git a/examples/create_geopandas_from_pandas.py b/examples/create_geopandas_from_pandas.py\n--- a/examples/create_geopandas_from_pandas.py\n+++ b/examples/create_geopandas_from_pandas.py\n@@ -51,7 +51,7 @@\n ax = world[world.continent == 'South America'].plot(\n     color='white', edgecolor='black')\n \n-# We can now plot our GeoDataFrame.\n+# We can now plot our ``GeoDataFrame``.\n gdf.plot(ax=ax, color='red')\n \n plt.show()\n@@ -64,9 +64,9 @@\n df = pd.DataFrame(\n     {'City': ['Buenos Aires', 'Brasilia', 'Santiago', 'Bogota', 'Caracas'],\n      'Country': ['Argentina', 'Brazil', 'Chile', 'Colombia', 'Venezuela'],\n-     'Coordinates': ['POINT(-34.58 -58.66)', 'POINT(-15.78 -47.91)',\n-                     'POINT(-33.45 -70.66)', 'POINT(4.60 -74.08)',\n-                     'POINT(10.48 -66.86)']})\n+     'Coordinates': ['POINT(-58.66 -34.58)', 'POINT(-47.91 -15.78)',\n+                     'POINT(-70.66 -33.45)', 'POINT(-74.08 4.60)',\n+                     'POINT(-66.86 10.48)']})\n \n ###############################################################################\n # We use ``shapely.wkt`` sub-module to parse wkt format:\n@@ -80,3 +80,9 @@\n gdf = geopandas.GeoDataFrame(df, geometry='Coordinates')\n \n print(gdf.head())\n+\n+#################################################################################\n+# Again, we can plot our ``GeoDataFrame``.\n+gdf.plot(ax=ax, color='red')\n+\n+plt.show()\n", "issue": "Lat Long order is wrong in WKT example\nIn regards to documentation of converting WKT format to geopandas GeoDataFrame, the order of LAT LONG is wrong.\r\nSee #690 \r\nIn the WKT POINT, you put the Lat first, amd then Long. It should be the opposite. \r\nWhen plotting the WKT example, and comparing it to the simple Long Lat example, you can clearly see that the WKT points are not placed where they should be.\r\n\r\nFrom what I understand, WKT should follow the WGS84 standard.\r\nSee for example: https://www.drupal.org/project/geo/issues/511370\n", "before_files": [{"content": "\"\"\"\nCreating a GeoDataFrame from a DataFrame with coordinates\n---------------------------------------------------------\n\nThis example shows how to create a ``GeoDataFrame`` when starting from\na *regular* ``DataFrame`` that has coordinates either WKT\n(`well-known text <https://en.wikipedia.org/wiki/Well-known_text>`_)\nformat, or in\ntwo columns.\n\n\"\"\"\nimport pandas as pd\nimport geopandas\nimport matplotlib.pyplot as plt\n\n###############################################################################\n# From longitudes and latitudes\n# =============================\n#\n# First, let's consider a ``DataFrame`` containing cities and their respective\n# longitudes and latitudes.\n\ndf = pd.DataFrame(\n    {'City': ['Buenos Aires', 'Brasilia', 'Santiago', 'Bogota', 'Caracas'],\n     'Country': ['Argentina', 'Brazil', 'Chile', 'Colombia', 'Venezuela'],\n     'Latitude': [-34.58, -15.78, -33.45, 4.60, 10.48],\n     'Longitude': [-58.66, -47.91, -70.66, -74.08, -66.86]})\n\n###############################################################################\n# A ``GeoDataFrame`` needs a ``shapely`` object. We use geopandas\n# ``points_from_xy()`` to transform **Longitude** and **Latitude** into a list\n# of ``shapely.Point`` objects and set it as a ``geometry`` while creating the\n# ``GeoDataFrame``. (note that ``points_from_xy()`` is an enhanced wrapper for\n# ``[Point(x, y) for x, y in zip(df.Longitude, df.Latitude)]``)\n\ngdf = geopandas.GeoDataFrame(\n    df, geometry=geopandas.points_from_xy(df.Longitude, df.Latitude))\n\n\n###############################################################################\n# ``gdf`` looks like this :\n\nprint(gdf.head())\n\n###############################################################################\n# Finally, we plot the coordinates over a country-level map.\n\nworld = geopandas.read_file(geopandas.datasets.get_path('naturalearth_lowres'))\n\n# We restrict to South America.\nax = world[world.continent == 'South America'].plot(\n    color='white', edgecolor='black')\n\n# We can now plot our GeoDataFrame.\ngdf.plot(ax=ax, color='red')\n\nplt.show()\n\n###############################################################################\n# From WKT format\n# ===============\n# Here, we consider a ``DataFrame`` having coordinates in WKT format.\n\ndf = pd.DataFrame(\n    {'City': ['Buenos Aires', 'Brasilia', 'Santiago', 'Bogota', 'Caracas'],\n     'Country': ['Argentina', 'Brazil', 'Chile', 'Colombia', 'Venezuela'],\n     'Coordinates': ['POINT(-34.58 -58.66)', 'POINT(-15.78 -47.91)',\n                     'POINT(-33.45 -70.66)', 'POINT(4.60 -74.08)',\n                     'POINT(10.48 -66.86)']})\n\n###############################################################################\n# We use ``shapely.wkt`` sub-module to parse wkt format:\nfrom shapely import wkt\n\ndf['Coordinates'] = df['Coordinates'].apply(wkt.loads)\n\n###############################################################################\n#  The ``GeoDataFrame`` is constructed as follows :\n\ngdf = geopandas.GeoDataFrame(df, geometry='Coordinates')\n\nprint(gdf.head())\n", "path": "examples/create_geopandas_from_pandas.py"}], "after_files": [{"content": "\"\"\"\nCreating a GeoDataFrame from a DataFrame with coordinates\n---------------------------------------------------------\n\nThis example shows how to create a ``GeoDataFrame`` when starting from\na *regular* ``DataFrame`` that has coordinates either WKT\n(`well-known text <https://en.wikipedia.org/wiki/Well-known_text>`_)\nformat, or in\ntwo columns.\n\n\"\"\"\nimport pandas as pd\nimport geopandas\nimport matplotlib.pyplot as plt\n\n###############################################################################\n# From longitudes and latitudes\n# =============================\n#\n# First, let's consider a ``DataFrame`` containing cities and their respective\n# longitudes and latitudes.\n\ndf = pd.DataFrame(\n    {'City': ['Buenos Aires', 'Brasilia', 'Santiago', 'Bogota', 'Caracas'],\n     'Country': ['Argentina', 'Brazil', 'Chile', 'Colombia', 'Venezuela'],\n     'Latitude': [-34.58, -15.78, -33.45, 4.60, 10.48],\n     'Longitude': [-58.66, -47.91, -70.66, -74.08, -66.86]})\n\n###############################################################################\n# A ``GeoDataFrame`` needs a ``shapely`` object. We use geopandas\n# ``points_from_xy()`` to transform **Longitude** and **Latitude** into a list\n# of ``shapely.Point`` objects and set it as a ``geometry`` while creating the\n# ``GeoDataFrame``. (note that ``points_from_xy()`` is an enhanced wrapper for\n# ``[Point(x, y) for x, y in zip(df.Longitude, df.Latitude)]``)\n\ngdf = geopandas.GeoDataFrame(\n    df, geometry=geopandas.points_from_xy(df.Longitude, df.Latitude))\n\n\n###############################################################################\n# ``gdf`` looks like this :\n\nprint(gdf.head())\n\n###############################################################################\n# Finally, we plot the coordinates over a country-level map.\n\nworld = geopandas.read_file(geopandas.datasets.get_path('naturalearth_lowres'))\n\n# We restrict to South America.\nax = world[world.continent == 'South America'].plot(\n    color='white', edgecolor='black')\n\n# We can now plot our ``GeoDataFrame``.\ngdf.plot(ax=ax, color='red')\n\nplt.show()\n\n###############################################################################\n# From WKT format\n# ===============\n# Here, we consider a ``DataFrame`` having coordinates in WKT format.\n\ndf = pd.DataFrame(\n    {'City': ['Buenos Aires', 'Brasilia', 'Santiago', 'Bogota', 'Caracas'],\n     'Country': ['Argentina', 'Brazil', 'Chile', 'Colombia', 'Venezuela'],\n     'Coordinates': ['POINT(-58.66 -34.58)', 'POINT(-47.91 -15.78)',\n                     'POINT(-70.66 -33.45)', 'POINT(-74.08 4.60)',\n                     'POINT(-66.86 10.48)']})\n\n###############################################################################\n# We use ``shapely.wkt`` sub-module to parse wkt format:\nfrom shapely import wkt\n\ndf['Coordinates'] = df['Coordinates'].apply(wkt.loads)\n\n###############################################################################\n#  The ``GeoDataFrame`` is constructed as follows :\n\ngdf = geopandas.GeoDataFrame(df, geometry='Coordinates')\n\nprint(gdf.head())\n\n#################################################################################\n# Again, we can plot our ``GeoDataFrame``.\ngdf.plot(ax=ax, color='red')\n\nplt.show()\n", "path": "examples/create_geopandas_from_pandas.py"}]}