官术网_书友最值得收藏!

How long have American firms been in business visualized with pies and donuts

In September 2016, the US Census Bureau released data that showed how long American firms have been in business. The US Census Bureau even created a nice-looking visualization themselves (http://www.census.gov/newsroom/press-releases/2016/cb16-148.html) showing the results from that data:

In this section, we'll create an alternative visualization using an animated donut chart. While making this, we'll explore the following subjects:

  • Learning how to use animations to occur when data is loaded
  • Using the various path generators from D3 to generate SVG paths
  • Using color interpolators to color each inpidual part of the donut

You can see this sample for yourself by opening example: <DVD3>/src/chapter-02/D02-01.html. The results look like this:

By selecting a different group of firm owners in the top left you can see the donut transition to its new state, and if you hover with the mouse over a donut segment, it'll grow a bit, and show its percentage in the middle of the donut.

First off, let's see what the data looks like in its raw form.

主站蜘蛛池模板: 明溪县| 德化县| 方山县| 松江区| 芦溪县| 铜陵市| 布拖县| 河南省| 博乐市| 怀化市| 宁城县| 松溪县| 南华县| 乌拉特后旗| 新建县| 洛南县| 仲巴县| 安庆市| 宁国市| 五家渠市| 安陆市| 广安市| 奇台县| 安顺市| 涿州市| 茂名市| 蓬溪县| 车致| 滨海县| 永吉县| 易门县| 克山县| 剑川县| 邵东县| 班戈县| 本溪市| 红桥区| 平阳县| 虎林市| 赤壁市| 怀集县|