CITIZEN DEVELOPER

Visualization Challenges

SCENARIO

Where can I get the best burrito in the United States? The fine folks over at FiveThirtyEight have gathered the data for us. Let's see if we can visualize it with a tree.

Example match tree for Wimbledon

The diagram above was rendered from this data, which was obtained from this site. Take notice of the shape of the data:


WTA,Location,Tournament,Date,Tier,Court,Surface,...
33,London,Wimbledon,24/06/13,Grand Slam,Outdoor,Grass,...
33,London,Wimbledon,24/06/13,Grand Slam,Outdoor,Grass,...
33,London,Wimbledon,24/06/13,Grand Slam,Outdoor,Grass,...
      

Notice how it differs from the shape of the data used to generate the tree:


{
  "name": "Murray A.",
  "round": 8,
  "children": [
    {
      "name": "Murray A.",
      "round": 7,
      "children": [
        {
          "name": "Murray A.",
          "round": 6,
          "children": [
            ...
          ],
          "match": {
            "w1": 6,
            "w2": 6,
            "w3": 7
          }
        }
      ],
      "match": {
        "w1": 7,
        "w2": 4,
        "w3": 7
      }
    }
  ],
  "match": {
    "w1": 6,
    "w2": 7,
    "w3": 6
  }
}
      

FiveThirtyEight's burrito data is not yet available on their github repo, so we've scraped the data from their site, and are providing it to you in standard CSV format.

Burrito CSV

This challenge invites you to reshape the scraped data so it can be rendered as a tree. Once you have that diagram, everyone will know what burrito is the best.

Good luck!

DESIRED OUTPUT

The tree that you've chosen requires data encoded as JSON.


{
  "name": "La Taqueria",
  "round": 4,
  "children": [
    {
      "name": "La Taqueria",
      "round": 3,
      "children": [
        {
          "name": "La Taqueria",
          "round": 2,
          "children": [
            {
              "name": "La Taqueria",
              "round": 1,
              "children": []
            },
            {
              "name": "Dos Chinos",
              "round": 1,
              "children": []
            },
            ...
            ...
          ]
        },
        {
          "name": "Cabo Bob’s Burritos",
          "round": 2,
          "children": [
            ...
            ...
            ...
            ...
          ]
        },
        ...
        ...
      ]
    },
    ...
    ...
    ...
  ]
}
      

SUBMISSION

There seems to be an error with your solution

Check Answer

ANSWER

ADDITIONAL RESOURCES