An angle measures rotation from a reference direction to a geometric ray or point. In a polar coordinate system, it works with a radius to describe position around an origin. section 4.4.1
Use angles to position and construct arcs in SVG visualizations:
- Measure the angle clockwise from the 12 o’clock reference direction. section 4.4.1
- Convert a percentage into degrees by multiplying it by 360. section 4.4.1
- Convert degrees to radians by multiplying by π and dividing by 180, because D3’s arc generator expects radians. section 4.4.1 section 4.5
- Provide starting and ending angles to d3.arc(), alongside inner and outer radii, to define an arc. section 4.5
Mapping precipitation days to an arc
If 126 of 365 days contain precipitation, the percentage is about 35%. Convert that percentage to 126 degrees, then convert 126 degrees to radians before passing the value to an arc generator. section 4.4.1
Figure 4.24 The dimensions of a Cartesian coordinate system are perpendicular to one another, while the polar coordinate system uses the radius and angle dimensions to describe a position in space.
Compare Cartesian coordinates, which use perpendicular x and y dimensions, with polar coordinates, which use radius and angle. section 4.4.1

