Skip to content

Commit

Permalink
properly filter active riders
Browse files Browse the repository at this point in the history
  • Loading branch information
bmesuere committed May 5, 2024
1 parent 1094ce0 commit 72272ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/data/data.json.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const pastRaces = races.filter(race => new Date(race.date) < Date.now());
const teams = allData.clubs.map(team => ({ id: team.id, name: team.name.split(" - ").slice(0, 2).join(" - ") }));

// extract riders
const riders = allData.players.map(rider => {
const riders = allData.players.filter(d => d.active == 1).map(rider => {
const results = pastRaces.map(race => {
const result = rider.stats.find(stat => stat.matchId === race.id);
if (result) {
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ function scatter({width} = {}) {
y: {label: "Punten"},
color: {scheme: "Turbo", label: "Totaal aantal punten", range: [0.05, 0.95]},
marks: [
Plot.dot(riders.filter(d => d.value < 15), {
Plot.dot(riders, {
x: "value",
y: "total",
stroke: "total",
Expand Down

0 comments on commit 72272ba

Please sign in to comment.