I learned how to add specific colors to an Amcharts treemap. Green indicates an increase of transfer students from that institution to the University of Maryland College Park from fiscal 2019 to fiscal 2020. Red indicates a decrease and gray steady. Not groundbreaking, but it did take a while to figure out how to do the coding and then type it all in. Not sure if this is a good or bad way to visualize the data. Like with most of these graphics, first I need to build it and live with it a while before I can judge it.
I am also not sure if it is good or bad for students from particular institutions to increase or decrease. I just used red and green because it is easy to remember.
In the future, I would probably have a range of greens and reds to indicate the scale of the increase or decrease. For today I could not decide if I should code by number or percent, so I did nothing. Also, I am still trying to figure out how to “lighten” a color in Amcharts. I could just type in a different hex color, but that takes the fun out of learning how to do the coding for Amcharts.
To get this to work I needed to add a variable called “color”. I did this by typing “chart.dataFields.color = “color”;” I then wrote “color: “red” (or whatever color) for each institution. According to the documentation by Amcharts you can use many types of systems to set the colors, from just typing the name as I did to the hex color system.
Here are the ways to add color according to Amcharts.
am4core.color(“#ff0000”);
am4core.color(“#f00”);
am4core.color(“rgb(255, 0, 0)”);
am4core.color(“rgba(255, 0, 0, 0.5)”);
am4core.color({ r: 255, g: 0, b: 0 });
am4core.color(“red”);
Color-Coded Treemap Transfer STudents
Color-coded treemap of students that transfer to the University of Maryland College Park in fiscal 2020 compared to fiscal 2019. It seems to me that the coding, by the University System of Maryland in particular for the out-of-state students changed between fiscal 2019 and 2020. Also they only show the details for the top 15 institutions in any category.
Source: University System of Maryland, IRIS Transfer Students FY 2019 and FY 2020