Skip to content

Qichun Dai

Tiny Data Might be Mighty

  • Home
  • About
  • Blog

Tag Archives: d3

Day 7: Scatter Plot

I modified the scatter plot from the scatter plot example from Observable. To create dots, we create circle elements and append them to our SVG element. The circle will need three attribute values to position it: cx, cy, and r. With the codes above, we will generate the dots. The next step will be addingContinue reading “Day 7: Scatter Plot”

Posted byQichun DaiJuly 11, 2023July 11, 2023Posted inDai◦lyTags:d3Leave a comment on Day 7: Scatter Plot

Day 6: Size & Range

In the force layout, we don’t have an axis. However, in normal charts, we will have axes. To map our data to the x-axis and y-axis, we will need to figure out the canvas size and range of the d3 scale functions. First, we need to set the width and height of the SVG element.Continue reading “Day 6: Size & Range”

Posted byQichun DaiJuly 10, 2023July 11, 2023Posted inDai◦lyTags:d3Leave a comment on Day 6: Size & Range

Day 4: A Little Bit of CSS

Yesterday, we got some black nodes in our force layout. What if we want to color the nodes with the color of their houses? Also, it will be good to have a title to tell a little bit about what it is about. Let’s do this with some CSS. There are three types of CSSContinue reading “Day 4: A Little Bit of CSS”

Posted byQichun DaiJuly 8, 2023Posted inDai◦lyTags:d3Leave a comment on Day 4: A Little Bit of CSS

Day 3: Copy-Paste-Cite

It’s easier to start with an example and modify the code. Yesterday, we used this Observable example to visualize the main characters in the four houses in Harry Potter. We can start by copying & pasting them to our main.js file. Of course, always give credit to the examples and cite the original place forContinue reading “Day 3: Copy-Paste-Cite”

Posted byQichun DaiJuly 7, 2023July 7, 2023Posted inDai◦lyTags:d3Leave a comment on Day 3: Copy-Paste-Cite

Day 2: Get the Data

I wanted to build a force layout to represent an org chart. I found an example on Observable. Before digging into the code, we need to prepare the data first. Let’s visualize the characters of four houses in Harry Potter. I used Excel to prepare the JSON file, from where I copied the nodes andContinue reading “Day 2: Get the Data”

Posted byQichun DaiJuly 6, 2023July 8, 2023Posted inDai◦lyTags:d3Leave a comment on Day 2: Get the Data

Day 1: Set Up localhost

There is a Chinese saying goes, The start of everything is the hardest. Since the start is already difficult, let’s keep it quite simple on our first day. We only need to install some software and type three lines of commands in the terminal. 🙂 It’s quite different from working with D3 than Power BIContinue reading “Day 1: Set Up localhost”

Posted byQichun DaiJuly 5, 2023Posted inDai◦lyTags:d3Leave a comment on Day 1: Set Up localhost

Posts pagination

Newer posts 1 2 3
  • #Blog
  • #Dai◦ly
  • #Tiny Data
  • #Data Viz
Qichun Dai, Create a website or blog at WordPress.com
  • Subscribe Subscribed
    • Qichun Dai
    • Already have a WordPress.com account? Log in now.
    • Qichun Dai
    • Subscribe Subscribed
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar