I found code for a drill-down sunburst chart on Amchart’s website. I just popped in the data I had already typed up that has Bowie State Univesity spring 2021 headcount enrollment by area of origin. This version is kind of nice because you can drill down to see the details of the smaller categories. A disadvantage is that you can not see the drill-down categories until you drill down. In the future, I may be able to figure out how to show the hidden layers, but I am not sure if that will be an advantage, it might be too close together to see the categories well.

To drill down to a level click on the pie slice. This will expand the slice to the entire area of the pie. It is rather difficult to explain, it is easier to just play with the chart down below to understand how it operates.

The drill-down sunburst chart goes down to the level provided in the original data. For in-State students, the data shows to the county level the area of origin. For out-of-state students, it shows students from the major surrounding states and the District of Columbia. The states are New Jersey, New York, Pennsylvania, and Virginia. The remaining students are from other states, “foreign”, or of unknown origin.

To make the other sunburst chart look cleaner I divided the counties into five regions: Capital Region, Central Maryland, Southern Maryland, Western Maryland, and Eastern Shore. The regions and the counties assigned to each region are from the “Visit Maryland” website. For this semester Bowie State University had no students from Western Maryland counties, so that region is not on the chart. As with the other charts, I withhold judgment on the chart until I have an opportunity to play with it.

Bowie State University Drill Down SunBurst CHart

Source: University System of Maryland, IRIS, headcount by area of origin

Since I was able to get the sunburst chart to finally work properly. I decided to take a look at the data I entered. For some reason, the enrollment for winter 2021 is really low (COVID and short term?), so I decided to pull numbers of a more typical term (still COVID) to get a better idea of actual enrollment. I wrote the code in a text file, so I have not yet taken a look at the chart. However, I know from just looking at the data that Prince George’s County has the highest headcount enrollment. This is logical because Bowie State University is located in Prince George’s County.

Bowie State University Spring 2021 HeadCount Enrollment

Source: University System of Maryland, IRIS, headcount enrollment by area of origin

Getting the COde to Render Locally

In my last post, I said that I could not get the Sunburst Chart to render properly out of CodePen. I walked away with plans to go to bed. Getting ready for bed I did a few minutes of googling and found a Reddit post from three years ago that explained my issue. Apparently, since it was running locally I need to add “https:” prior to the resources in the HTML part of the code.

Below I have quoted partly how it was explained on the Reddit post. Basically, without the https:, which is sometimes assumed and can be assumed when it is running off CodePen, the computer does not know what it looking at. Thus, my code will not render. Since I am new to this and kind of just trying to make things work, I will be adding in the “https:”

Quabourter

…when you don’t use an explicit scheme, then your brower will use the scheme of your page. … This is also why this gave you problems when running locally: if your page is served under file:///some/path/to/your/file.htlm then the url// mascdn.bootstraphcdn.com/font-awesome/4/2.0/css/font-awesome.min.css resolves to file://maxcdn.bootstrapcdn.com/fount-awesome/4.2.0/css/font-awesome.min.css, which doesn’t exist. …

When I was running the code without the “https:”, it would just spin its wheels. There was no error code.

SUnBurst Chart BOWIE STate Enrollment

Source: University System of Maryland, IRIS

Thoughts about SunBurst Chart

I need to type in all my data before I can decide if I like a chart. The Sunburst chart is kind of interesting, it allows for drilling down of data, which I really like. The issue with the particular chart is that there is so much data the chart is kind of difficult to read. In my first version, I did not have the in-State enrollment divided by region and it was even harder to read.