Hopefully I can explain myself properly, as I am new to JS, but I need to import a CSV file as the data for a pie chart. My csv file is just a single column, with the header "Type", and the values are not all the same. There's three types: Mediumn, Low, High and theres 63 values in total.
What I'm doing currently is d3.csv("types.csv"). After this step, I don't know how to get it to read the data as 3 seperate values. So, how would I go about doing this? Can I get it to iterate over the object array and increment an empty array and get the pie chart to use that as the data? Pseudo code example: var types = {} foreach type +1 types to end up with var types = {Low: 2, Medium: 4, High: 10} and then parse that into the pie chart.
Hope I make sense! :)
Thank you.