Skip to content

Commit

Permalink
much better
Browse files Browse the repository at this point in the history
  • Loading branch information
wumpus committed Apr 7, 2021
1 parent d0839eb commit 2cffe0b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions scripts/make-jumbo-webpage.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@
stuff['stations'] = stations

# XXX need to read trackrank.csv to compute these
stuff['trackmin'] = 0.4
stuff['trackmax'] = 0.8
stuff['trackmin'] = 0.55
stuff['trackmax'] = 0.75

template = env.get_template('index.html.template')
with open(d + '/index.html', 'w') as f:
Expand Down
2 changes: 1 addition & 1 deletion templates/index.html.template
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
if (IsNumeric(d) && ! Number.isInteger(d - 0)) {
var e = Math.max({{stuff.trackmin}}, d);
e = Math.min({{stuff.trackmax}}, e);
e = ({{stuff.trackmax}} - (e - {{stuff.trackmin}})) / {{stuff.trackmax}};
e = ({{stuff.trackmax}} - {{stuff.trackmin}} - (e - {{stuff.trackmin}})) / ({{stuff.trackmax}} - {{stuff.trackmin}});
return d3.interpolateRdYlGn(1.0 - e);
}
}
Expand Down

0 comments on commit 2cffe0b

Please sign in to comment.