I have imported a CSV file using D3, the 'University', 'State', 'Salary' and the 'Type' are the values that I need to do more visualization. Now I am trying to create a new array that imports the above four attributes.
I create a new array using var SalaryArray = []
I have imported the CSV file, by returning the attributes that I need using
d3.csv("Median Salary Integration 2018.csv")
.row(function (d) {
return {University: String(d.University), State: String(d.State),Salary: String(d.Median), Type: String(d.Type)}
I tried
SalaryData = d3.csv("Median Salary Integration 2018.csv")
.row(function (d) {
return {
University: String(d.University), State: String(d.State),
Salary: String(d.Median), Type: String(d.Type)
}
})
but by console.log(SalaryData), the result doesn't show.
salaryData, notSalaryData, anduniversity, notUniversity. I strongly recommend following standard naming conventions when asking for help from other people. (It's a good idea when not asking for help, too.)