Noah's PDC Blog

Skills Assignment Reflection 2

By Noah Scholfield

February 22, 2019

This week I worked on adding more features to my maps. I created some new maps so that I could add some things that didn't make sense to add to my Pittsburgh trees map. The first new map I created was just a blank map so that you can add your own points to the map. After I figured out how to add the points, I added the ability to change the color of the point on the map, add a title for the location, and a description if desired. All of these points are stored to localStorage which means that they will persist after refreshing the page or visiting it again later as long as you are using the same browser and computer. I also added a button to clear these saved locations if desired.

I also added another map to try out using filled polygons which in this case represented the shapes of US states. From there I made it so the color of the state changed based upon the census area. Then I added a popup that gives you more information about the state when you click on it. I found a site that has all of the state flags in an easy to use format so I added the state flags to the popup as well.

For my Pittsburgh trees map<add link> I did add the ability to hide the heat map layer if desired. Previously I added a bunch of filtering options to that tree map which lets you display trees on the map based upon how healthy they are. I feel like this gives a bit more info that just seeing the concentration of the trees because you also get to see what condition they are in and what areas have what condition of trees.

It was interesting taking this opportunity to learn how to do a bunch of different things in Mapbox to be able to show more types of data and make the map itself more interactive. I've always been kind of interested in Mapbox maps so it was nice to have an excuse to learn more about how to make them.

Learning Log

Start Time/Date End Time Description of Focus Notes on Process
2/13 7:15pm 8:15pm Added ability to filter the tree heat map by the condition of the tree I used a tutorial about how to filter points of a map layer.
2/13 8:15pm 9:15pm Enhanced filtering to allow you to toggle different conditions I decided to add the ability to include multiple categories in the filter so I figured out how to change the filter to allow that.
2/14 9pm 10pm Created a new page to try things out on and added a Geocoder (search box for locations) This was sort of prep work to give me a clean map to work with for further skills.
2/15 9pm 11pm Figure out how to let users add points to the map I used a couple of different tutorials and general Googling to figure out how to add the points.
2/16 8:30pm 11pm Let users add titles to the points they add and show a popup with that title when the point is clicked I mostly just used stuff I already knew but applied it to the map.
2/17 5pm 7pm Look into the capabilities of Mapbox Studio and Mapbox GL Look at the documentation for both and see what their similarities and differences are
2/18 3:45pm 4:15pm Added the ability to set a custom color for custom map points Looked at the documentation to access point properties to set color
2/19 9pm 10pm Explored how to let user's edit the points they have added but seems more complicated than I want to deal with rn Tried Googling how to get the index of the point the user clicked on but that doesn't seem to be available so I would prob have to add it.
2/20 1:30pm 3:30pm Add ability to show and hide the heatmap layer Found example in the Mapbox documentation of toggling layer visibility.
2/20 10:30pm 11:30pm Tried to see if I could use the UnsplashAPI to make a map of photos but it seems like a lot of the images don't have a location listed The API documentation showed a location field but lots of images actually leave that blank.
2/21 6pm 9pm Create a polygon map of US states and color code them by their "Census Area" Found a GeoJSON file of states and added it as a layer then figured out how to set color based upon the data.
2/22 1pm 4pm Added state flags to the popups for the state map Found a site with easily accessable state flags that I used.
Total 20 -- --