<commit_before>export const TRANSITION_TIME = 750

export function depthToColor(depth) {
  const depthRange = Math.floor(depth / 100)
  switch(depthRange) {
    case 0: // 0 - 100
      return 0xFF0A00
    case 1: // 100 - 200
      return 0xFF7A00
    case 2: // 200 - 300
      return 0xFFF700
    case 3: // 300 - 400
      return 0x56AB00
    case 4: // 400 - 500
      return 0x00603F
    default: // > 500
      return 0x0021BC
  }
}

export function magnitudeToRadius(magnitude) {
  return 0.9 * Math.pow(1.5, (magnitude - 1))
}

// Generated using:<commit_msg>Fix coloring of earthquakes above sea level (blue -> red)<commit_after>export const TRANSITION_TIME = 750

export function depthToColor(depth) {
  // Depth can be negative (earthquake above the sea level) - use 0-100km range color in this case.
  const depthRange = Math.max(0, Math.floor(depth / 100))
  switch(depthRange) {
    case 0: // above the sea level or 0 - 100
      return 0xFF0A00
    case 1: // 100 - 200
      return 0xFF7A00
    case 2: // 200 - 300
      return 0xFFF700
    case 3: // 300 - 400
      return 0x56AB00
    case 4: // 400 - 500
      return 0x00603F
    default: // > 500
      return 0x0021BC
  }
}

export function magnitudeToRadius(magnitude) {
  return 0.9 * Math.pow(1.5, (magnitude - 1))
}

// Generated using:
{'fraction_non_alphanumeric': 0.09954407294832827, 'fraction_numerical': 0.11778115501519756, 'mean_word_length': 2.351145038167939, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '3367019', 'n_tokens_mistral': 578, 'n_tokens_neox': 438, 'n_words': 141}