In the previous examples, you used heatmaps to color code a map based on the density or intensity of points. A choropleth map also measures the intensity or density of a statistical variable but within polygons. A popular choropleth map is the population density by county. Choropleth maps do not require any plugins, as was the case with the heatmap examples. A choropleth map is usually created by styling GeoJSON based on a property.
When adding a large amount of GeoJSON data to a map, it is easier to place the code in a separate JavaScript file. This clears your HTML file of hundreds of lines of code, which makes it hard to focus on building the map. When you place the GeoJSON code in a JavaScript file, you will declare it as a variable, as shown in the following code:
var ct = {"type": "FeatureCollection", "features": [{"geometry": {"type": "Polygon", "coordinates": [[[-106.501132, 35.093911], [-106.501231, 35.09385], [-106.501481, 35...