Closed DylanMoriarty closed 9 years ago
so you can put them all in via queue and then depending on the selection, the .data() function will pull in the appropriate data.
Talked to Carl and have a way to set it up so the topojson reads:
"topojson feature
properties: {
"abortion": {1990: "consent", 1991: "notice",... },
"cpc": {1990: "consent", 1991: "notice",... },
"laws": {1990: "consent", 1991: "notice",... },
}"
Which seems best to me for less headaches later.
I don't understand this solution but I trust you/Carl. :+1:
So: the issue is that if we do it the same way we did in Lab 2, we'll end up with the states being given all the attributes in the csvs. If we put in 4 csvs, each with a series of values for "1990", it won't discriminate between which csv it came from.
We want to attach an extra property to the features that'll let it go: "Ok, I've got 1990- I should only return the data for the "ultrasound" category.
...does that make sense? I'm trying to get better at describing these sort of things.
Yes. I also chatted with Carl about it since I happened to be sitting with him when I saw this.
So who is in charge of this part then? Would that be me? Or is that you, Dylan?
I jumped on it because it's necessary to establish the link here before starting the time functions, but if you want to help out that'd be cool!
I updated the JS with what I've written so far which all works fine up until the very last keyArray bit, though I'm pretty sure I'm just defining the initial array wrong.
@DylanMoriarty You are awesome. Probably makes more sense for you to just stick with it, but let me know if you have questions or need to troubleshoot.
Something unique about this project versus the second lab is that we'll be working with multiple CSV's that we'll need to cycle through.
I can see how you would call multiple datasets, but I'm going to try today figuring out how to make it systematic (as opposed to hard coding every unique csv with its own callback).
If ya'll have any solutions/ideas, holla.