My geojson file already contains the values of the points, but I wanted to make sure and show how to connect the csv data to this points. You need to have a field that is an identifier to connect the two together. In this case, it is the Name of the Golf course. This is what connects the two together and then later the data we want to show.
To create a scale or proportion for the radius of the circle to the value of the data, you want to use the code above. It uses d3, and you can choose between different types of scales. You can use square root, log, power, etc. This helps make the points all proportional on your map later on and links them to a size of circle, or other point you could use.
I chose to do a power scale because it made the map look a lot better. Before the circles were very large and all on top of each other. Now they are more spread out and have a better look on the map.
The first thing is to add the basemap to the canvas you created. It uses the topojson features when using that function and projects it from previous stated projections. After that you need to create boundaries using the mesh function so it can be easier understood when looking at the points. I kept the white state boundaries because it looks clean and good with them being that color with a white background.
The next thing we make and add to the canvas, is the legend. You want to place the legend in second chunk of code. The numbers associated in the translate code, moves the legend around. Next it takes the data part and takes the max and another number to show examples of the circles. I used the max and 50 since the elevation can be a negative number. The number 50 looks good in comparing the max in the legend. Then the next chunk adds in the radius part so the circles can actually show up and be seen as a legend. Then you want to see the numbers with the legend. This is an important part since without the text of the legend it would just be 2 circles without any context.
Next is the points. This chunk of code lets you change the fill of the points, and border and thickness of the circles on the map. THis is where you can select the colors. I used two color hues from COLORBREWER that look good together for the border and fill. I also played around with the thickness and opacity to make sure the map did not look messy and was easy to see the difference when the points were right on top of each other.. This is key when seeing if the map is readable without looking bad. The opacity means transparency. I stayed with circles because it looks the best in my opinion since they are easier to see and to tell a difference in while looking at a map. You go through each point (data.feature) then take the point ID and connect the value to the point. This also shows how the larger circles are in the back since nothing is covered up. The centroid makes the center of the circle exactly on the point. The next part takes together the radius and the value and makes the size of the circle.
The last line of this part makes the hover available when hovering over a point. It basically does the same thing when giving the ID and then giving the value but assigning it to text when hovering over it.
The distribution of the data definitely shows where golf courses are over the United States. Since this shows the elevation, the bigger circles are obviously following the mountain ranges of the Rockies and the Appalachians. The other thing I noticed was how there seemed to be more golf courses in highly populated areas, but at the same time it is interesting there is enough room around the cities.