prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  line_percent.py does not work offline
  We need all examples to work offline. Currently ``line_percent.py`` uses ``pd.read_json`` from a URL.
  
  The example should probably use a URL plus a filter.
  
  </issue>
  <code>
  [start of altair/examples/boxplot_max_min.py]
  1 """
  2 Box Plot with Min/Max Whiskers
  3 ------------------------------
  4 This example shows how to make a basic box plot using US Population data from 2000.
  5 """
  6 # category: other charts
  7 import altair as alt
  8 from vega_datasets import data
  9 
  10 source = data.population()
  11 
  12 base = alt.Chart(source)
  13 
  14 # Define aggregate fields
  15 lower_box = 'q1(people):Q'
  16 lower_whisker = 'min(people):Q'
  17 upper_box = 'q3(people):Q'
  18 upper_whisker = 'max(people):Q'
  19 
  20 # Compose each layer individually
  21 lower_plot = base.mark_rule().encode(
  22     y=alt.Y(lower_whisker, title="population"),
  23     y2=lower_box,
  24     x='age:O'
  25 )
  26 
  27 middle_plot = base.mark_bar(size=5.0).encode(
  28     y=lower_box,
  29     y2=upper_box,
  30     x='age:O'
  31 )
  32 
  33 upper_plot = base.mark_rule().encode(
  34     y=upper_whisker,
  35     y2=upper_box,
  36     x='age:O'
  37 )
  38 
  39 middle_tick = base.mark_tick(
  40     color='white',
  41     size=5.0
  42 ).encode(
  43     y='median(people):Q',
  44     x='age:O',
  45 )
  46 
  47 lower_plot + middle_plot + upper_plot + middle_tick
  48
  [end of altair/examples/boxplot_max_min.py]
  [start of altair/examples/line_percent.py]
  1 """
  2 Line Chart with Percent axis
  3 ----------------------------
  4 This example shows how to format the tick labels of the y-axis of a chart as percentages.
  5 """
  6 # category: line charts
  7 import altair as alt
  8 import pandas as pd
  9 from vega_datasets import data
  10 
  11 source = pd.read_json(data.jobs.url)
  12 welders = source[source.job == 'Welder']
  13 
  14 alt.Chart(welders).mark_line().encode(
  15     alt.X('year:O'),
  16     alt.Y('perc:Q', axis=alt.Axis(format='%')),
  17     color='sex:N'
  18 )
  19
  [end of altair/examples/line_percent.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/altair/examples/boxplot_max_min.py b/altair/examples/boxplot_max_min.py
  --- a/altair/examples/boxplot_max_min.py
  +++ b/altair/examples/boxplot_max_min.py
  @@ -7,7 +7,7 @@
   import altair as alt
   from vega_datasets import data
   
  -source = data.population()
  +source = data.population.url
   
   base = alt.Chart(source)
   
  diff --git a/altair/examples/line_percent.py b/altair/examples/line_percent.py
  --- a/altair/examples/line_percent.py
  +++ b/altair/examples/line_percent.py
  @@ -5,14 +5,14 @@
   """
   # category: line charts
   import altair as alt
  -import pandas as pd
   from vega_datasets import data
   
  -source = pd.read_json(data.jobs.url)
  -welders = source[source.job == 'Welder']
  +source = data.jobs.url
   
  -alt.Chart(welders).mark_line().encode(
  +alt.Chart(source).mark_line().encode(
       alt.X('year:O'),
       alt.Y('perc:Q', axis=alt.Axis(format='%')),
       color='sex:N'
  +).transform_filter(
  +    alt.datum.job == 'Welder'
   )
  
verification_info: {"golden_diff": "diff --git a/altair/examples/boxplot_max_min.py b/altair/examples/boxplot_max_min.py\n--- a/altair/examples/boxplot_max_min.py\n+++ b/altair/examples/boxplot_max_min.py\n@@ -7,7 +7,7 @@\n import altair as alt\n from vega_datasets import data\n \n-source = data.population()\n+source = data.population.url\n \n base = alt.Chart(source)\n \ndiff --git a/altair/examples/line_percent.py b/altair/examples/line_percent.py\n--- a/altair/examples/line_percent.py\n+++ b/altair/examples/line_percent.py\n@@ -5,14 +5,14 @@\n \"\"\"\n # category: line charts\n import altair as alt\n-import pandas as pd\n from vega_datasets import data\n \n-source = pd.read_json(data.jobs.url)\n-welders = source[source.job == 'Welder']\n+source = data.jobs.url\n \n-alt.Chart(welders).mark_line().encode(\n+alt.Chart(source).mark_line().encode(\n     alt.X('year:O'),\n     alt.Y('perc:Q', axis=alt.Axis(format='%')),\n     color='sex:N'\n+).transform_filter(\n+    alt.datum.job == 'Welder'\n )\n", "issue": "line_percent.py does not work offline\nWe need all examples to work offline. Currently ``line_percent.py`` uses ``pd.read_json`` from a URL.\r\n\r\nThe example should probably use a URL plus a filter.\n", "before_files": [{"content": "\"\"\"\nBox Plot with Min/Max Whiskers\n------------------------------\nThis example shows how to make a basic box plot using US Population data from 2000.\n\"\"\"\n# category: other charts\nimport altair as alt\nfrom vega_datasets import data\n\nsource = data.population()\n\nbase = alt.Chart(source)\n\n# Define aggregate fields\nlower_box = 'q1(people):Q'\nlower_whisker = 'min(people):Q'\nupper_box = 'q3(people):Q'\nupper_whisker = 'max(people):Q'\n\n# Compose each layer individually\nlower_plot = base.mark_rule().encode(\n    y=alt.Y(lower_whisker, title=\"population\"),\n    y2=lower_box,\n    x='age:O'\n)\n\nmiddle_plot = base.mark_bar(size=5.0).encode(\n    y=lower_box,\n    y2=upper_box,\n    x='age:O'\n)\n\nupper_plot = base.mark_rule().encode(\n    y=upper_whisker,\n    y2=upper_box,\n    x='age:O'\n)\n\nmiddle_tick = base.mark_tick(\n    color='white',\n    size=5.0\n).encode(\n    y='median(people):Q',\n    x='age:O',\n)\n\nlower_plot + middle_plot + upper_plot + middle_tick\n", "path": "altair/examples/boxplot_max_min.py"}, {"content": "\"\"\"\nLine Chart with Percent axis\n----------------------------\nThis example shows how to format the tick labels of the y-axis of a chart as percentages.\n\"\"\"\n# category: line charts\nimport altair as alt\nimport pandas as pd\nfrom vega_datasets import data\n\nsource = pd.read_json(data.jobs.url)\nwelders = source[source.job == 'Welder']\n\nalt.Chart(welders).mark_line().encode(\n    alt.X('year:O'),\n    alt.Y('perc:Q', axis=alt.Axis(format='%')),\n    color='sex:N'\n)\n", "path": "altair/examples/line_percent.py"}]}