So I have the following file, data.csv
. Which looks like this:
TestID,Cronbach,Percent Correct,Population
12416,0.866,0.17,26
12421,0.945,0.21,8
12385,0.777,0.40,258
12412,0.85,0.44,34
12407,0.831,0.45,48
And I want it to look like this:
[
["Test ID", "Cronbach", "Percent Correct", "Population"],
["12416", 0.866, 0.17, 26],
["12421", 0.945, 0.21, 8],
["12385", 0.777, 0.40, 258],
["12412", 0.85, 0.44, 34],
["12407", 0.831, 0.45, 48]
]
Is there a way I can make a conversion code in php to convert my CSV file to look like the above format. I need this because I want to put the code into a Google Bubble Chart.
Q: How might I go about making the code that can convert this to an acceptable format to fit Googles bubble chart?