For this week’s assignment I added a layer of US State data to a Stamen base map and after a lot of compromising, simply added markers for landmarks I associate with voting and politics near my parent’s house. Even as I simplified my map goal, I kept running into issues. At 3am, maki markers don’t work. At the least this theme of personal reference points carries over from last week’s assignment? I’m consistent! And I think learning to make things look better.
I added data on women’s representation in state legislatures to my json but ultimately couldn’t figure out how to add this to the map. One issue was I was at a loss to troubleshoot to when I added code that just didn’t work. For example, none of the mouseover or mouseclicked functionality I tried to incoporate worked and (in retrospect I wonder how much had to do with the local host not updating quickly, which I noticed later on).
Also, as I was manually editing the json I was thinking there is probably a better tool or piece of code to match-merge json data with other data. I googled for a tool and couldn’t find one, but it would be good to figure out a way to do this systematically for future, potentially larger, files.
In going through the examples and then adapting them to my data, I felt unclear on the difference between pulling json from an outside file versus defining it in the html (there are probably best practices for this sort of thing, too). I was also wondering if the code we use to assign these data to a variable, when referring to an outside sheet, is the same for any json or if this code was specific to geojson? I saw in the leaflet documentation that there are specific fields the json should have. That made me wonder if pulling json in some other format, say with different variables for lat long, rather than an array, would break the leaflet code?
So, I didn’t map % women in state legislatures as originally planned, but probably interrogating issues about what/whether things should be mapped this week will leave me will help me refine this idea in other ways!