All examples By author By category About

mpmckenna8

d3 load data w/ datum()

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....