Output of js using d3 library is not visible, but no errors appear
up vote
-1
down vote
favorite
HI:) I am trying to vizualize some data for my thesis, but it's my first experience with js, and it seems that I'm missing smth.
I would like to show each data point (each CNC) as a circle of the size that depends on the value specified in the column "CNC Length". On the x axes the points should be there where they are in the text (that is why x coordinate depends on "Sentence number").
The data is in tsv format, the head of it looks like this:
N Subcorpus Type of Article Article Teil Sentence number CNC String CNC Length
0 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 8.0 multifaceted personality construct 3.0
1 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 11.0 alexithymia exhibit difficulties 3.0
2 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 14.0 multiple somatosensory pathways 3.0
3 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 35.0 open access article 3.0
4 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 68.0 heat pain threshold 3.0
5 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 75.0 emotion recognition impairment 3.0
6 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 97.0 lower TAS quartile 3.0
7 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 99.0 upper TAS quartile 3.0
8 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 132.0 warm threshold test 3.0
9 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 138.0 Pinprick pain threshold 3.0
10 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 139.0 laser stimulation device 3.0
11 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 155.0 numberintensity stimulus trials 4.0
12 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 155.0 numberintensity stimulus trials 4.0
13 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 167.0 orientation discrimination threshold 3.0
14 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 168.0 largest ridge width 3.0
15 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 194.0 stimulation duration constant 3.0
16 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 212.0 ulna styloid process 3.0
17 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 216.0 heartbeat perception task 3.0
18 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 222.0 heartbeat perception score 3.0
19 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 222.0 heartbeat perception intervals 3.0
20 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 225.0 heartbeat detection task 3.0
21 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 233.0 somatosensory detection threshold 3.0
22 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 235.0 detection threshold intensities 3.0
23 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 260.0 heat pain threshold 3.0
24 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 281.0 thermal detection test 3.0
25 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 309.0 further linear regression 3.0
26 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 318.0 strong group difference 3.0
27 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 330.0 Mean pleasantness ratings 3.0
28 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 342.0 emotion recognition difficulties 3.0
29 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 351.0 null result cannot rule 4.0
30 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 354.0 warmth perception threshold 3.0
31 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 371.0 specific receptor types 3.0
32 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 373.0 warmstimulus dimensions 3.0
33 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 383.0 physical warmthalsoOur study 3.0
34 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 396.0 c-tactile mechanoreceptor pathway 3.0
35 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 398.0 affective touch test 3.0
36 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 406.0 pleasantness ratings overall 3.0
37 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 410.0 body mass index 3.0
38 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 412.0 affective touch test 3.0
267 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Intro> 1.0 human startle response 3.0
268 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Intro> 2.0 eye blink reflex 3.0
269 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Intro> 2.0 body startle reflex 3.0
270 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Middle> 91.0 Neurobehavioralelectrocutaneous stimuli 3.0
271 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Middle> 120.0 stimulusonset asynchrony 3.0
272 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Middle> 134.0 EMG data processing 3.0
273 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Conclusion> 241.0 Disclosure statement None 3.0
The code is as follows:
var w = 600;
var h = 300;
d3.tsv("df.tsv", function(d) {
return{
Sentence_number : +d["Sentence number"],
CNC_Length : +d["CNC Length"],
article : d.Article,
part: d.Teil
};
}, function(data){
var padding = 20;
var rScale = d3.scaleLinear()
//.domain([3, d3.max(data, function(d) { return d["CNC Length"]; })])
.domain([3, 7])
.range([2, 40]);
var xScale = d3.scaleLinear()
//.domain([0, d3.max(data, function(d) { return d["Sentence number"]; })]) //input domain
.domain([0, 1000]) //input domain
.range([padding, w-padding*2]); //output range
var canv = d3.select("body").append("svg")
.attr("width", w)
.attr("height", h)
canv.selectAll("circle")
.data(data)
.filter(function(d) { return (d["Article"] == "Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt") })
.enter()
.append("circle")
.attr("cx", function(d) {
return xScale(d["Sentence number"]);
})
.attr("cy", h/2)
.attr("fill", function(d) {
return "rgb(255, 0, " + d["CNC Length"] * 10 + ", 0.75)";
})
.attr("r", function(d) {
return rScale(d["CNC Length"]);
})
});
The problem is that I see no errors in console, and nothing appears on the screen (I tried working with artificial data creating it per hand in js and it worked, but when I imported the data, something went wrong).
I would be thankful for any advice:)
javascript d3.js data-visualization
add a comment |
up vote
-1
down vote
favorite
HI:) I am trying to vizualize some data for my thesis, but it's my first experience with js, and it seems that I'm missing smth.
I would like to show each data point (each CNC) as a circle of the size that depends on the value specified in the column "CNC Length". On the x axes the points should be there where they are in the text (that is why x coordinate depends on "Sentence number").
The data is in tsv format, the head of it looks like this:
N Subcorpus Type of Article Article Teil Sentence number CNC String CNC Length
0 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 8.0 multifaceted personality construct 3.0
1 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 11.0 alexithymia exhibit difficulties 3.0
2 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 14.0 multiple somatosensory pathways 3.0
3 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 35.0 open access article 3.0
4 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 68.0 heat pain threshold 3.0
5 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 75.0 emotion recognition impairment 3.0
6 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 97.0 lower TAS quartile 3.0
7 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 99.0 upper TAS quartile 3.0
8 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 132.0 warm threshold test 3.0
9 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 138.0 Pinprick pain threshold 3.0
10 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 139.0 laser stimulation device 3.0
11 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 155.0 numberintensity stimulus trials 4.0
12 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 155.0 numberintensity stimulus trials 4.0
13 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 167.0 orientation discrimination threshold 3.0
14 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 168.0 largest ridge width 3.0
15 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 194.0 stimulation duration constant 3.0
16 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 212.0 ulna styloid process 3.0
17 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 216.0 heartbeat perception task 3.0
18 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 222.0 heartbeat perception score 3.0
19 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 222.0 heartbeat perception intervals 3.0
20 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 225.0 heartbeat detection task 3.0
21 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 233.0 somatosensory detection threshold 3.0
22 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 235.0 detection threshold intensities 3.0
23 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 260.0 heat pain threshold 3.0
24 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 281.0 thermal detection test 3.0
25 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 309.0 further linear regression 3.0
26 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 318.0 strong group difference 3.0
27 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 330.0 Mean pleasantness ratings 3.0
28 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 342.0 emotion recognition difficulties 3.0
29 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 351.0 null result cannot rule 4.0
30 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 354.0 warmth perception threshold 3.0
31 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 371.0 specific receptor types 3.0
32 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 373.0 warmstimulus dimensions 3.0
33 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 383.0 physical warmthalsoOur study 3.0
34 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 396.0 c-tactile mechanoreceptor pathway 3.0
35 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 398.0 affective touch test 3.0
36 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 406.0 pleasantness ratings overall 3.0
37 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 410.0 body mass index 3.0
38 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 412.0 affective touch test 3.0
267 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Intro> 1.0 human startle response 3.0
268 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Intro> 2.0 eye blink reflex 3.0
269 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Intro> 2.0 body startle reflex 3.0
270 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Middle> 91.0 Neurobehavioralelectrocutaneous stimuli 3.0
271 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Middle> 120.0 stimulusonset asynchrony 3.0
272 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Middle> 134.0 EMG data processing 3.0
273 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Conclusion> 241.0 Disclosure statement None 3.0
The code is as follows:
var w = 600;
var h = 300;
d3.tsv("df.tsv", function(d) {
return{
Sentence_number : +d["Sentence number"],
CNC_Length : +d["CNC Length"],
article : d.Article,
part: d.Teil
};
}, function(data){
var padding = 20;
var rScale = d3.scaleLinear()
//.domain([3, d3.max(data, function(d) { return d["CNC Length"]; })])
.domain([3, 7])
.range([2, 40]);
var xScale = d3.scaleLinear()
//.domain([0, d3.max(data, function(d) { return d["Sentence number"]; })]) //input domain
.domain([0, 1000]) //input domain
.range([padding, w-padding*2]); //output range
var canv = d3.select("body").append("svg")
.attr("width", w)
.attr("height", h)
canv.selectAll("circle")
.data(data)
.filter(function(d) { return (d["Article"] == "Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt") })
.enter()
.append("circle")
.attr("cx", function(d) {
return xScale(d["Sentence number"]);
})
.attr("cy", h/2)
.attr("fill", function(d) {
return "rgb(255, 0, " + d["CNC Length"] * 10 + ", 0.75)";
})
.attr("r", function(d) {
return rScale(d["CNC Length"]);
})
});
The problem is that I see no errors in console, and nothing appears on the screen (I tried working with artificial data creating it per hand in js and it worked, but when I imported the data, something went wrong).
I would be thankful for any advice:)
javascript d3.js data-visualization
in the callback what doesdata
look like when you dump it on the console?
– rioV8
Nov 7 at 15:47
What version of D3 are you using?
– altocumulus
Nov 7 at 18:33
@altocumulus, I use thi one: d3js.org/d3.v4.min.js
– Kris.K.
Nov 12 at 7:56
console.log(data); gives this: (2286) [{…}, …] [0 … 99] 0: CNC_Length: 3 Sentence_number: 8 article: "-Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt" part: "<Intro>" proto: Object 1: {Sentence_number: 11, CNC_Length: 3, article: "-Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt", part: "<Intro>"} 2: {Sentence_number: 14, CNC_Length: 3, article: "-Lacking-warmth---....and so on
– Kris.K.
Nov 12 at 8:10
add a comment |
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
HI:) I am trying to vizualize some data for my thesis, but it's my first experience with js, and it seems that I'm missing smth.
I would like to show each data point (each CNC) as a circle of the size that depends on the value specified in the column "CNC Length". On the x axes the points should be there where they are in the text (that is why x coordinate depends on "Sentence number").
The data is in tsv format, the head of it looks like this:
N Subcorpus Type of Article Article Teil Sentence number CNC String CNC Length
0 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 8.0 multifaceted personality construct 3.0
1 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 11.0 alexithymia exhibit difficulties 3.0
2 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 14.0 multiple somatosensory pathways 3.0
3 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 35.0 open access article 3.0
4 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 68.0 heat pain threshold 3.0
5 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 75.0 emotion recognition impairment 3.0
6 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 97.0 lower TAS quartile 3.0
7 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 99.0 upper TAS quartile 3.0
8 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 132.0 warm threshold test 3.0
9 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 138.0 Pinprick pain threshold 3.0
10 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 139.0 laser stimulation device 3.0
11 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 155.0 numberintensity stimulus trials 4.0
12 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 155.0 numberintensity stimulus trials 4.0
13 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 167.0 orientation discrimination threshold 3.0
14 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 168.0 largest ridge width 3.0
15 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 194.0 stimulation duration constant 3.0
16 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 212.0 ulna styloid process 3.0
17 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 216.0 heartbeat perception task 3.0
18 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 222.0 heartbeat perception score 3.0
19 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 222.0 heartbeat perception intervals 3.0
20 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 225.0 heartbeat detection task 3.0
21 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 233.0 somatosensory detection threshold 3.0
22 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 235.0 detection threshold intensities 3.0
23 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 260.0 heat pain threshold 3.0
24 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 281.0 thermal detection test 3.0
25 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 309.0 further linear regression 3.0
26 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 318.0 strong group difference 3.0
27 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 330.0 Mean pleasantness ratings 3.0
28 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 342.0 emotion recognition difficulties 3.0
29 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 351.0 null result cannot rule 4.0
30 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 354.0 warmth perception threshold 3.0
31 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 371.0 specific receptor types 3.0
32 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 373.0 warmstimulus dimensions 3.0
33 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 383.0 physical warmthalsoOur study 3.0
34 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 396.0 c-tactile mechanoreceptor pathway 3.0
35 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 398.0 affective touch test 3.0
36 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 406.0 pleasantness ratings overall 3.0
37 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 410.0 body mass index 3.0
38 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 412.0 affective touch test 3.0
267 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Intro> 1.0 human startle response 3.0
268 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Intro> 2.0 eye blink reflex 3.0
269 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Intro> 2.0 body startle reflex 3.0
270 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Middle> 91.0 Neurobehavioralelectrocutaneous stimuli 3.0
271 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Middle> 120.0 stimulusonset asynchrony 3.0
272 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Middle> 134.0 EMG data processing 3.0
273 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Conclusion> 241.0 Disclosure statement None 3.0
The code is as follows:
var w = 600;
var h = 300;
d3.tsv("df.tsv", function(d) {
return{
Sentence_number : +d["Sentence number"],
CNC_Length : +d["CNC Length"],
article : d.Article,
part: d.Teil
};
}, function(data){
var padding = 20;
var rScale = d3.scaleLinear()
//.domain([3, d3.max(data, function(d) { return d["CNC Length"]; })])
.domain([3, 7])
.range([2, 40]);
var xScale = d3.scaleLinear()
//.domain([0, d3.max(data, function(d) { return d["Sentence number"]; })]) //input domain
.domain([0, 1000]) //input domain
.range([padding, w-padding*2]); //output range
var canv = d3.select("body").append("svg")
.attr("width", w)
.attr("height", h)
canv.selectAll("circle")
.data(data)
.filter(function(d) { return (d["Article"] == "Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt") })
.enter()
.append("circle")
.attr("cx", function(d) {
return xScale(d["Sentence number"]);
})
.attr("cy", h/2)
.attr("fill", function(d) {
return "rgb(255, 0, " + d["CNC Length"] * 10 + ", 0.75)";
})
.attr("r", function(d) {
return rScale(d["CNC Length"]);
})
});
The problem is that I see no errors in console, and nothing appears on the screen (I tried working with artificial data creating it per hand in js and it worked, but when I imported the data, something went wrong).
I would be thankful for any advice:)
javascript d3.js data-visualization
HI:) I am trying to vizualize some data for my thesis, but it's my first experience with js, and it seems that I'm missing smth.
I would like to show each data point (each CNC) as a circle of the size that depends on the value specified in the column "CNC Length". On the x axes the points should be there where they are in the text (that is why x coordinate depends on "Sentence number").
The data is in tsv format, the head of it looks like this:
N Subcorpus Type of Article Article Teil Sentence number CNC String CNC Length
0 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 8.0 multifaceted personality construct 3.0
1 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 11.0 alexithymia exhibit difficulties 3.0
2 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 14.0 multiple somatosensory pathways 3.0
3 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 35.0 open access article 3.0
4 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 68.0 heat pain threshold 3.0
5 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 75.0 emotion recognition impairment 3.0
6 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 97.0 lower TAS quartile 3.0
7 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 99.0 upper TAS quartile 3.0
8 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 132.0 warm threshold test 3.0
9 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 138.0 Pinprick pain threshold 3.0
10 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 139.0 laser stimulation device 3.0
11 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 155.0 numberintensity stimulus trials 4.0
12 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 155.0 numberintensity stimulus trials 4.0
13 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 167.0 orientation discrimination threshold 3.0
14 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 168.0 largest ridge width 3.0
15 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 194.0 stimulation duration constant 3.0
16 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 212.0 ulna styloid process 3.0
17 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 216.0 heartbeat perception task 3.0
18 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 222.0 heartbeat perception score 3.0
19 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 222.0 heartbeat perception intervals 3.0
20 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 225.0 heartbeat detection task 3.0
21 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 233.0 somatosensory detection threshold 3.0
22 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 235.0 detection threshold intensities 3.0
23 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 260.0 heat pain threshold 3.0
24 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 281.0 thermal detection test 3.0
25 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 309.0 further linear regression 3.0
26 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 318.0 strong group difference 3.0
27 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 330.0 Mean pleasantness ratings 3.0
28 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 342.0 emotion recognition difficulties 3.0
29 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 351.0 null result cannot rule 4.0
30 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 354.0 warmth perception threshold 3.0
31 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 371.0 specific receptor types 3.0
32 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 373.0 warmstimulus dimensions 3.0
33 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 383.0 physical warmthalsoOur study 3.0
34 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 396.0 c-tactile mechanoreceptor pathway 3.0
35 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 398.0 affective touch test 3.0
36 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 406.0 pleasantness ratings overall 3.0
37 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 410.0 body mass index 3.0
38 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 412.0 affective touch test 3.0
267 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Intro> 1.0 human startle response 3.0
268 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Intro> 2.0 eye blink reflex 3.0
269 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Intro> 2.0 body startle reflex 3.0
270 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Middle> 91.0 Neurobehavioralelectrocutaneous stimuli 3.0
271 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Middle> 120.0 stimulusonset asynchrony 3.0
272 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Middle> 134.0 EMG data processing 3.0
273 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Conclusion> 241.0 Disclosure statement None 3.0
The code is as follows:
var w = 600;
var h = 300;
d3.tsv("df.tsv", function(d) {
return{
Sentence_number : +d["Sentence number"],
CNC_Length : +d["CNC Length"],
article : d.Article,
part: d.Teil
};
}, function(data){
var padding = 20;
var rScale = d3.scaleLinear()
//.domain([3, d3.max(data, function(d) { return d["CNC Length"]; })])
.domain([3, 7])
.range([2, 40]);
var xScale = d3.scaleLinear()
//.domain([0, d3.max(data, function(d) { return d["Sentence number"]; })]) //input domain
.domain([0, 1000]) //input domain
.range([padding, w-padding*2]); //output range
var canv = d3.select("body").append("svg")
.attr("width", w)
.attr("height", h)
canv.selectAll("circle")
.data(data)
.filter(function(d) { return (d["Article"] == "Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt") })
.enter()
.append("circle")
.attr("cx", function(d) {
return xScale(d["Sentence number"]);
})
.attr("cy", h/2)
.attr("fill", function(d) {
return "rgb(255, 0, " + d["CNC Length"] * 10 + ", 0.75)";
})
.attr("r", function(d) {
return rScale(d["CNC Length"]);
})
});
The problem is that I see no errors in console, and nothing appears on the screen (I tried working with artificial data creating it per hand in js and it worked, but when I imported the data, something went wrong).
I would be thankful for any advice:)
N Subcorpus Type of Article Article Teil Sentence number CNC String CNC Length
0 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 8.0 multifaceted personality construct 3.0
1 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 11.0 alexithymia exhibit difficulties 3.0
2 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 14.0 multiple somatosensory pathways 3.0
3 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 35.0 open access article 3.0
4 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 68.0 heat pain threshold 3.0
5 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 75.0 emotion recognition impairment 3.0
6 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 97.0 lower TAS quartile 3.0
7 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 99.0 upper TAS quartile 3.0
8 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 132.0 warm threshold test 3.0
9 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 138.0 Pinprick pain threshold 3.0
10 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 139.0 laser stimulation device 3.0
11 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 155.0 numberintensity stimulus trials 4.0
12 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 155.0 numberintensity stimulus trials 4.0
13 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 167.0 orientation discrimination threshold 3.0
14 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 168.0 largest ridge width 3.0
15 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 194.0 stimulation duration constant 3.0
16 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 212.0 ulna styloid process 3.0
17 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 216.0 heartbeat perception task 3.0
18 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 222.0 heartbeat perception score 3.0
19 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 222.0 heartbeat perception intervals 3.0
20 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 225.0 heartbeat detection task 3.0
21 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 233.0 somatosensory detection threshold 3.0
22 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 235.0 detection threshold intensities 3.0
23 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 260.0 heat pain threshold 3.0
24 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 281.0 thermal detection test 3.0
25 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 309.0 further linear regression 3.0
26 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 318.0 strong group difference 3.0
27 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 330.0 Mean pleasantness ratings 3.0
28 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 342.0 emotion recognition difficulties 3.0
29 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 351.0 null result cannot rule 4.0
30 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 354.0 warmth perception threshold 3.0
31 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 371.0 specific receptor types 3.0
32 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 373.0 warmstimulus dimensions 3.0
33 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 383.0 physical warmthalsoOur study 3.0
34 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 396.0 c-tactile mechanoreceptor pathway 3.0
35 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 398.0 affective touch test 3.0
36 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 406.0 pleasantness ratings overall 3.0
37 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 410.0 body mass index 3.0
38 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 412.0 affective touch test 3.0
267 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Intro> 1.0 human startle response 3.0
268 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Intro> 2.0 eye blink reflex 3.0
269 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Intro> 2.0 body startle reflex 3.0
270 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Middle> 91.0 Neurobehavioralelectrocutaneous stimuli 3.0
271 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Middle> 120.0 stimulusonset asynchrony 3.0
272 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Middle> 134.0 EMG data processing 3.0
273 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Conclusion> 241.0 Disclosure statement None 3.0
N Subcorpus Type of Article Article Teil Sentence number CNC String CNC Length
0 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 8.0 multifaceted personality construct 3.0
1 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 11.0 alexithymia exhibit difficulties 3.0
2 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 14.0 multiple somatosensory pathways 3.0
3 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 35.0 open access article 3.0
4 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 68.0 heat pain threshold 3.0
5 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Intro> 75.0 emotion recognition impairment 3.0
6 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 97.0 lower TAS quartile 3.0
7 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 99.0 upper TAS quartile 3.0
8 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 132.0 warm threshold test 3.0
9 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 138.0 Pinprick pain threshold 3.0
10 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 139.0 laser stimulation device 3.0
11 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 155.0 numberintensity stimulus trials 4.0
12 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 155.0 numberintensity stimulus trials 4.0
13 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 167.0 orientation discrimination threshold 3.0
14 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 168.0 largest ridge width 3.0
15 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 194.0 stimulation duration constant 3.0
16 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 212.0 ulna styloid process 3.0
17 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 216.0 heartbeat perception task 3.0
18 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 222.0 heartbeat perception score 3.0
19 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 222.0 heartbeat perception intervals 3.0
20 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 225.0 heartbeat detection task 3.0
21 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 233.0 somatosensory detection threshold 3.0
22 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 235.0 detection threshold intensities 3.0
23 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 260.0 heat pain threshold 3.0
24 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 281.0 thermal detection test 3.0
25 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 309.0 further linear regression 3.0
26 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 318.0 strong group difference 3.0
27 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Middle> 330.0 Mean pleasantness ratings 3.0
28 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 342.0 emotion recognition difficulties 3.0
29 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 351.0 null result cannot rule 4.0
30 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 354.0 warmth perception threshold 3.0
31 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 371.0 specific receptor types 3.0
32 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 373.0 warmstimulus dimensions 3.0
33 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 383.0 physical warmthalsoOur study 3.0
34 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 396.0 c-tactile mechanoreceptor pathway 3.0
35 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 398.0 affective touch test 3.0
36 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 406.0 pleasantness ratings overall 3.0
37 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 410.0 body mass index 3.0
38 biology_intros Quant/Qual -Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt <Conclusion> 412.0 affective touch test 3.0
267 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Intro> 1.0 human startle response 3.0
268 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Intro> 2.0 eye blink reflex 3.0
269 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Intro> 2.0 body startle reflex 3.0
270 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Middle> 91.0 Neurobehavioralelectrocutaneous stimuli 3.0
271 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Middle> 120.0 stimulusonset asynchrony 3.0
272 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Middle> 134.0 EMG data processing 3.0
273 biology_intros Quant/Qual Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt <Conclusion> 241.0 Disclosure statement None 3.0
var w = 600;
var h = 300;
d3.tsv("df.tsv", function(d) {
return{
Sentence_number : +d["Sentence number"],
CNC_Length : +d["CNC Length"],
article : d.Article,
part: d.Teil
};
}, function(data){
var padding = 20;
var rScale = d3.scaleLinear()
//.domain([3, d3.max(data, function(d) { return d["CNC Length"]; })])
.domain([3, 7])
.range([2, 40]);
var xScale = d3.scaleLinear()
//.domain([0, d3.max(data, function(d) { return d["Sentence number"]; })]) //input domain
.domain([0, 1000]) //input domain
.range([padding, w-padding*2]); //output range
var canv = d3.select("body").append("svg")
.attr("width", w)
.attr("height", h)
canv.selectAll("circle")
.data(data)
.filter(function(d) { return (d["Article"] == "Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt") })
.enter()
.append("circle")
.attr("cx", function(d) {
return xScale(d["Sentence number"]);
})
.attr("cy", h/2)
.attr("fill", function(d) {
return "rgb(255, 0, " + d["CNC Length"] * 10 + ", 0.75)";
})
.attr("r", function(d) {
return rScale(d["CNC Length"]);
})
});
var w = 600;
var h = 300;
d3.tsv("df.tsv", function(d) {
return{
Sentence_number : +d["Sentence number"],
CNC_Length : +d["CNC Length"],
article : d.Article,
part: d.Teil
};
}, function(data){
var padding = 20;
var rScale = d3.scaleLinear()
//.domain([3, d3.max(data, function(d) { return d["CNC Length"]; })])
.domain([3, 7])
.range([2, 40]);
var xScale = d3.scaleLinear()
//.domain([0, d3.max(data, function(d) { return d["Sentence number"]; })]) //input domain
.domain([0, 1000]) //input domain
.range([padding, w-padding*2]); //output range
var canv = d3.select("body").append("svg")
.attr("width", w)
.attr("height", h)
canv.selectAll("circle")
.data(data)
.filter(function(d) { return (d["Article"] == "Deficient-prepulse-inhibition-of-the-startle-reflex-in-sch_2017_Biological-P.txt") })
.enter()
.append("circle")
.attr("cx", function(d) {
return xScale(d["Sentence number"]);
})
.attr("cy", h/2)
.attr("fill", function(d) {
return "rgb(255, 0, " + d["CNC Length"] * 10 + ", 0.75)";
})
.attr("r", function(d) {
return rScale(d["CNC Length"]);
})
});
javascript d3.js data-visualization
javascript d3.js data-visualization
asked Nov 7 at 15:43
Kris.K.
12
12
in the callback what doesdata
look like when you dump it on the console?
– rioV8
Nov 7 at 15:47
What version of D3 are you using?
– altocumulus
Nov 7 at 18:33
@altocumulus, I use thi one: d3js.org/d3.v4.min.js
– Kris.K.
Nov 12 at 7:56
console.log(data); gives this: (2286) [{…}, …] [0 … 99] 0: CNC_Length: 3 Sentence_number: 8 article: "-Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt" part: "<Intro>" proto: Object 1: {Sentence_number: 11, CNC_Length: 3, article: "-Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt", part: "<Intro>"} 2: {Sentence_number: 14, CNC_Length: 3, article: "-Lacking-warmth---....and so on
– Kris.K.
Nov 12 at 8:10
add a comment |
in the callback what doesdata
look like when you dump it on the console?
– rioV8
Nov 7 at 15:47
What version of D3 are you using?
– altocumulus
Nov 7 at 18:33
@altocumulus, I use thi one: d3js.org/d3.v4.min.js
– Kris.K.
Nov 12 at 7:56
console.log(data); gives this: (2286) [{…}, …] [0 … 99] 0: CNC_Length: 3 Sentence_number: 8 article: "-Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt" part: "<Intro>" proto: Object 1: {Sentence_number: 11, CNC_Length: 3, article: "-Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt", part: "<Intro>"} 2: {Sentence_number: 14, CNC_Length: 3, article: "-Lacking-warmth---....and so on
– Kris.K.
Nov 12 at 8:10
in the callback what does
data
look like when you dump it on the console?– rioV8
Nov 7 at 15:47
in the callback what does
data
look like when you dump it on the console?– rioV8
Nov 7 at 15:47
What version of D3 are you using?
– altocumulus
Nov 7 at 18:33
What version of D3 are you using?
– altocumulus
Nov 7 at 18:33
@altocumulus, I use thi one: d3js.org/d3.v4.min.js
– Kris.K.
Nov 12 at 7:56
@altocumulus, I use thi one: d3js.org/d3.v4.min.js
– Kris.K.
Nov 12 at 7:56
console.log(data); gives this: (2286) [{…}, …] [0 … 99] 0: CNC_Length: 3 Sentence_number: 8 article: "-Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt" part: "<Intro>" proto: Object 1: {Sentence_number: 11, CNC_Length: 3, article: "-Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt", part: "<Intro>"} 2: {Sentence_number: 14, CNC_Length: 3, article: "-Lacking-warmth---....and so on
– Kris.K.
Nov 12 at 8:10
console.log(data); gives this: (2286) [{…}, …] [0 … 99] 0: CNC_Length: 3 Sentence_number: 8 article: "-Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt" part: "<Intro>" proto: Object 1: {Sentence_number: 11, CNC_Length: 3, article: "-Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt", part: "<Intro>"} 2: {Sentence_number: 14, CNC_Length: 3, article: "-Lacking-warmth---....and so on
– Kris.K.
Nov 12 at 8:10
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
Thank you for the hints! I found my mistake!
I was addressing the columns by their old names, i.e. I should use d.article instead of d.Article, d.CNC_Length instead of d["CNC Length"] and so on, cause I have the names of the columns in the array differ from how the were called in my tsv, cause I am changing them here:
return{
Sentence_number : +d["Sentence number"],
CNC_Length : +d["CNC Length"],
article : d.Article,
part: d.Teil
};
Moreover, there was a problem with filter. It should be used at the point where I select the data, i.e:
canv.selectAll("circle")
.data(data.filter(function(d) { return (d.article === "Chronic-traumatic-stress-impairs-memory-in-mice--Potential-ro_2017_Behaviour.txt") }))
.enter()
Now it all works, and I am developing it further:)
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
Thank you for the hints! I found my mistake!
I was addressing the columns by their old names, i.e. I should use d.article instead of d.Article, d.CNC_Length instead of d["CNC Length"] and so on, cause I have the names of the columns in the array differ from how the were called in my tsv, cause I am changing them here:
return{
Sentence_number : +d["Sentence number"],
CNC_Length : +d["CNC Length"],
article : d.Article,
part: d.Teil
};
Moreover, there was a problem with filter. It should be used at the point where I select the data, i.e:
canv.selectAll("circle")
.data(data.filter(function(d) { return (d.article === "Chronic-traumatic-stress-impairs-memory-in-mice--Potential-ro_2017_Behaviour.txt") }))
.enter()
Now it all works, and I am developing it further:)
add a comment |
up vote
0
down vote
accepted
Thank you for the hints! I found my mistake!
I was addressing the columns by their old names, i.e. I should use d.article instead of d.Article, d.CNC_Length instead of d["CNC Length"] and so on, cause I have the names of the columns in the array differ from how the were called in my tsv, cause I am changing them here:
return{
Sentence_number : +d["Sentence number"],
CNC_Length : +d["CNC Length"],
article : d.Article,
part: d.Teil
};
Moreover, there was a problem with filter. It should be used at the point where I select the data, i.e:
canv.selectAll("circle")
.data(data.filter(function(d) { return (d.article === "Chronic-traumatic-stress-impairs-memory-in-mice--Potential-ro_2017_Behaviour.txt") }))
.enter()
Now it all works, and I am developing it further:)
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
Thank you for the hints! I found my mistake!
I was addressing the columns by their old names, i.e. I should use d.article instead of d.Article, d.CNC_Length instead of d["CNC Length"] and so on, cause I have the names of the columns in the array differ from how the were called in my tsv, cause I am changing them here:
return{
Sentence_number : +d["Sentence number"],
CNC_Length : +d["CNC Length"],
article : d.Article,
part: d.Teil
};
Moreover, there was a problem with filter. It should be used at the point where I select the data, i.e:
canv.selectAll("circle")
.data(data.filter(function(d) { return (d.article === "Chronic-traumatic-stress-impairs-memory-in-mice--Potential-ro_2017_Behaviour.txt") }))
.enter()
Now it all works, and I am developing it further:)
Thank you for the hints! I found my mistake!
I was addressing the columns by their old names, i.e. I should use d.article instead of d.Article, d.CNC_Length instead of d["CNC Length"] and so on, cause I have the names of the columns in the array differ from how the were called in my tsv, cause I am changing them here:
return{
Sentence_number : +d["Sentence number"],
CNC_Length : +d["CNC Length"],
article : d.Article,
part: d.Teil
};
Moreover, there was a problem with filter. It should be used at the point where I select the data, i.e:
canv.selectAll("circle")
.data(data.filter(function(d) { return (d.article === "Chronic-traumatic-stress-impairs-memory-in-mice--Potential-ro_2017_Behaviour.txt") }))
.enter()
Now it all works, and I am developing it further:)
answered Nov 12 at 10:01
Kris.K.
12
12
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53192833%2foutput-of-js-using-d3-library-is-not-visible-but-no-errors-appear%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
in the callback what does
data
look like when you dump it on the console?– rioV8
Nov 7 at 15:47
What version of D3 are you using?
– altocumulus
Nov 7 at 18:33
@altocumulus, I use thi one: d3js.org/d3.v4.min.js
– Kris.K.
Nov 12 at 7:56
console.log(data); gives this: (2286) [{…}, …] [0 … 99] 0: CNC_Length: 3 Sentence_number: 8 article: "-Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt" part: "<Intro>" proto: Object 1: {Sentence_number: 11, CNC_Length: 3, article: "-Lacking-warmth---Alexithymia-trait-is-related-to-warm-spe_2017_Biological-P.txt", part: "<Intro>"} 2: {Sentence_number: 14, CNC_Length: 3, article: "-Lacking-warmth---....and so on
– Kris.K.
Nov 12 at 8:10