<commit_before>var mainGenres = {
	'Trap': '#8C0F28',
	'Drumstep': '#F01E87',
	'Drum & Bass': '#E10403',
	'Trance': '#0080E6', // must come before electro
	'Breaks': '#E06D61', // technically custom but must come before electro
	'Electro House': '#E5CE00', // must come before house
	'House': '#EB8200',
	'Hardcore': '#0DB106',
	'Glitch Hop': '#0A9655',
	'Post Disco': '#16ACB0',
	'Dubstep': '#941DE8',
	'Future Bass': '#979EFF',
	'EDM': '#C1C1C1',
	// begin custom colors
	'Chillout': '#F4C2C2',
    'Rock': '#B4D7BF',
    'Pop': '#B3E234',
    'pinkcloud': '#F6B4D9',
	'BTC': '#000000', // this one is treated specially
	'Mirai Sekai': '#FFFFFF' // also treated specially
};

var subgenres = {
    'Trip Hop': 'Trap',

    'Neurofunk': 'Drum & Bass',
    'Techstep': 'Drum & Bass',

    'Big Room House': 'Electro House',
    'Bounce': 'Electro House',
    'Complextro': 'Electro House',
    'Outrun': 'Electro House',

    'Electro Swing': 'House',

    'Freeform': 'Hardcore',
    'Hard Dance': 'Hardcore',

    'Moombah': 'Glitch Hop',
    'Neurohop': 'Glitch Hop',

    'Hardstyle': 'Trance',
    'Nu Style': 'Trance',

    'Electro Soul': 'Post Disco',
    'Indie Dance': 'Post Disco',
    'Nu Disco': 'Post Disco',
    'Synthpop': 'Post Disco',
    'Synthwave': 'Post Disco',

    'Brostep': 'Dubstep',
    'Garage': 'Dubstep',
    'Neurostep': 'Dubstep',
    'Riddim': 'Dubstep',

    'Nu Funk': 'Breaks',

    'Downtempo': 'Chillout',

    'Neofolk': 'Rock',
    
    'Industrial': 'EDM'
};

function getColor(genre) {
    genre = genre.toLowerCase().replace('-', ' ');
    for (var key in subgenres) {
        if (genre.indexOf(key.toLowerCase()) !== -1) {
            return mainGenres[subgenres[key]];
        }
    }
    for (var key in mainGenres) {
        if (genre.indexOf(key.toLowerCase()) !== -1) {
            return mainGenres[key];
        }
    }
    return mainGenres['EDM'];
}
<commit_msg>Slightly tweak future bass color<commit_after>var mainGenres = {
	'Trap': '#8C0F28',
	'Drumstep': '#F01E87',
	'Drum & Bass': '#E10403',
	'Trance': '#0080E6', // must come before electro
	'Breaks': '#E06D61', // technically custom but must come before electro
	'Electro House': '#E5CE00', // must come before house
	'House': '#EB8200',
	'Hardcore': '#0DB106',
	'Glitch Hop': '#0A9655',
	'Post Disco': '#16ACB0',
	'Dubstep': '#941DE8',
	'Future Bass': '#9B98FC',
	'EDM': '#C1C1C1',
	// begin custom colors
	'Chillout': '#F4C2C2',
    'Rock': '#B4D7BF',
    'Pop': '#B3E234',
    'pinkcloud': '#F6B4D9',
	'BTC': '#000000', // this one is treated specially
	'Mirai Sekai': '#FFFFFF' // also treated specially
};

var subgenres = {
    'Trip Hop': 'Trap',

    'Neurofunk': 'Drum & Bass',
    'Techstep': 'Drum & Bass',

    'Big Room House': 'Electro House',
    'Bounce': 'Electro House',
    'Complextro': 'Electro House',
    'Outrun': 'Electro House',

    'Electro Swing': 'House',

    'Freeform': 'Hardcore',
    'Hard Dance': 'Hardcore',

    'Moombah': 'Glitch Hop',
    'Neurohop': 'Glitch Hop',

    'Hardstyle': 'Trance',
    'Nu Style': 'Trance',

    'Electro Soul': 'Post Disco',
    'Indie Dance': 'Post Disco',
    'Nu Disco': 'Post Disco',
    'Synthpop': 'Post Disco',
    'Synthwave': 'Post Disco',

    'Brostep': 'Dubstep',
    'Garage': 'Dubstep',
    'Neurostep': 'Dubstep',
    'Riddim': 'Dubstep',

    'Nu Funk': 'Breaks',

    'Downtempo': 'Chillout',

    'Neofolk': 'Rock',
    
    'Industrial': 'EDM'
};

function getColor(genre) {
    genre = genre.toLowerCase().replace('-', ' ');
    for (var key in subgenres) {
        if (genre.indexOf(key.toLowerCase()) !== -1) {
            return mainGenres[subgenres[key]];
        }
    }
    for (var key in mainGenres) {
        if (genre.indexOf(key.toLowerCase()) !== -1) {
            return mainGenres[key];
        }
    }
    return mainGenres['EDM'];
}

{'fraction_non_alphanumeric': 0.19275905118601747, 'fraction_numerical': 0.03545568039950062, 'mean_word_length': 2.6921658986175117, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1293648', 'n_tokens_mistral': 1649, 'n_tokens_neox': 1496, 'n_words': 358}