prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  docs: improvements to the home page
  The Ibis project home page is better than it once was [citation needed], but
  can use some improvements. In particular, it'd be great if we could have an
  [interactive demo similar to
  DuckDB's](https://shell.duckdb.org/#queries=v0,%20%20-Create-table-from-Parquet-file%0ACREATE-TABLE-train_services-AS%0A----FROM-'s3%3A%2F%2Fduckdb%20blobs%2Ftrain_services.parquet'~,%20%20-Get-the-top%203-busiest-train-stations%0ASELECT-station_name%2C-count(*)-AS-num_services%0AFROM-train_services%0AGROUP-BY-ALL%0AORDER-BY-num_services-DESC%0ALIMIT-3~).
  This would required [PyArrow in
  Pyodide](https://github.com/pyodide/pyodide/issues/2933) as the last blocker, I
  think.
  
  Regardless, we should ensure the landing page answers to a new/prospective user:
  
  - What is Ibis?
  - Why should I use Ibis?
  - Confidence Ibis is a well-supported, production-ready library
  
  Unfortunately, this may involve more HTML/CSS than I'm conformtable doing but
  we'll figure something out.
  
  
  
  </issue>
  <code>
  [start of docs/backends_sankey.py]
  1 from __future__ import annotations
  2 
  3 import plotly.graph_objects as go
  4 
  5 
  6 def to_greyish(hex_code, grey_value=128):
  7     hex_code = hex_code.lstrip("#")
  8     r, g, b = int(hex_code[0:2], 16), int(hex_code[2:4], 16), int(hex_code[4:6], 16)
  9 
  10     new_r = (r + grey_value) // 2
  11     new_g = (g + grey_value) // 2
  12     new_b = (b + grey_value) // 2
  13 
  14     new_hex_code = f"#{new_r:02x}{new_g:02x}{new_b:02x}"
  15 
  16     return new_hex_code
  17 
  18 
  19 category_colors = {
  20     "Ibis API": "#7C65A0",
  21     "SQL": "#6A9BC9",
  22     "DataFrame": "#D58273",
  23 }
  24 
  25 backend_categories = {
  26     list(category_colors.keys())[1]: [
  27         "BigQuery",
  28         "ClickHouse",
  29         "DataFusion",
  30         "Druid",
  31         "DuckDB",
  32         "Exasol",
  33         "Flink",
  34         "Impala",
  35         "MSSQL",
  36         "MySQL",
  37         "Oracle",
  38         "PostgreSQL",
  39         "PySpark",
  40         "RisingWave",
  41         "Snowflake",
  42         "SQLite",
  43         "Trino",
  44     ],
  45     list(category_colors.keys())[2]: ["Dask", "pandas", "Polars"],
  46 }
  47 
  48 nodes, links = [], []
  49 node_index = {}
  50 
  51 nodes.append({"label": "Ibis API", "color": category_colors["Ibis API"]})
  52 node_index["Ibis API"] = 0
  53 
  54 idx = 1
  55 for category, backends in backend_categories.items():
  56     nodes.append({"label": category, "color": category_colors[category]})
  57     node_index[category] = idx
  58     links.append({"source": 0, "target": idx, "value": len(backends)})
  59     idx += 1
  60 
  61     for backend in backends:
  62         if backend not in node_index:
  63             nodes.append({"label": backend, "color": category_colors[category]})
  64             node_index[backend] = idx
  65             idx += 1
  66         links.append(
  67             {
  68                 "source": node_index[category],
  69                 "target": node_index[backend],
  70                 "value": 1,
  71             }
  72         )
  73 
  74 fig = go.Figure(
  75     data=[
  76         go.Sankey(
  77             node=dict(
  78                 pad=20,
  79                 thickness=20,
  80                 line=dict(color="grey", width=0.5),
  81                 label=[node["label"] for node in nodes],
  82                 color=[node["color"] for node in nodes],
  83             ),
  84             link=dict(
  85                 source=[link["source"] for link in links],
  86                 target=[link["target"] for link in links],
  87                 value=[link["value"] for link in links],
  88                 line=dict(color="grey", width=0.5),
  89                 color=[to_greyish(nodes[link["target"]]["color"]) for link in links],
  90             ),
  91         )
  92     ],
  93 )
  94 
  95 fig.update_layout(
  96     title_text="Ibis backend types",
  97     font_size=24,
  98     # font_family="Arial",
  99     title_font_size=30,
  100     margin=dict(l=30, r=30, t=80, b=30),
  101     template="plotly_dark",
  102 )
  103
  [end of docs/backends_sankey.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/docs/backends_sankey.py b/docs/backends_sankey.py
  --- a/docs/backends_sankey.py
  +++ b/docs/backends_sankey.py
  @@ -94,7 +94,7 @@
   
   fig.update_layout(
       title_text="Ibis backend types",
  -    font_size=24,
  +    font_size=20,
       # font_family="Arial",
       title_font_size=30,
       margin=dict(l=30, r=30, t=80, b=30),
  
verification_info: {"golden_diff": "diff --git a/docs/backends_sankey.py b/docs/backends_sankey.py\n--- a/docs/backends_sankey.py\n+++ b/docs/backends_sankey.py\n@@ -94,7 +94,7 @@\n \n fig.update_layout(\n     title_text=\"Ibis backend types\",\n-    font_size=24,\n+    font_size=20,\n     # font_family=\"Arial\",\n     title_font_size=30,\n     margin=dict(l=30, r=30, t=80, b=30),\n", "issue": "docs: improvements to the home page\nThe Ibis project home page is better than it once was [citation needed], but\ncan use some improvements. In particular, it'd be great if we could have an\n[interactive demo similar to\nDuckDB's](https://shell.duckdb.org/#queries=v0,%20%20-Create-table-from-Parquet-file%0ACREATE-TABLE-train_services-AS%0A----FROM-'s3%3A%2F%2Fduckdb%20blobs%2Ftrain_services.parquet'~,%20%20-Get-the-top%203-busiest-train-stations%0ASELECT-station_name%2C-count(*)-AS-num_services%0AFROM-train_services%0AGROUP-BY-ALL%0AORDER-BY-num_services-DESC%0ALIMIT-3~).\nThis would required [PyArrow in\nPyodide](https://github.com/pyodide/pyodide/issues/2933) as the last blocker, I\nthink.\n\nRegardless, we should ensure the landing page answers to a new/prospective user:\n\n- What is Ibis?\n- Why should I use Ibis?\n- Confidence Ibis is a well-supported, production-ready library\n\nUnfortunately, this may involve more HTML/CSS than I'm conformtable doing but\nwe'll figure something out.\n\n\n", "before_files": [{"content": "from __future__ import annotations\n\nimport plotly.graph_objects as go\n\n\ndef to_greyish(hex_code, grey_value=128):\n    hex_code = hex_code.lstrip(\"#\")\n    r, g, b = int(hex_code[0:2], 16), int(hex_code[2:4], 16), int(hex_code[4:6], 16)\n\n    new_r = (r + grey_value) // 2\n    new_g = (g + grey_value) // 2\n    new_b = (b + grey_value) // 2\n\n    new_hex_code = f\"#{new_r:02x}{new_g:02x}{new_b:02x}\"\n\n    return new_hex_code\n\n\ncategory_colors = {\n    \"Ibis API\": \"#7C65A0\",\n    \"SQL\": \"#6A9BC9\",\n    \"DataFrame\": \"#D58273\",\n}\n\nbackend_categories = {\n    list(category_colors.keys())[1]: [\n        \"BigQuery\",\n        \"ClickHouse\",\n        \"DataFusion\",\n        \"Druid\",\n        \"DuckDB\",\n        \"Exasol\",\n        \"Flink\",\n        \"Impala\",\n        \"MSSQL\",\n        \"MySQL\",\n        \"Oracle\",\n        \"PostgreSQL\",\n        \"PySpark\",\n        \"RisingWave\",\n        \"Snowflake\",\n        \"SQLite\",\n        \"Trino\",\n    ],\n    list(category_colors.keys())[2]: [\"Dask\", \"pandas\", \"Polars\"],\n}\n\nnodes, links = [], []\nnode_index = {}\n\nnodes.append({\"label\": \"Ibis API\", \"color\": category_colors[\"Ibis API\"]})\nnode_index[\"Ibis API\"] = 0\n\nidx = 1\nfor category, backends in backend_categories.items():\n    nodes.append({\"label\": category, \"color\": category_colors[category]})\n    node_index[category] = idx\n    links.append({\"source\": 0, \"target\": idx, \"value\": len(backends)})\n    idx += 1\n\n    for backend in backends:\n        if backend not in node_index:\n            nodes.append({\"label\": backend, \"color\": category_colors[category]})\n            node_index[backend] = idx\n            idx += 1\n        links.append(\n            {\n                \"source\": node_index[category],\n                \"target\": node_index[backend],\n                \"value\": 1,\n            }\n        )\n\nfig = go.Figure(\n    data=[\n        go.Sankey(\n            node=dict(\n                pad=20,\n                thickness=20,\n                line=dict(color=\"grey\", width=0.5),\n                label=[node[\"label\"] for node in nodes],\n                color=[node[\"color\"] for node in nodes],\n            ),\n            link=dict(\n                source=[link[\"source\"] for link in links],\n                target=[link[\"target\"] for link in links],\n                value=[link[\"value\"] for link in links],\n                line=dict(color=\"grey\", width=0.5),\n                color=[to_greyish(nodes[link[\"target\"]][\"color\"]) for link in links],\n            ),\n        )\n    ],\n)\n\nfig.update_layout(\n    title_text=\"Ibis backend types\",\n    font_size=24,\n    # font_family=\"Arial\",\n    title_font_size=30,\n    margin=dict(l=30, r=30, t=80, b=30),\n    template=\"plotly_dark\",\n)\n", "path": "docs/backends_sankey.py"}]}