block by mpmckenna8 b152a067884caacd02b4

d3 load data w/ datum()

Full Screen

This is a map of brazil in which I loaded all the cities w/ datum to show what happens when you do this. If you open the javascript console you’ll see that there’s a giant object returned instead of each individual point like you may want. To do this use data() and enter i think. Hopefully another example soon will show how to do that. But i think it’s faster to load the data this way but you can’t add classes to each thing based on it’s properties like you might want all the cities outside of brazil a different color.

Also I think I could have rotated brazil to the middle of the map rather than rotating stuff but whatever. I think I looks alright as is. I do want to look more into how to properly set up projections for different zoom levels though….

index.html