<commit_before>_  = require \underscore
Hv = require \../../../model/hive .instance

module.exports = (vg) ->
  const ICON-SIZE = 20
  const GLYPHS =
    bank     : \\ue827
    film     : \\ue823
    magazine : \\ue832
    music    : \\ue822
    newspaper: \\ue824
    person   : \\ue801
    tv       : \\ue808
  var nodes

  vg.on \pre-render (ents) ->
    for n in ents.nodes
      n.classes.push "id_#{n._id}"
      n.classes.push \tag if n.tags?length
      n.classes.push \person if n.is-person
      n.classes.push \you if is-you n

  vg.on \render ->
    nodes := @svg.selectAll \g.node
      .data @d3f.nodes!
      .enter!append \svg:g
        .attr \class -> "node #{it.class}".trim!
    nodes
      ..append \svg:circle
        .attr \r -> 5 + it.weight + if is-you it then 10 else 0
      ..append \svg:a
        .attr \xlink:href -> "#/node/#{it._id}"
        .append \svg:text
          .attr \dy 4
          .attr \text-anchor \middle
          .text -> it.name
        .append \title
          .text -> it.name
    append-glyph (@svg.selectAll \g.node.person), GLYPHS.person, \person
    append-glyph (@svg.selectAll \g.node.tag), (-> GLYPHS[it.tags.0]), (-> it.tags.join ', ')

    for icon in icons =  (Hv.Map.get-prop \icons) or []
      g = @svg.select "g.id_#{icon.id}"
      if icon.glyph
        append-glyph g, -> icon.glyph
      else if icon.image
        size = icon.size / \x<commit_msg>increase size of YOU circle<commit_after>_  = require \underscore
Hv = require \../../../model/hive .instance

module.exports = (vg) ->
  const ICON-SIZE = 20
  const GLYPHS =
    bank     : \\ue827
    film     : \\ue823
    magazine : \\ue832
    music    : \\ue822
    newspaper: \\ue824
    person   : \\ue801
    tv       : \\ue808
  var nodes

  vg.on \pre-render (ents) ->
    for n in ents.nodes
      n.classes.push "id_#{n._id}"
      n.classes.push \tag if n.tags?length
      n.classes.push \person if n.is-person
      n.classes.push \you if is-you n

  vg.on \render ->
    nodes := @svg.selectAll \g.node
      .data @d3f.nodes!
      .enter!append \svg:g
        .attr \class -> "node #{it.class}".trim!
    nodes
      ..append \svg:circle
        .attr \r -> 5 + it.weight + if is-you it then 30 else 0
      ..append \svg:a
        .attr \xlink:href -> "#/node/#{it._id}"
        .append \svg:text
          .attr \dy 4
          .attr \text-anchor \middle
          .text -> it.name
        .append \title
          .text -> it.name
    append-glyph (@svg.selectAll \g.node.person), GLYPHS.person, \person
    append-glyph (@svg.selectAll \g.node.tag), (-> GLYPHS[it.tags.0]), (-> it.tags.join ', ')

    for icon in icons =  (Hv.Map.get-prop \icons) or []
      g = @svg.select "g.id_#{icon.id}"
      if icon.glyph
        append-glyph g, -> icon.glyph
      else if icon.image
        size = icon.size / \x
{'fraction_non_alphanumeric': 0.1589310829817159, 'fraction_numerical': 0.02109704641350211, 'mean_word_length': 1.6172953081876724, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 25, 'https://': 0, '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': '4417143', 'n_tokens_mistral': 1073, 'n_tokens_neox': 1023, 'n_words': 261}