Cheat Sheet:
How do you join geometries from a GeoJSON file with attributes from a CSV file?
- To join my GeoJSON to my CSV, I joined the file in QGIS. I added my Shapefile through selected QGIS along with my CSV file. After I converted projections, I right clicked on my US County Shapefile and found my way to the Join selection. There, I added my csv and chose the attribute GISJOIN to join the two features. This attribute is helpful for this function and was added above as the id attribute to join within the GeoJSON file. After I added this join, I created a new field name and ran the join. I checked my attribute table to ensure the join was correct.
Cheat Sheet:
2. How do you create and apply colors in Observable?
- First, find the correct number of classes for this map. This can be done by exploring the different classes and how they change the map. I determined 4 was an appropriate number of classes. Then, after the number of classes was decided, I chose the color scheme I wanted. For this map I chose a yellow-pink color scheme. This is because any single hue colors had the lightest color too similar to gray. So, through choosing yellow to pink, you can see the colors clearer against the gray background.
- While I could change the gray background, I find it a good neutral that allows for the focus of the map to be on the Graduated symbol.
- I found my colors on ColorBrewer after selecting my number of classes.
How are values mapped to symbol colors?
- The values are mapped from largest to smallest circles and lightest to darkest color.
Cheat Sheet:
3. How do you determine the style, width, and color of symbol outlines?
- For style, I went pretty basic for this map. However, I did want to do rainbow symbols instead to make the symbols more fun and the map more interesting. This did not work however, so I chose the circle. The circles are not distracting and allow for easy understanding of the map.
- For width of the circles, you can change this radiusArray = [5, 10, 15, 20]. I liked the sizing of these dots, as I think they are all easy to see and the differences between each symbol is significant. While I could have gone bigger, Washington has multiple islands with high populations of same-sex couples. I did not want to overshadow the islands too significantly.
- For color, I chose a multi-hue color scheme. This goes from yellow to dark pink. This allows the color to still be colorblind friendly. Additionally, the lightest color, yellow, appears significant against the gray background. For the background of each symbol, I chose black. This stood out against the gray backgrounds.
4. How do you determine the type of point symbol (e.g., circle, square)?
- For this map, I did want a different point symbol, but I landed on circle. The circle point symbols are easy to understand, are very simple, and are not distracting from the information. They stand out against the polygon shapes of the counties, which is too similar to square. This made the circles the best option with a darker transparency.
6. How do you create a legend?
- To involve the legend, the code under the map changes the legend information. This can be found under the //legend group selection. Since this map was forked, the code was already created. So, it was important to add in the attributes appropriately (the joined GeoJSON) and to connect this data to the legend in the legend section.
Changes I made to the legend:
- Changed the name of the map to make the legend more understandable.
- Connected the legend to the GeoJSON data
- I changed the distribution of each legend information piece to be 85.
7. How are attribute values displayed when hovering over each point?
- This happens through the Join later in this file with the GISJOIN attribute. This allowed for the counties to be connected with the attribute we are testing. The attribute values look like this "G3003: Attribute value".
8. How do you create the polygon basemap from TopoJSON and set its symbology?
The polygon basemap was created similar to lab 3. The data we used was converted in QGIS to a new classification (WGS84). Then, the data was exported with the centroid+CVS information into mapshaper. This was the first change of the polygons. I simplified the polygons to still include the general outline, but with less detail. I exported from mapshaper into a TopoJSon. I imported this into this map. I used the same attribute to join (GISJOIN). I set the symbology by keeping the map easy to read and understand. The map background is gray and the dividing lines are white.
Cheat Sheet:
5. How do you create a scale that links attribute values to symbol radius?
- To link the attribute value to the symbol radius, first you have to assign the attribute you are testing to points. This happens later in the notebook. I chose to test the variable for same sex married couples and the total amount of married couples. Next, you change the code for the attribute that says radiusarray to radiusarrayMath. This will allow you to edit the radius size for each of the attribute circles. For this map, my goal was to emphasize the size difference between the symbols while still making sure the smallest sizes are noticeable. So, above radiusarraymath add in another javascript line and create a radiusarray =. Then I made the array sizes into 5, 10, 15, 25. These sizes didn't completely overshadow the islands but still allowed for the size difference to be noticeable.
-
Classification choice:
- I chose Natural breaks for the classification because of the uneven distribution of the data. While there is slight skew in this dataset, it will group similar values together. I thought this would make sense with the dataset I have.