<commit_before>package org.continuumio.bokeh.sampledata

object USStates extends SampleData {
    type Value = Map[USState, USStateData]

    def load(): Value = {
        load("US_States.csv").collect {
            case Array(region, name, code, geom, _) =>
                val coords = xml.XML.loadString(geom) \\ "outerBoundaryIs" \ "LinearRing" \ "coordinates"
                val Array(lats, lons, _) = coords.head.text.split(" ").map(_.split(",").map(_.toDouble)).transpose
                USState.fromString(code) -> USStateData(name, region, lats.toList, lons.toList)
        } toMap
    }
}

case class USStateData(name: String, region: String, lats: List[Double], lons: List[Double])

sealed trait USState
object USState {
    def fromString: PartialFunction[String, USState] = {
        case "AK" => AK
        case "AL" => AL
        case "AR" => AR
        case "AZ" => AZ
        case "CA" => CA
        case "CO" => CO
        case "CT" => CT
        case "DC" => DC
        case "DE" => DE
        case "FL" => FL
        case "GA" => GA
        case "HI" => HI
        case "IA" => IA
        case "ID" => ID
        case "IL" => IL
        case "IN" => IN
        case "KS" => KS
        case "KY" => KY
        case "LA" => LA
        case "MA" => MA
        case "MD" => MD
        case "ME" => ME
        case "MI" => MI
        case "MN" => MN
        case "MO" => MO
        case "MS" => MS
        case "MT" => MT
        case "NC" => NC
        case "ND" => ND
        case "NE" => NE
        case "NH" => NH
        case "NJ" => NJ
        case "NM" => NM
        case "NV" => NV
        case "NY" => NY
        case "OH" => OH
        case "OK" => OK
        case "OR" => OR
        case "PA" => PA
        case "RI" => RI
        case "SC" => SC
        case "SD" => SD
        case "TN" => TN
        case "TX" => TX
        case "UT" => UT
        case "VA" => VA
        case "VT" => VT
        case "WA" => WA
        case "WI" => WI
        case "WV" => WV
        case "WY" => WY
    }

    object AK extends USState
    object AL extends USState
    object AR extends USState
    object AZ extends USState
    object CA extends USState
    object CO extends USState
    object CT extends USState
    object DC extends USState
    object DE extends USState
    object FL extends USState
    object GA extends USState
    object HI extends USState
    object IA extends USState
    object ID extends USState
    object IL extends USState
    object IN extends USState
    object KS extends USState
    object KY extends USState
    object LA extends USState
    object MA extends USState
    object MD extends USState
    object ME extends USState
    object MI extends USState
    object MN extends USState
    object MO extends USState
    object MS extends USState
    object MT extends USState
    object NC extends USState
    object ND extends USState
    object NE extends USState
    object NH extends USState
    object NJ extends USState
    object NM extends USState
    object NV extends USState
    object NY extends USState
    object OH extends USState
    object OK extends USState
    object OR extends USState
    object PA extends USState
    object RI extends USState
    object SC extends USState
    object SD extends USState
    object TN extends USState
    object TX extends USState
    object UT extends USState
    object VA extends USState
    object VT extends USState
    object WA extends USState
    object WI extends USState
    object WV extends USState
    object WY extends USState
}<commit_msg>Change enum's items from object to case object<commit_after>package org.continuumio.bokeh.sampledata

object USStates extends SampleData {
    type Value = Map[USState, USStateData]

    def load(): Value = {
        load("US_States.csv").collect {
            case Array(region, name, code, geom, _) =>
                val coords = xml.XML.loadString(geom) \\ "outerBoundaryIs" \ "LinearRing" \ "coordinates"
                val Array(lats, lons, _) = coords.head.text.split(" ").map(_.split(",").map(_.toDouble)).transpose
                USState.fromString(code) -> USStateData(name, region, lats.toList, lons.toList)
        } toMap
    }
}

case class USStateData(name: String, region: String, lats: List[Double], lons: List[Double])

sealed trait USState
object USState {
    def fromString: PartialFunction[String, USState] = {
        case "AK" => AK
        case "AL" => AL
        case "AR" => AR
        case "AZ" => AZ
        case "CA" => CA
        case "CO" => CO
        case "CT" => CT
        case "DC" => DC
        case "DE" => DE
        case "FL" => FL
        case "GA" => GA
        case "HI" => HI
        case "IA" => IA
        case "ID" => ID
        case "IL" => IL
        case "IN" => IN
        case "KS" => KS
        case "KY" => KY
        case "LA" => LA
        case "MA" => MA
        case "MD" => MD
        case "ME" => ME
        case "MI" => MI
        case "MN" => MN
        case "MO" => MO
        case "MS" => MS
        case "MT" => MT
        case "NC" => NC
        case "ND" => ND
        case "NE" => NE
        case "NH" => NH
        case "NJ" => NJ
        case "NM" => NM
        case "NV" => NV
        case "NY" => NY
        case "OH" => OH
        case "OK" => OK
        case "OR" => OR
        case "PA" => PA
        case "RI" => RI
        case "SC" => SC
        case "SD" => SD
        case "TN" => TN
        case "TX" => TX
        case "UT" => UT
        case "VA" => VA
        case "VT" => VT
        case "WA" => WA
        case "WI" => WI
        case "WV" => WV
        case "WY" => WY
    }

    case object AK extends USState
    case object AL extends USState
    case object AR extends USState
    case object AZ extends USState
    case object CA extends USState
    case object CO extends USState
    case object CT extends USState
    case object DC extends USState
    case object DE extends USState
    case object FL extends USState
    case object GA extends USState
    case object HI extends USState
    case object IA extends USState
    case object ID extends USState
    case object IL extends USState
    case object IN extends USState
    case object KS extends USState
    case object KY extends USState
    case object LA extends USState
    case object MA extends USState
    case object MD extends USState
    case object ME extends USState
    case object MI extends USState
    case object MN extends USState
    case object MO extends USState
    case object MS extends USState
    case object MT extends USState
    case object NC extends USState
    case object ND extends USState
    case object NE extends USState
    case object NH extends USState
    case object NJ extends USState
    case object NM extends USState
    case object NV extends USState
    case object NY extends USState
    case object OH extends USState
    case object OK extends USState
    case object OR extends USState
    case object PA extends USState
    case object RI extends USState
    case object SC extends USState
    case object SD extends USState
    case object TN extends USState
    case object TX extends USState
    case object UT extends USState
    case object VA extends USState
    case object VT extends USState
    case object WA extends USState
    case object WI extends USState
    case object WV extends USState
    case object WY extends USState
}
{'fraction_non_alphanumeric': 0.08454692556634304, 'fraction_numerical': 0.0, 'mean_word_length': 1.9679871948779513, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 109, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '6527647', 'n_tokens_mistral': 2209, 'n_tokens_neox': 2118, 'n_words': 882}