# Please help! Processing is showing loadTable is not defined?

**URL:** https://discourse.processing.org/t/please-help-processing-is-showing-loadtable-is-not-defined/30816
**Category:** Beginners
**Created:** [June 20, 2021, 5:58pm UTC](https://discourse.processing.org/t/please-help-processing-is-showing-loadtable-is-not-defined/30816 "2021-06-20T17:58:15Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![ShenpaiSharma](https://avatars.discourse-cdn.com/v4/letter/s/ce73a5/32.png) [@ShenpaiSharma](https://discourse.processing.org/u/ShenpaiSharma)
#### Post date: [June 20, 2021, 5:58pm UTC](https://discourse.processing.org/t/please-help-processing-is-showing-loadtable-is-not-defined/30816/1 "2021-06-20T17:58:15Z")

</div>

Want to import csv data in Processing but it is showing loadTable is not defined…

Error:

```auto
jQuery.Deferred exception: loadTable is not defined

ReferenceError: loadTable is not defined
at Processing.Processing.setup (eval at attach (https://preview.openprocessing.org/assets/js/vendor/processingjsReleases/processing-1.6.6.js?version=7.42:885:22), <anonymous>:15:4)
at executeSketch (https://preview.openprocessing.org/assets/js/vendor/processingjsReleases/processing-1.6.6.js?version=7.42:21596:24)
at new Processing.Processing (https://preview.openprocessing.org/assets/js/vendor/processingjsReleases/processing-1.6.6.js?version=7.42:21623:7)
at HTMLDocument.<anonymous> (https://preview.openprocessing.org/sketch/preview/?random=0.8655151487995074:44:6)
at l (https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js:2:29375)
at c (https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js:2:29677)

undefined

Uncaught ReferenceError: loadTable is not defined[Show stack](https://openprocessing.org/sketch/1221838#)

```

---

<div class="post-metadata">

### Author: ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)
#### Post date: [June 20, 2021, 6:19pm UTC](https://discourse.processing.org/t/please-help-processing-is-showing-loadtable-is-not-defined/30816/2 "2021-06-20T18:19:54Z")

</div>

Show your code/ link

---

<div class="post-metadata">

### Author: ![ShenpaiSharma](https://avatars.discourse-cdn.com/v4/letter/s/ce73a5/32.png) [@ShenpaiSharma](https://discourse.processing.org/u/ShenpaiSharma)
#### Post date: [June 20, 2021, 6:28pm UTC](https://discourse.processing.org/t/please-help-processing-is-showing-loadtable-is-not-defined/30816/3 "2021-06-20T18:28:14Z")

</div>

```auto
float angle;

float lat = -37.8136;
float lon = 144.9631;

Table table;

void setup() {
	size(600, 600, P3D);
	table = loadTable("https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/significant_day.csv", "csv", "header");
}

void draw() {
	background(51);
	translate(width/2, height/2);
	
	rotateY(angle);
	angle += 0.05;
	
	lights();
	fill(200);
	noStroke();
	float r = 200;
	sphere(r);
	
	for (TableRow row : table.rows()) {
		float lat = row.getFloat("latitude");
		float lon = row.getFloat("longitude");
		float mag = row.getFloat("mag");
		println(lat, lon, mag);
	}
	
	float theta = radians(lat) + PI/2;
	float phi = radians(lon) + PI;
	float x = r * sin(theta) * cos(phi);
	float y = -r * sin(theta) * sin(phi);
	float z = r * cos(theta);
	
	translate(x, y, z);
	box(10);
}

```

@Chrisir I want to work with data visualization on the globe, and my work is very similar to mapping these earthquake data on the globe, but I cannot load any CSV file into it.

---

<div class="post-metadata">

### Author: ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)
#### Post date: [June 20, 2021, 6:51pm UTC](https://discourse.processing.org/t/please-help-processing-is-showing-loadtable-is-not-defined/30816/4 "2021-06-20T18:51:57Z")

</div>

Hello,

Try this:  
table = `loadTable("https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/significant_day.csv", "header");`

`:)`

---

<div class="post-metadata">

### Author: ![ShenpaiSharma](https://avatars.discourse-cdn.com/v4/letter/s/ce73a5/32.png) [@ShenpaiSharma](https://discourse.processing.org/u/ShenpaiSharma)
#### Post date: [June 20, 2021, 6:55pm UTC](https://discourse.processing.org/t/please-help-processing-is-showing-loadtable-is-not-defined/30816/5 "2021-06-20T18:55:21Z")

</div>

Hi @glv I initially tried the same thing but still it is showing the same error.

---

<div class="post-metadata">

### Author: ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)
#### Post date: [June 20, 2021, 7:01pm UTC](https://discourse.processing.org/t/please-help-processing-is-showing-loadtable-is-not-defined/30816/6 "2021-06-20T19:01:19Z")

</div>

Hello,

Both of these work for me:

```auto
table = loadTable("https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/significant_day.csv", "header");

```

I downloaded and put in the sketch folder in _/data_:

```auto
table = loadTable("significant_day.csv", "header");

```

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/0/0e5b6496c201a9a7a974169fd485b98170c5967f.png)

Try running this in Processing on the desktop.

You may not be able to access data from from a URL in OpenProcessing; I have not been able to last time I tried.

`:)`

---

<div class="post-metadata">

### Author: ![ShenpaiSharma](https://avatars.discourse-cdn.com/v4/letter/s/ce73a5/32.png) [@ShenpaiSharma](https://discourse.processing.org/u/ShenpaiSharma)
#### Post date: [June 20, 2021, 7:05pm UTC](https://discourse.processing.org/t/please-help-processing-is-showing-loadtable-is-not-defined/30816/7 "2021-06-20T19:05:51Z")

</div>

Hi @glv I am new with processing well I am using processing online editor maybe that’s why it’s not working for me.

> **[My Sketch - OpenProcessing](https://openprocessing.org/sketch/1221838)**

---

<div class="post-metadata">

### Author: ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)
#### Post date: [June 20, 2021, 7:06pm UTC](https://discourse.processing.org/t/please-help-processing-is-showing-loadtable-is-not-defined/30816/8 "2021-06-20T19:06:57Z")

</div>

Answered in last post… I updated it.

---

<div class="post-metadata">

### Author: ![ShenpaiSharma](https://avatars.discourse-cdn.com/v4/letter/s/ce73a5/32.png) [@ShenpaiSharma](https://discourse.processing.org/u/ShenpaiSharma)
#### Post date: [June 20, 2021, 7:08pm UTC](https://discourse.processing.org/t/please-help-processing-is-showing-loadtable-is-not-defined/30816/9 "2021-06-20T19:08:12Z")

</div>

Then can you please tell me how to use it.

---

<div class="post-metadata">

### Author: ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)
#### Post date: [June 20, 2021, 7:10pm UTC](https://discourse.processing.org/t/please-help-processing-is-showing-loadtable-is-not-defined/30816/10 "2021-06-20T19:10:16Z")

</div>

Processing can be downloaded from here:  
_[https://processing.org/](https://processing.org/)_

There are also resources on the website to help you.

`:)`

---

<div class="post-metadata">

### Author: ![ShenpaiSharma](https://avatars.discourse-cdn.com/v4/letter/s/ce73a5/32.png) [@ShenpaiSharma](https://discourse.processing.org/u/ShenpaiSharma)
#### Post date: [June 20, 2021, 7:11pm UTC](https://discourse.processing.org/t/please-help-processing-is-showing-loadtable-is-not-defined/30816/11 "2021-06-20T19:11:34Z")

</div>

Thank you so much @glv for the help

---

<div class="post-metadata">

### Author: ![everythingability](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/everythingability/32/937_2.png) [@everythingability](https://discourse.processing.org/u/everythingability)
#### Post date: [June 28, 2021, 3:34pm UTC](https://discourse.processing.org/t/please-help-processing-is-showing-loadtable-is-not-defined/30816/12 "2021-06-28T15:34:14Z")

</div>

Loading resources from URL used to be fine and dandy, but nowadays, they are blocked by CORS (the headers at the server end).

Your code runs fine in the Desktop IDE.
