final exam question 2
This example uses D3 v3 to render a pie chart showing the relative fraction of genes in the forward and reverse directions from a JSON dataset. It tallies gene directions with a loop, then applies `d3.layout.pie()` and `d3.svg.arc()` to draw the chart dynamically from the data. The code reads `genes.json` and updates automatically if the file changes, using a categorical color scale for slice fills. The chart is appended to an SVG container sized 400 by 400 pixels.
AI-generated descriptionWithout modifying the information in genes.json, use D3 to construct a pie chart that shows the relative fraction of genes in the forward and reverse directions. Your code must dynamically generate the pie chart from the data. In other words, if I modify the genes.json data file, the pie chart must update automatically. (15 points)
forked from <a href='http://bl.ocks.org/scresawn/'>scresawn</a>'s block: <a href='http://bl.ocks.org/scresawn/53fe9d373ca3b3e20632f69c5169a59d'>final exam question 2</a>
forked from <a href='http://bl.ocks.org/anonymous/'>anonymous</a>'s block: <a href='http://bl.ocks.org/anonymous/0e47490515380fe464762d02a8550f6e'>final exam question 2</a>