Yingyi Chen

digital storyteller,photographer,content strategist

What I learned from D3

Do you ever feel confused about the "healthy foods"? Do you really know the popular high proteins foods? Do you want to learn more about it? Yes, I do!

That's why I selected the "Macros Popular High Protein Foods" as my dataset for D3 visualization. I noticed a lot of people want to eat healthier, and the high Protein foods are essential for their diets.

I chose Proteins and carbohydrates chart to create x and y scale for my viz. But at first, I found the circles didn't match to the scale, I tried to change the margin to let scale more accessible, but it doesn't work.

It's good to know Trying to change the "range" number from "margin-left", the circles will start from the x scale.

As a high protein foods, fats also matters for healthy, so I tried to create a funcation "update", letting people to see the different between fats and carbohydrates. But it also didn't work at first. I checked all the codes I wrote, but still didn't know why.

And then I know it is because I just copy/paste the code from other project, and for this html it can't know what the data is, that is the big problem. Just "let" a new data exist, the code run!

It is really fun exploring data. Even though I still in the first level, still feel confused about it. But the allure of visualization still fascinate me. Hope there will be more practice and learn more about it! Good trip!