# I've replaced table data with a csv and it doesn't work

**URL:** <https://discourse.processing.org/t/ive-replaced-table-data-with-a-csv-and-it-doesnt-work/21941>\
**Category:** Coding Questions\
**Created:** [June 17, 2020, 6:35am UTC](https://discourse.processing.org/t/ive-replaced-table-data-with-a-csv-and-it-doesnt-work/21941 "2020-06-17T06:35:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Quorum](https://avatars.discourse-cdn.com/v4/letter/q/ad7895/32.png) [@Quorum](https://discourse.processing.org/u/Quorum)\
**Post date:** [June 17, 2020, 6:35am UTC](https://discourse.processing.org/t/ive-replaced-table-data-with-a-csv-and-it-doesnt-work/21941/1 "2020-06-17T06:35:40Z")

</div>

I’ve replaced the first row of the code you can see below to replace this data with a csv, but it doesn’t work:

```auto
let games = [
  ['Boston Celtics', '105', 'Philadelphia 76ers', '87', ''],
  ['Philadelphia 76ers', '127', 'Chicago Bulls', '108', ''],
  ['Philadelphia 76ers', '116', 'Orlando Magic', '115', ''],
  ['Detroit Pistons', '133', 'Philadelphia 76ers', '132', 'OT'],
  ['Milwaukee Bucks', '123', 'Philadelphia 76ers', '108', ''],
  ['Philadelphia 76ers', '105', 'Charlotte Hornets', '103', ''],
  ['Philadelphia 76ers', '113', 'Atlanta Hawks', '92', ''],
  ['Toronto Raptors', '129', 'Philadelphia 76ers', '112', ''],
  ['Philadelphia 76ers', '122', 'Los Angeles Clippers', '113', ''],
  ['Philadelphia 76ers', '109', 'Detroit Pistons', '99', ''],
  ['Brooklyn Nets', '122', 'Philadelphia 76ers', '97', ''],
  ['Indiana Pacers', '94', 'Philadelphia 76ers', '100', ''],
  ['Philadelphia 76ers', '133', 'Charlotte Hornets', '132', 'OT'],
  ['Memphis Grizzlies', '112', 'Philadelphia 76ers', '106', 'OT'],
  ['Miami Heat', '114', 'Philadelphia 76ers', '124', ''],
  ['Orlando Magic', '111', 'Philadelphia 76ers', '106', ''],
  ['Philadelphia 76ers', '113', 'Utah Jazz', '107', ''],
  ['Charlotte Hornets', '119', 'Philadelphia 76ers', '122', 'OT'],
  ['Philadelphia 76ers', '119', 'Phoenix Suns', '114', ''],
  ['Philadelphia 76ers', '121', 'New Orleans Pelicans', '120', ''],
  ['Philadelphia 76ers', '112', 'Cleveland Cavaliers', '121', ''],
  ['Brooklyn Nets', '125', 'Philadelphia 76ers', '127', ''],
  ['Philadelphia 76ers', '117', 'New York Knicks', '91', ''],
  ['Philadelphia 76ers', '123', 'Washington Wizards', '98', ''],
  ['Philadelphia 76ers', '103', 'Memphis Grizzlies', '95', ''],
  ['Toronto Raptors', '113', 'Philadelphia 76ers', '102', ''],
  ['Detroit Pistons', '111', 'Philadelphia 76ers', '117', ''],
  ['Philadelphia 76ers', '116', 'Detroit Pistons', '102', ''],
  ['Philadelphia 76ers', '124', 'Brooklyn Nets', '127', ''],
  ['Philadelphia 76ers', '101', 'Indiana Pacers', '113', ''],
  ['Cleveland Cavaliers', '105', 'Philadelphia 76ers', '128', ''],
  ['San Antonio Spurs', '123', 'Philadelphia 76ers', '96', ''],
  ['Philadelphia 76ers', '131', 'New York Knicks', '109', ''],
  ['Philadelphia 76ers', '126', 'Toronto Raptors', '101', ''],
  ['Boston Celtics', '121', 'Philadelphia 76ers', '114', 'OT'],
  ['Utah Jazz', '97', 'Philadelphia 76ers', '114', ''],
  ['Portland Trail Blazers', '129', 'Philadelphia 76ers', '95', ''],
  ['Los Angeles Clippers', '113', 'Philadelphia 76ers', '119', ''],
  ['Phoenix Suns', '127', 'Philadelphia 76ers', '132', ''],
  ['Philadelphia 76ers', '106', 'Dallas Mavericks', '100', ''],
  ['Philadelphia 76ers', '132', 'Washington Wizards', '115', ''],
  ['Washington Wizards', '123', 'Philadelphia 76ers', '106', ''],
  ['Philadelphia 76ers', '121', 'Atlanta Hawks', '123', ''],
  ['New York Knicks', '105', 'Philadelphia 76ers', '108', ''],
  ['Philadelphia 76ers', '149', 'Minnesota Timberwolves', '107', ''],
  ['Indiana Pacers', '96', 'Philadelphia 76ers', '120', ''],
  ['Philadelphia 76ers', '115', 'Oklahoma City Thunder', '117', ''],
  ['Philadelphia 76ers', '121', 'Houston Rockets', '93', ''],
  ['Philadelphia 76ers', '122', 'San Antonio Spurs', '120', ''],
  ['Denver Nuggets', '126', 'Philadelphia 76ers', '110', ''],
  ['Los Angeles Lakers', '105', 'Philadelphia 76ers', '121', ''],
  ['Golden State Warriors', '104', 'Philadelphia 76ers', '113', ''],
  ['Sacramento Kings', '115', 'Philadelphia 76ers', '108', ''],
  ['Philadelphia 76ers', '107', 'Toronto Raptors', '119', ''],
  ['Philadelphia 76ers', '117', 'Denver Nuggets', '110', ''],
  ['Philadelphia 76ers', '143', 'Los Angeles Lakers', '120', ''],
  ['Philadelphia 76ers', '109', 'Boston Celtics', '112', ''],
  ['New York Knicks', '111', 'Philadelphia 76ers', '126', ''],
  ['Philadelphia 76ers', '106', 'Miami Heat', '102', ''],
  ['Philadelphia 76ers', '115', 'Portland Trail Blazers', '130', ''],
  ['New Orleans Pelicans', '110', 'Philadelphia 76ers', '111', ''],
  ['Oklahoma City Thunder', '104', 'Philadelphia 76ers', '108', ''],
  ['Philadelphia 76ers', '117', 'Golden State Warriors', '120', ''],
  ['Philadelphia 76ers', '114', 'Orlando Magic', '106', ''],
  ['Chicago Bulls', '108', 'Philadelphia 76ers', '107', ''],
  ['Houston Rockets', '107', 'Philadelphia 76ers', '91', ''],
  ['Philadelphia 76ers', '106', 'Indiana Pacers', '89', ''],
  ['Philadelphia 76ers', '106', 'Cleveland Cavaliers', '99', ''],
  ['Philadelphia 76ers', '123', 'Sacramento Kings', '114', ''],
  ['Milwaukee Bucks', '125', 'Philadelphia 76ers', '130', ''],
  ['Charlotte Hornets', '114', 'Philadelphia 76ers', '118', ''],
  ['Philadelphia 76ers', '118', 'Boston Celtics', '115', ''],
  ['Atlanta Hawks', '129', 'Philadelphia 76ers', '127', ''],
  ['Orlando Magic', '119', 'Philadelphia 76ers', '98', ''],
  ['Philadelphia 76ers', '123', 'Brooklyn Nets', '110', ''],
  ['Minnesota Timberwolves', '109', 'Philadelphia 76ers', '118', ''],
  ['Dallas Mavericks', '122', 'Philadelphia 76ers', '102', ''],
  ['Atlanta Hawks', '130', 'Philadelphia 76ers', '122', ''],
  ['Philadelphia 76ers', '122', 'Milwaukee Bucks', '128', ''],
  ['Chicago Bulls', '96', 'Philadelphia 76ers', '116', ''],
  ['Miami Heat', '122', 'Philadelphia 76ers', '99', ''],
  ['Philadelphia 76ers', '125', 'Chicago Bulls', '109', ''],
  ['Philadelphia 76ers', '102', 'Brooklyn Nets', '111', ''],
  ['Philadelphia 76ers', '145', 'Brooklyn Nets', '123', ''],
  ['Brooklyn Nets', '115', 'Philadelphia 76ers', '131', ''],
  ['Brooklyn Nets', '108', 'Philadelphia 76ers', '112', ''],
  ['Philadelphia 76ers', '122', 'Brooklyn Nets', '100', ''],
  ['Toronto Raptors', '108', 'Philadelphia 76ers', '95', ''],
  ['Toronto Raptors', '89', 'Philadelphia 76ers', '94', '']
];
let bubbles = [];
let vertices = [];
let alphaS = 0.6;
let colors = ['rgba(234, 21, 67, 0.6)', 'rgba(1, 96, 173, 0.6)'];
let colorsChange = ['rgba(234, 21, 67,' + alphaS + ')', 'rgba(1, 96, 173,' + alphaS + ')'];
let hovered = [];
let scoreboard = [];
let scoreboardData = [];
let legends = [];

```

with this data:

```auto
let games = loadTable('Games.csv', 'csv', 'header');
let bubbles = [];
let vertices = [];
let alphaS = 0.6;
let colors = ['rgba(234, 21, 67, 0.6)', 'rgba(1, 96, 173, 0.6)'];
let colorsChange = ['rgba(234, 21, 67,' + alphaS + ')', 'rgba(1, 96, 173,' + alphaS + ')'];
let hovered = [];
let scoreboard = [];
let scoreboardData = [];
let legends = [];

```

---

<div class="post-metadata">

**Author:** ![Sven](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sven/32/8293_2.png) [@Sven](https://discourse.processing.org/u/Sven)\
**Post date:** [June 17, 2020, 11:29am UTC](https://discourse.processing.org/t/ive-replaced-table-data-with-a-csv-and-it-doesnt-work/21941/2 "2020-06-17T11:29:03Z")

</div>

Hello,

I would love to help but need a complete example to do so – full source code and the file `Game.csv`. Preferably hosted on [https://editor.p5js.org](https://editor.p5js.org) or another web-based p5.js environment. If you share that I’ll do my best to troubleshoot together with you. 🙂
