<commit_before>{
  "$schema": "https://vega.github.io/schema/vega/v3.json",
  "width": 600,
  "height": 600,
  "padding": 5,
  "autosize": {
    "type": "fit",
    "resize": true
  },
  "signals": [
    {
      "name": "yField",
      "value": "pagerank",
      "bind": {
        "input": "select",
        "options": [
          "pagerank",
          "worldTradePart",
          "worldTrade"
        ]
      }
    },
    {
      "name": "xField",
      "value": "worldTradePart",
      "bind": {
        "input": "select",
        "options": [
          "pagerank",
          "worldTradePart",
          "worldTrade"
        ]
      }
    },
    {
      "name": "year",
      "value": "1833",
      "bind": {
        "input": "range",
        "min": 1833,
        "max": 1933
      }
    },
    {
  "name": "hover",
  "value": "{}",
  "on": [
    {"events": "symbol:mouseover", "update": "datum"},
    {"events": "symbol:mouseout", "update": "{}"}
  ]
}
    
  ],
  "data": [
    {
      "name": "ricardo",
      "url": "./data/gapminderRICardo.json",
      "transform": [
        {
          "type": "formula",
          "expr": "datum.reporting + ' ' + datum.year + ' ' + datum.pagerank + ' ' +datum.worldTrade +' '+datum.worldTradePart",
          "as": "tooltip"
        }
      ]
    },
    {
      "name": "yearonly",
      "source": "ricardo",
      "transform": [
        {
          "type": "filter",
          "expr": "datum.year == year"
        }
      ]
    },
     {
      "name": "reporting_timeline",
      "source": "ricardo",
      "transform": [
        {"type": "filter", "expr": "hover && datum.reporting == hover.reporting"},
        {"type": "collect", "sort": {"field": "year"}}
      ]
    }
  ],
  "scales": [
    {
      "name": "yscale",
      "type": "linear",
      "range": [
        {
          "signal": "height"
        },
        0
      ],
      "nice": true,
      "domain": {
        "data": "ricardo",
        "field": {
          "signal": "yField"
        }
      }
    },
    {
      "name": "xscale",
      "type": "linear",
      "range": [
        0,
        {
          "signal": "width"
        }
      ],
      "nice": true,
      "domain": {
        "data": "ricardo",
        "field": {
          "signal": "xField"
        }
      }
    },
    {
      "name": "color",
      "type": "ordinal",
      "domain": {
        "data": "ricardo",
        "field": "continent"
      },
      "range": "category"
    },
     {
      "name": "year_color",
      "type": "ordinal",
      "domain": {
        "data": "reporting_timeline",
        "field": "year"
      },
      "range": {"scheme": "reds-9"} 
    }
  ],
  "axes": [
    {
      "orient": "bottom",
      "scale": "xscale",
      "offset": 5,
      "title": {
        "signal": "xField"
      }
    },
    {
      "orient": "left",
      "scale": "yscale",
      "offset": 5,
      "title": {
        "signal": "yField"
      }
    }
  ],
  "legends": [
    {
      "fill": "color",
      "title": "Continent",
      "orient": "right"
    }
  ],
  "marks": [
    {
      "type": "symbol",
      "from": {
        "data": "yearonly"
      },
      "encode": {
        "enter": {
          "size": {
            "value": 50
          },
         "fill": {
            "scale": "color",
            "field": "continent"
          },
          "tooltip": {
            "field": "tooltip"
          }
        },
        "update": {
          "x": {
            "scale": "xscale",
            "field": {
              "signal": "xField"
            }
          },
          "y": {
            "scale": "yscale",
            "field": {
              "signal": "yField"
            }
          },
            "fill": {
            "scale": "color",
            "field": "continent"
          },
          "fillOpacity": {
            "value": 0.8
          },
          "zindex": {
            "value": 0
          }
        },
        "hover": {
          "fill": {
            "value": "firebrick"
          },
          "fillOpacity": {
            "value": 1
          },
          "zindex": {
            "value": 1
          }
        }
      }
    },
    {
      "type": "text",
      "interactive": false,
      "encode": {
        "update": {
          "x": {
            "signal": "width",
            "offset": -20
          },
          "y": {
            "value": 0
          },
          "text": {"signal":"hover.reporting"} ,
          "align": {
            "value": "right"
          },
          "baseline": {
            "value": "top"
          },
          "fill": {
            "value": "#999"
          },
          "fontSize": {
            "value": 15
          }
        }
      }
    },
    {
      "type": "symbol",
      "interactive": false,
      "from": {"data": "reporting_timeline"},
      "encode": {
        "update": {
          "x": {"scale": "xscale", "field": {
              "signal": "xField"
            }},
          "y": {"scale": "yscale", "field": {
              "signal": "yField"
            }},
          "stroke": {"value": "#eee"},
          "strokeWidth": {"value": 0.1},
          "fill": {"scale": "year_color", "field":"year"}
        }
      }
    }
  ]
}<commit_msg>data over the period : display on click + year color gradient<commit_after>{
  "$schema": "https://vega.github.io/schema/vega/v3.json",
  "width": 600,
  "height": 600,
  "padding": 5,
  "autosize": {
    "type": "fit",
    "resize": true
  },
  "signals": [
    {
      "name": "yField",
      "value": "pagerank",
      "bind": {
        "input": "select",
        "options": [
          "pagerank",
          "worldTradePart",
          "worldTrade"
        ]
      }
    },
    {
      "name": "xField",
      "value": "worldTradePart",
      "bind": {
        "input": "select",
        "options": [
          "pagerank",
          "worldTradePart",
          "worldTrade"
        ]
      }
    },
    {
      "name": "year",
      "value": "1833",
      "bind": {
        "input": "range",
        "min": 1833,
        "max": 1938
      }
    },
    {
  "name": "hover",
  "value": "{}",
  "on": [
    {"events": "symbol:click", "update": "if(hover==datum,{},datum)"}
  ]
}
    
  ],
  "data": [
    {
      "name": "ricardo",
      "url": "./data/gapminderRICardo.json",
      "transform": [
        {
          "type": "formula",
          "expr": "datum.reporting + ' ' + datum.year + ' ' + datum.pagerank + ' ' +datum.worldTrade +' '+datum.worldTradePart",
          "as": "tooltip"
        }
      ]
    },
    {
      "name": "yearonly",
      "source": "ricardo",
      "transform": [
        {
          "type": "filter",
          "expr": "datum.year == year"
        }
      ]
    },
     {
      "name": "reporting_timeline",
      "source": "ricardo",
      "transform": [
        {"type": "filter", "expr": "hover && datum.reporting == hover.reporting"},
        {"type": "collect", "sort": {"field": "year"}}
      ]
    }
  ],
  "scales": [
    {
      "name": "yscale",
      "type": "linear",
      "range": [
        {
          "signal": "height"
        },
        0
      ],
      "nice": true,
      "domain": {
        "data": "ricardo",
        "field": {
          "signal": "yField"
        }
      }
    },
    {
      "name": "xscale",
      "type": "linear",
      "range": [
        0,
        {
          "signal": "width"
        }
      ],
      "nice": true,
      "domain": {
        "data": "ricardo",
        "field": {
          "signal": "xField"
        }
      }
    },
    {
      "name": "color",
      "type": "ordinal",
      "domain": {
        "data": "ricardo",
        "field": "continent"
      },
      "range": "category"
    },
     {
      "name": "year_color",
      "type": "ordinal",
      "domain": {
        "data": "reporting_timeline",
        "field": "year"
      },
      "range": {"scheme": "greys"} 
    }
  ],
  "axes": [
    {
      "orient": "bottom",
      "scale": "xscale",
      "offset": 5,
      "title": {
        "signal": "xField"
      }
    },
    {
      "orient": "left",
      "scale": "yscale",
      "offset": 5,
      "title": {
        "signal": "yField"
      }
    }
  ],
  "legends": [
    {
      "fill": "color",
      "title": "Continent",
      "orient": "right"
    },
    {
      "fill": "year_color",
      "title": "Years",
      "type": "gradient"
    }

  ],
  "marks": [
    {
      "type": "symbol",
      "from": {
        "data": "yearonly"
      },
      "encode": {
        "enter": {
          "size": {
            "value": 50
          },
         "fill": {
            "scale": "color",
            "field": "continent"
          },
          "tooltip": {
            "field": "tooltip"
          }
        },
        "update": {
          "x": {
            "scale": "xscale",
            "field": {
              "signal": "xField"
            }
          },
          "y": {
            "scale": "yscale",
            "field": {
              "signal": "yField"
            }
          },
            "fill": {
            "scale": "color",
            "field": "continent"
          },
          "fillOpacity": {
            "value": 0.8
          },
          "zindex": {
            "value": 0
          }
        },
        "hover": {
          "fill": {
            "value": "firebrick"
          },
          "fillOpacity": {
            "value": 1
          },
          "zindex": {
            "value": 1
          }
        }
      }
    },
    {
      "type": "text",
      "interactive": false,
      "encode": {
        "update": {
          "x": {
            "signal": "width",
            "offset": -20
          },
          "y": {
            "value": 0
          },
          "text": {"signal":"hover.reporting"} ,
          "align": {
            "value": "right"
          },
          "baseline": {
            "value": "top"
          },
          "fill": {
            "value": "#999"
          },
          "fontSize": {
            "value": 15
          }
        }
      }
    },
    {
      "type": "symbol",
      "interactive": true,
      "from": {"data": "reporting_timeline"},
      "encode": {
        "update": {
          "x": {"scale": "xscale", "field": {
              "signal": "xField"
            }},
          "y": {"scale": "yscale", "field": {
              "signal": "yField"
            }},
          "stroke": {"value": "#888"},
          "strokeWidth": {"value": 0.3},
          "fill": {"scale": "year_color", "field":"year"},
          "hover": {
          "fill": {
            "value": "firebrick"
          },
          "fillOpacity": {
            "value": 1
          },
          "zindex": {
            "value": 1
          },
            "tooltip": {
            "field": "tooltip"
          }
        }
        }
      }
    }
  ]
}
{'fraction_non_alphanumeric': 0.20247437909703628, 'fraction_numerical': 0.008124826885790786, 'mean_word_length': 1.1513406156901689, 'pattern_counts': {'":': 358, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4030546', 'n_tokens_mistral': 3637, 'n_tokens_neox': 3537, 'n_words': 615}