Skip to content

Instantly share code, notes, and snippets.

@cmelchior
Created September 29, 2025 18:49
Show Gist options
  • Save cmelchior/1cb5865841731e3c021ebe580ee98fe6 to your computer and use it in GitHub Desktop.
Save cmelchior/1cb5865841731e3c021ebe580ee98fe6 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells" : [ {
"cell_type" : "code",
"metadata" : {
"collapsed" : true,
"ExecuteTime" : {
"end_time" : "2025-09-29T16:54:27.472277Z",
"start_time" : "2025-09-29T16:54:24.706481Z"
}
},
"source" : "%use database",
"id" : "c6de71557ad05115",
"outputs" : [ ],
"execution_count" : 1
}, {
"metadata" : {
"ExecuteTime" : {
"end_time" : "2025-09-29T16:54:28.015346Z",
"start_time" : "2025-09-29T16:54:27.474338Z"
}
},
"cell_type" : "code",
"source" : [ "@file:DependsOn(\"com.h2database:h2:2.4.240\")\n", "DataSourceDriverConfig.addDriver(\"h2\", \"com.h2database:h2:2.4.240\")" ],
"id" : "2ac4692c64d173fb",
"outputs" : [ ],
"execution_count" : 2
}, {
"metadata" : {
"ExecuteTime" : {
"end_time" : "2025-09-29T16:54:28.868617Z",
"start_time" : "2025-09-29T16:54:28.015944Z"
}
},
"cell_type" : "code",
"source" : [ "val dataSrc = createDataSourceFromSpring(\"src/main/resources/application-mysql.properties\")\n", "dataSrc.connection.metaData.url" ],
"id" : "79aef9e16a4f90b6",
"outputs" : [ {
"data" : {
"text/plain" : [ "jdbc:mysql://localhost/petclinic" ]
},
"execution_count" : 3,
"metadata" : { },
"output_type" : "execute_result"
} ],
"execution_count" : 3
}, {
"metadata" : {
"ExecuteTime" : {
"end_time" : "2025-09-29T16:54:30.237892Z",
"start_time" : "2025-09-29T16:54:28.870638Z"
}
},
"cell_type" : "code",
"source" : [ "// Include the Spring Boot JDBC Client\n", "@file:DependsOn(\"org.springframework.boot:spring-boot-starter-jdbc:4.0.0-M2\")" ],
"id" : "b344a72a9cf26bc7",
"outputs" : [ ],
"execution_count" : 4
}, {
"metadata" : {
"ExecuteTime" : {
"end_time" : "2025-09-29T16:54:30.368959Z",
"start_time" : "2025-09-29T16:54:30.240207Z"
}
},
"cell_type" : "code",
"source" : [ "import org.springframework.jdbc.core.JdbcTemplate\n", "import org.springframework.jdbc.core.simple.JdbcClient\n", "\n", "val client = JdbcTemplate(dataSrc)" ],
"id" : "7f427f6a3672cddc",
"outputs" : [ ],
"execution_count" : 5
}, {
"metadata" : {
"ExecuteTime" : {
"end_time" : "2025-09-29T16:54:30.510450Z",
"start_time" : "2025-09-29T16:54:30.374048Z"
}
},
"cell_type" : "code",
"source" : "client.queryForList(\"SELECT table_name FROM information_schema.tables WHERE table_schema = DATABASE()\", String::class.java)",
"id" : "e8ac8c655caf552e",
"outputs" : [ {
"data" : {
"text/plain" : [ "[owners, pets, specialties, types, vet_specialties, vets, visits]" ]
},
"execution_count" : 6,
"metadata" : { },
"output_type" : "execute_result"
} ],
"execution_count" : 6
}, {
"metadata" : {
"ExecuteTime" : {
"end_time" : "2025-09-29T16:55:20.060510Z",
"start_time" : "2025-09-29T16:55:20.005183Z"
}
},
"cell_type" : "code",
"source" : "client.queryForList(\"SELECT * FROM visits\")",
"id" : "b5c11bad570aae0",
"outputs" : [ {
"data" : {
"text/plain" : [ "[{id=1, pet_id=7, visit_date=2010-03-04, duration=1, description=rabies shot}, {id=2, pet_id=8, visit_date=2011-03-04, duration=1, description=rabies shot}, {id=3, pet_id=8, visit_date=2009-06-04, duration=3, description=neutered}, {id=4, pet_id=7, visit_date=2008-09-04, duration=2, description=spayed}, {id=5, pet_id=1, visit_date=2025-09-02, duration=1, description=annual checkup}, {id=6, pet_id=2, visit_date=2025-09-03, duration=2, description=dental cleaning}, {id=7, pet_id=3, visit_date=2025-09-05, duration=1, description=vaccination booster}, {id=8, pet_id=4, visit_date=2025-09-07, duration=3, description=surgery follow-up}, {id=9, pet_id=5, visit_date=2025-09-09, duration=2, description=skin condition treatment}, {id=10, pet_id=6, visit_date=2025-09-10, duration=1, description=weight check}, {id=11, pet_id=1, visit_date=2025-09-12, duration=2, description=ear infection treatment}, {id=12, pet_id=9, visit_date=2025-09-14, duration=1, description=wing clipping}, {id=13, pet_id=10, visit_date=2025-09-16, duration=2, description=arthritis medication}, {id=14, pet_id=11, visit_date=2025-09-18, duration=1, description=beak trimming}, {id=15, pet_id=12, visit_date=2025-09-20, duration=3, description=emergency visit - ingested foreign object}, {id=16, pet_id=13, visit_date=2025-09-21, duration=1, description=routine vaccination}, {id=17, pet_id=2, visit_date=2025-09-23, duration=2, description=nail trimming}, {id=18, pet_id=3, visit_date=2025-09-25, duration=1, description=flea treatment}, {id=19, pet_id=4, visit_date=2025-09-26, duration=2, description=blood work}, {id=20, pet_id=7, visit_date=2025-09-27, duration=1, description=health certificate}, {id=21, pet_id=8, visit_date=2025-09-28, duration=2, description=allergy consultation}, {id=22, pet_id=5, visit_date=2025-09-30, duration=1, description=habitat temperature check}, {id=23, pet_id=1, visit_date=2025-09-01, duration=1, description=wellness exam}, {id=24, pet_id=3, visit_date=2025-09-01, duration=2, description=microchip insertion}, {id=25, pet_id=7, visit_date=2025-09-01, duration=1, description=eye examination}, {id=26, pet_id=9, visit_date=2025-09-01, duration=3, description=emergency - injured wing}, {id=27, pet_id=11, visit_date=2025-09-02, duration=1, description=feather plucking consultation}, {id=28, pet_id=13, visit_date=2025-09-02, duration=2, description=grooming and bath}, {id=29, pet_id=2, visit_date=2025-09-02, duration=1, description=diet consultation}, {id=30, pet_id=4, visit_date=2025-09-03, duration=2, description=hip dysplasia check}, {id=31, pet_id=6, visit_date=2025-09-03, duration=1, description=shed skin removal}, {id=32, pet_id=8, visit_date=2025-09-03, duration=3, description=surgery - tumor removal}, {id=33, pet_id=10, visit_date=2025-09-04, duration=1, description=senior wellness check}, {id=34, pet_id=12, visit_date=2025-09-04, duration=2, description=behavioral consultation}, {id=35, pet_id=1, visit_date=2025-09-04, duration=1, description=claw trimming}, {id=36, pet_id=5, visit_date=2025-09-05, duration=2, description=respiratory examination}, {id=37, pet_id=7, visit_date=2025-09-06, duration=1, description=post-spay checkup}, {id=38, pet_id=9, visit_date=2025-09-06, duration=2, description=nutritional counseling}, {id=39, pet_id=11, visit_date=2025-09-06, duration=1, description=vitamin injection}, {id=40, pet_id=2, visit_date=2025-09-07, duration=3, description=orthopedic surgery}, {id=41, pet_id=4, visit_date=2025-09-07, duration=1, description=heartworm test}, {id=42, pet_id=6, visit_date=2025-09-08, duration=2, description=UV light therapy}, {id=43, pet_id=8, visit_date=2025-09-08, duration=1, description=routine deworming}, {id=44, pet_id=10, visit_date=2025-09-08, duration=2, description=pain management consultation}, {id=45, pet_id=12, visit_date=2025-09-09, duration=1, description=tick removal}, {id=46, pet_id=13, visit_date=2025-09-09, duration=3, description=dental surgery}, {id=47, pet_id=3, visit_date=2025-09-10, duration=1, description=pregnancy check}, {id=48, pet_id=5, visit_date=2025-09-10, duration=2, description=parasite screening}, {id=49, pet_id=7, visit_date=2025-09-11, duration=1, description=litter box training}, {id=50, pet_id=9, visit_date=2025-09-11, duration=2, description=molting examination}, {id=51, pet_id=11, visit_date=2025-09-11, duration=1, description=cage setup consultation}, {id=52, pet_id=1, visit_date=2025-09-12, duration=3, description=emergency - poisoning}, {id=53, pet_id=2, visit_date=2025-09-12, duration=1, description=vaccination catch-up}, {id=54, pet_id=4, visit_date=2025-09-13, duration=2, description=x-ray examination}, {id=55, pet_id=6, visit_date=2025-09-13, duration=1, description=temperature regulation check}, {id=56, pet_id=8, visit_date=2025-09-13, duration=2, description=kidney function test}, {id=57, pet_id=10, visit_date=2025-09-14, duration=1, description=mobility assessment}, {id=58, pet_id=12, visit_date=2025-09-14, duration=3, description=complex wound treatment}, {id=59, pet_id=13, visit_date=2025-09-15, duration=1, description=socialization consultation}, {id=60, pet_id=3, visit_date=2025-09-15, duration=2, description=ultrasound examination}, {id=61, pet_id=5, visit_date=2025-09-15, duration=1, description=humidity level check}, {id=62, pet_id=7, visit_date=2025-09-16, duration=2, description=laser therapy}, {id=63, pet_id=9, visit_date=2025-09-16, duration=1, description=flight training assessment}, {id=64, pet_id=1, visit_date=2025-09-17, duration=1, description=urinalysis}, {id=65, pet_id=2, visit_date=2025-09-17, duration=2, description=joint supplement consultation}, {id=66, pet_id=4, visit_date=2025-09-17, duration=1, description=exercise plan development}, {id=67, pet_id=6, visit_date=2025-09-18, duration=3, description=surgical debridement}, {id=68, pet_id=8, visit_date=2025-09-18, duration=1, description=thyroid screening}, {id=69, pet_id=10, visit_date=2025-09-19, duration=2, description=physical therapy session}, {id=70, pet_id=11, visit_date=2025-09-19, duration=1, description=environmental enrichment}, {id=71, pet_id=12, visit_date=2025-09-19, duration=2, description=aggressive behavior treatment}, {id=72, pet_id=13, visit_date=2025-09-20, duration=1, description=coat condition assessment}, {id=73, pet_id=3, visit_date=2025-09-21, duration=2, description=mammary examination}, {id=74, pet_id=5, visit_date=2025-09-21, duration=1, description=substrate change consultation}, {id=75, pet_id=7, visit_date=2025-09-22, duration=3, description=emergency - car accident}, {id=76, pet_id=9, visit_date=2025-09-22, duration=1, description=seasonal molting check}, {id=77, pet_id=1, visit_date=2025-09-22, duration=2, description=digestive health consultation}, {id=78, pet_id=2, visit_date=2025-09-23, duration=1, description=heart murmur evaluation}, {id=79, pet_id=4, visit_date=2025-09-24, duration=2, description=limping investigation}, {id=80, pet_id=6, visit_date=2025-09-24, duration=1, description=shedding assistance}, {id=81, pet_id=8, visit_date=2025-09-24, duration=3, description=cataract surgery}, {id=82, pet_id=10, visit_date=2025-09-25, duration=1, description=cognitive assessment}, {id=83, pet_id=11, visit_date=2025-09-25, duration=2, description=respiratory infection treatment}, {id=84, pet_id=12, visit_date=2025-09-26, duration=1, description=wound cleaning}, {id=85, pet_id=13, visit_date=2025-09-26, duration=2, description=anxiety medication adjustment}, {id=86, pet_id=3, visit_date=2025-09-27, duration=1, description=reproductive health check}, {id=87, pet_id=5, visit_date=2025-09-27, duration=3, description=metabolic bone disease treatment}, {id=88, pet_id=7, visit_date=2025-09-28, duration=1, description=hairball prevention}, {id=89, pet_id=9, visit_date=2025-09-28, duration=2, description=egg-laying consultation}, {id=90, pet_id=1, visit_date=2025-09-29, duration=1, description=allergy skin test}, {id=91, pet_id=2, visit_date=2025-09-29, duration=2, description=chemotherapy session}, {id=92, pet_id=4, visit_date=2025-09-29, duration=1, description=leash training advice}, {id=93, pet_id=6, visit_date=2025-09-30, duration=2, description=brumation preparation}, {id=94, pet_id=8, visit_date=2025-09-30, duration=1, description=end-of-life counseling}, {id=95, pet_id=10, visit_date=2025-09-30, duration=3, description=advanced diagnostic workup}, {id=96, pet_id=11, visit_date=2025-09-01, duration=2, description=psittacosis screening}, {id=97, pet_id=12, visit_date=2025-09-03, duration=1, description=feline herpes treatment}, {id=98, pet_id=13, visit_date=2025-09-05, duration=2, description=separation anxiety therapy}, {id=99, pet_id=1, visit_date=2025-09-08, duration=1, description=dental prophylaxis}, {id=100, pet_id=3, visit_date=2025-09-11, duration=3, description=cesarean section}, {id=101, pet_id=5, visit_date=2025-09-14, duration=1, description=calcium deficiency treatment}, {id=102, pet_id=7, visit_date=2025-09-17, duration=2, description=declawing follow-up}, {id=103, pet_id=9, visit_date=2025-09-20, duration=1, description=preening behavior consultation}, {id=104, pet_id=2, visit_date=2025-09-24, duration=2, description=insulin administration training}, {id=105, pet_id=4, visit_date=2025-09-28, duration=1, description=parvovirus prevention}, {id=106, pet_id=6, visit_date=2025-09-04, duration=3, description=impaction surgery}, {id=107, pet_id=8, visit_date=2025-09-07, duration=1, description=geriatric screening panel}, {id=108, pet_id=10, visit_date=2025-09-10, duration=2, description=rehabilitation therapy}, {id=109, pet_id=12, visit_date=2025-09-13, duration=1, description=stress reduction techniques}, {id=110, pet_id=1, visit_date=2025-09-16, duration=2, description=food allergy testing}, {id=111, pet_id=3, visit_date=2025-09-19, duration=1, description=birthing preparation}, {id=112, pet_id=5, visit_date=2025-09-22, duration=3, description=advanced herp medicine}, {id=113, pet_id=7, visit_date=2025-09-25, duration=1, description=indoor lifestyle consultation}, {id=114, pet_id=9, visit_date=2025-09-01, duration=2, description=avian wellness panel}, {id=115, pet_id=11, visit_date=2025-09-04, duration=1, description=species-appropriate diet plan}, {id=116, pet_id=13, visit_date=2025-09-07, duration=2, description=multi-pet household dynamics}, {id=117, pet_id=2, visit_date=2025-09-10, duration=1, description=preventive cardiology}, {id=118, pet_id=4, visit_date=2025-09-13, duration=3, description=ACL reconstruction}, {id=119, pet_id=6, visit_date=2025-09-16, duration=1, description=exotic pet handling training}, {id=120, pet_id=8, visit_date=2025-09-19, duration=2, description=oncology consultation}, {id=121, pet_id=10, visit_date=2025-09-22, duration=1, description=quality of life assessment}, {id=122, pet_id=12, visit_date=2025-09-25, duration=2, description=trauma wound management}, {id=123, pet_id=1, visit_date=2025-09-28, duration=1, description=preventive medicine planning}, {id=124, pet_id=3, visit_date=2025-09-02, duration=2, description=breeding soundness exam}, {id=125, pet_id=5, visit_date=2025-09-06, duration=1, description=lighting requirement consultation}, {id=126, pet_id=7, visit_date=2025-09-09, duration=3, description=emergency toxicity treatment}, {id=127, pet_id=9, visit_date=2025-09-12, duration=1, description=territorial behavior modification}, {id=128, pet_id=11, visit_date=2025-09-15, duration=2, description=chronic respiratory care}, {id=129, pet_id=13, visit_date=2025-09-18, duration=1, description=travel health certificate}, {id=130, pet_id=2, visit_date=2025-09-21, duration=2, description=chronic pain management}]" ]
},
"execution_count" : 10,
"metadata" : { },
"output_type" : "execute_result"
} ],
"execution_count" : 10
}, {
"metadata" : {
"ExecuteTime" : {
"end_time" : "2025-09-29T17:41:38.541084Z",
"start_time" : "2025-09-29T17:41:38.455788Z"
}
},
"cell_type" : "code",
"source" : [ "import org.springframework.jdbc.core.BeanPropertyRowMapper\n", "\n", "\n", "data class VetVisit(var vetId: Int = 0, var vetName: String = \"\", var hoursBilled: Int = 0)\n", "val result: List<VetVisit> = client.query(\"\"\"\n", " SELECT\n", " v.id AS vet_id,\n", " CONCAT(v.first_name, ' ', v.last_name) AS vet_name,\n", " SUM(vis.duration) AS hours_billed\n", " FROM vets v\n", " LEFT JOIN visits vis ON v.id = vis.vet_id\n", " AND YEAR(vis.visit_date) = ?\n", " AND MONTH(vis.visit_date) = ?\n", " GROUP BY v.id, v.first_name, v.last_name\n", " ORDER BY v.id\n", "\"\"\".trimIndent(), BeanPropertyRowMapper(VetVisit::class.java), 2025, 9)\n", "result" ],
"id" : "9f8e0dc00c54947f",
"outputs" : [ {
"data" : {
"text/plain" : [ "[VetVisit(vetId=1, vetName=James Carter, hoursBilled=28), VetVisit(vetId=2, vetName=Helen Leary, hoursBilled=37), VetVisit(vetId=3, vetName=Linda Douglas, hoursBilled=37), VetVisit(vetId=4, vetName=Rafael Ortega, hoursBilled=34), VetVisit(vetId=5, vetName=Henry Stevens, hoursBilled=30), VetVisit(vetId=6, vetName=Sharon Jenkins, hoursBilled=41)]" ]
},
"execution_count" : 37,
"metadata" : { },
"output_type" : "execute_result"
} ],
"execution_count" : 37
}, {
"metadata" : {
"ExecuteTime" : {
"end_time" : "2025-09-29T17:37:36.670238Z",
"start_time" : "2025-09-29T17:37:27.710367Z"
}
},
"cell_type" : "code",
"source" : "%use dataframe, kandy",
"id" : "c557c1e8237c8e5d",
"outputs" : [ ],
"execution_count" : 31
}, {
"metadata" : {
"ExecuteTime" : {
"end_time" : "2025-09-29T17:38:03.537741Z",
"start_time" : "2025-09-29T17:38:03.375112Z"
}
},
"cell_type" : "code",
"source" : [ "val df = result.toDataFrame()\n", "df" ],
"id" : "119c6af601f40767",
"outputs" : [ {
"data" : {
"text/html" : [ " <iframe onload=\"o_resize_iframe_out_3()\" style=\"width:100%;\" class=\"result_container\" id=\"iframe_out_3\" frameBorder=\"0\" srcdoc=\" &lt;html theme='dark'&gt;\n", " &lt;head&gt;\n", " &lt;style type=&quot;text&sol;css&quot;&gt;\n", " :root {\n", " --background: #fff;\n", " --background-odd: #f5f5f5;\n", " --background-hover: #d9edfd;\n", " --header-text-color: #474747;\n", " --text-color: #848484;\n", " --text-color-dark: #000;\n", " --text-color-medium: #737373;\n", " --text-color-pale: #b3b3b3;\n", " --inner-border-color: #aaa;\n", " --bold-border-color: #000;\n", " --link-color: #296eaa;\n", " --link-color-pale: #296eaa;\n", " --link-hover: #1a466c;\n", "}\n", "\n", ":root[theme=&quot;dark&quot;], :root [data-jp-theme-light=&quot;false&quot;], .dataframe_dark{\n", " --background: #303030;\n", " --background-odd: #3c3c3c;\n", " --background-hover: #464646;\n", " --header-text-color: #dddddd;\n", " --text-color: #b3b3b3;\n", " --text-color-dark: #dddddd;\n", " --text-color-medium: #b2b2b2;\n", " --text-color-pale: #737373;\n", " --inner-border-color: #707070;\n", " --bold-border-color: #777777;\n", " --link-color: #008dc0;\n", " --link-color-pale: #97e1fb;\n", " --link-hover: #00688e;\n", "}\n", "\n", "p.dataframe_description {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe {\n", " font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\n", " font-size: 12px;\n", " background-color: var(--background);\n", " color: var(--text-color-dark);\n", " border: none;\n", " border-collapse: collapse;\n", "}\n", "\n", "table.dataframe th, td {\n", " padding: 6px;\n", " border: 1px solid transparent;\n", " text-align: left;\n", "}\n", "\n", "table.dataframe th {\n", " background-color: var(--background);\n", " color: var(--header-text-color);\n", "}\n", "\n", "table.dataframe td {\n", " vertical-align: top;\n", " white-space: nowrap;\n", "}\n", "\n", "table.dataframe th.bottomBorder {\n", " border-bottom-color: var(--bold-border-color);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:nth-child(odd) {\n", " background: var(--background-odd);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:nth-child(even) {\n", " background: var(--background);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:hover {\n", " background: var(--background-hover);\n", "}\n", "\n", "table.dataframe a {\n", " cursor: pointer;\n", " color: var(--link-color);\n", " text-decoration: none;\n", "}\n", "\n", "table.dataframe tr:hover &gt; td a {\n", " color: var(--link-color-pale);\n", "}\n", "\n", "table.dataframe a:hover {\n", " color: var(--link-hover);\n", " text-decoration: underline;\n", "}\n", "\n", "table.dataframe img {\n", " max-width: fit-content;\n", "}\n", "\n", "table.dataframe th.complex {\n", " background-color: var(--background);\n", " border: 1px solid var(--background);\n", "}\n", "\n", "table.dataframe .leftBorder {\n", " border-left-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightBorder {\n", " border-right-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightAlign {\n", " text-align: right;\n", "}\n", "\n", "table.dataframe .expanderSvg {\n", " width: 8px;\n", " height: 8px;\n", " margin-right: 3px;\n", "}\n", "\n", "table.dataframe .expander {\n", " display: flex;\n", " align-items: center;\n", "}\n", "\n", "&sol;* formatting *&sol;\n", "\n", "table.dataframe .null {\n", " color: var(--text-color-pale);\n", "}\n", "\n", "table.dataframe .structural {\n", " color: var(--text-color-medium);\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .dataFrameCaption {\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .numbers {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe td:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe tr:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "\n", ":root {\n", " --scroll-bg: #f5f5f5;\n", " --scroll-fg: #b3b3b3;\n", "}\n", ":root[theme=&quot;dark&quot;], :root [data-jp-theme-light=&quot;false&quot;]{\n", " --scroll-bg: #3c3c3c;\n", " --scroll-fg: #97e1fb;\n", "}\n", "body {\n", " scrollbar-color: var(--scroll-fg) var(--scroll-bg);\n", "}\n", "body::-webkit-scrollbar {\n", " width: 10px; &sol;* Mostly for vertical scrollbars *&sol;\n", " height: 10px; &sol;* Mostly for horizontal scrollbars *&sol;\n", "}\n", "body::-webkit-scrollbar-thumb {\n", " background-color: var(--scroll-fg);\n", "}\n", "body::-webkit-scrollbar-track {\n", " background-color: var(--scroll-bg);\n", "}\n", " &lt;&sol;style&gt;\n", " &lt;&sol;head&gt;\n", " &lt;body&gt;\n", " &lt;table class=&quot;dataframe&quot; id=&quot;df_1996488708&quot;&gt;&lt;&sol;table&gt;\n", "\n", "&lt;p class=&quot;dataframe_description&quot;&gt;DataFrame: rowsCount = 6, columnsCount = 3&lt;&sol;p&gt;\n", "\n", " &lt;&sol;body&gt;\n", " &lt;script&gt;\n", " (function () {\n", " window.DataFrame = window.DataFrame || new (function () {\n", " this.addTable = function (df) {\n", " let cols = df.cols;\n", " for (let i = 0; i &lt; cols.length; i++) {\n", " for (let c of cols[i].children) {\n", " cols[c].parent = i;\n", " }\n", " }\n", " df.nrow = 0\n", " for (let i = 0; i &lt; df.cols.length; i++) {\n", " if (df.cols[i].values.length &gt; df.nrow) df.nrow = df.cols[i].values.length\n", " }\n", " if (df.id === df.rootId) {\n", " df.expandedFrames = new Set()\n", " df.childFrames = {}\n", " const table = this.getTableElement(df.id)\n", " table.df = df\n", " for (let i = 0; i &lt; df.cols.length; i++) {\n", " let col = df.cols[i]\n", " if (col.parent === undefined &amp;&amp; col.children.length &gt; 0) col.expanded = true\n", " }\n", " } else {\n", " const rootDf = this.getTableData(df.rootId)\n", " rootDf.childFrames[df.id] = df\n", " }\n", " }\n", "\n", " this.computeRenderData = function (df) {\n", " let result = []\n", " let pos = 0\n", " for (let col = 0; col &lt; df.cols.length; col++) {\n", " if (df.cols[col].parent === undefined)\n", " pos += this.computeRenderDataRec(df.cols, col, pos, 0, result, false, false)\n", " }\n", " for (let i = 0; i &lt; result.length; i++) {\n", " let row = result[i]\n", " for (let j = 0; j &lt; row.length; j++) {\n", " let cell = row[j]\n", " if (j === 0)\n", " cell.leftBd = false\n", " if (j &lt; row.length - 1) {\n", " let nextData = row[j + 1]\n", " if (nextData.leftBd) cell.rightBd = true\n", " else if (cell.rightBd) nextData.leftBd = true\n", " } else cell.rightBd = false\n", " }\n", " }\n", " return result\n", " }\n", "\n", " this.computeRenderDataRec = function (cols, colId, pos, depth, result, leftBorder, rightBorder) {\n", " if (result.length === depth) {\n", " const array = [];\n", " if (pos &gt; 0) {\n", " let j = 0\n", " for (let i = 0; j &lt; pos; i++) {\n", " let c = result[depth - 1][i]\n", " j += c.span\n", " let copy = Object.assign({empty: true}, c)\n", " array.push(copy)\n", " }\n", " }\n", " result.push(array)\n", " }\n", " const col = cols[colId];\n", " let size = 0;\n", " if (col.expanded) {\n", " let childPos = pos\n", " for (let i = 0; i &lt; col.children.length; i++) {\n", " let child = col.children[i]\n", " let childLeft = i === 0 &amp;&amp; (col.children.length &gt; 1 || leftBorder)\n", " let childRight = i === col.children.length - 1 &amp;&amp; (col.children.length &gt; 1 || rightBorder)\n", " let childSize = this.computeRenderDataRec(cols, child, childPos, depth + 1, result, childLeft, childRight)\n", " childPos += childSize\n", " size += childSize\n", " }\n", " } else {\n", " for (let i = depth + 1; i &lt; result.length; i++)\n", " result[i].push({id: colId, span: 1, leftBd: leftBorder, rightBd: rightBorder, empty: true})\n", " size = 1\n", " }\n", " let left = leftBorder\n", " let right = rightBorder\n", " if (size &gt; 1) {\n", " left = true\n", " right = true\n", " }\n", " result[depth].push({id: colId, span: size, leftBd: left, rightBd: right})\n", " return size\n", " }\n", "\n", " this.getTableElement = function (id) {\n", " return document.getElementById(&quot;df_&quot; + id)\n", " }\n", "\n", " this.getTableData = function (id) {\n", " return this.getTableElement(id).df\n", " }\n", "\n", " this.createExpander = function (isExpanded) {\n", " const svgNs = &quot;http:&sol;&sol;www.w3.org&sol;2000&sol;svg&quot;\n", " let svg = document.createElementNS(svgNs, &quot;svg&quot;)\n", " svg.classList.add(&quot;expanderSvg&quot;)\n", " let path = document.createElementNS(svgNs, &quot;path&quot;)\n", " if (isExpanded) {\n", " svg.setAttribute(&quot;viewBox&quot;, &quot;0 -2 8 8&quot;)\n", " path.setAttribute(&quot;d&quot;, &quot;M1 0 l-1 1 4 4 4 -4 -1 -1 -3 3Z&quot;)\n", " } else {\n", " svg.setAttribute(&quot;viewBox&quot;, &quot;-2 0 8 8&quot;)\n", " path.setAttribute(&quot;d&quot;, &quot;M1 0 l-1 1 3 3 -3 3 1 1 4 -4Z&quot;)\n", " }\n", " path.setAttribute(&quot;fill&quot;, &quot;currentColor&quot;)\n", " svg.appendChild(path)\n", " return svg\n", " }\n", "\n", " this.renderTable = function (id) {\n", "\n", " let table = this.getTableElement(id)\n", "\n", " if (table === null) return\n", "\n", " table.innerHTML = &quot;&quot;\n", "\n", " let df = table.df\n", " let rootDf = df.rootId === df.id ? df : this.getTableData(df.rootId)\n", "\n", " &sol;&sol; header\n", " let header = document.createElement(&quot;thead&quot;)\n", " table.appendChild(header)\n", "\n", " let renderData = this.computeRenderData(df)\n", " for (let j = 0; j &lt; renderData.length; j++) {\n", " let rowData = renderData[j]\n", " let tr = document.createElement(&quot;tr&quot;);\n", " let isLastRow = j === renderData.length - 1\n", " header.appendChild(tr);\n", " for (let i = 0; i &lt; rowData.length; i++) {\n", " let cell = rowData[i]\n", " let th = document.createElement(&quot;th&quot;);\n", " th.setAttribute(&quot;colspan&quot;, cell.span)\n", " let colId = cell.id\n", " let col = df.cols[colId];\n", " if (!cell.empty) {\n", " if (col.children.length === 0) {\n", " th.innerHTML = col.name\n", " } else {\n", " let link = document.createElement(&quot;a&quot;)\n", " link.className = &quot;expander&quot;\n", " let that = this\n", " link.onclick = function () {\n", " col.expanded = !col.expanded\n", " that.renderTable(id)\n", " }\n", " link.appendChild(this.createExpander(col.expanded))\n", " link.innerHTML += col.name\n", " th.appendChild(link)\n", " }\n", " }\n", " let classes = (cell.leftBd ? &quot; leftBorder&quot; : &quot;&quot;) + (cell.rightBd ? &quot; rightBorder&quot; : &quot;&quot;)\n", " if (col.rightAlign)\n", " classes += &quot; rightAlign&quot;\n", " if (isLastRow)\n", " classes += &quot; bottomBorder&quot;\n", " if (classes.length &gt; 0)\n", " th.setAttribute(&quot;class&quot;, classes)\n", " tr.appendChild(th)\n", " }\n", " }\n", "\n", " &sol;&sol; body\n", " let body = document.createElement(&quot;tbody&quot;)\n", " table.appendChild(body)\n", "\n", " let columns = renderData.pop()\n", " for (let row = 0; row &lt; df.nrow; row++) {\n", " let tr = document.createElement(&quot;tr&quot;);\n", " body.appendChild(tr)\n", " for (let i = 0; i &lt; columns.length; i++) {\n", " let cell = columns[i]\n", " let td = document.createElement(&quot;td&quot;);\n", " let colId = cell.id\n", " let col = df.cols[colId]\n", " let classes = (cell.leftBd ? &quot; leftBorder&quot; : &quot;&quot;) + (cell.rightBd ? &quot; rightBorder&quot; : &quot;&quot;)\n", " if (col.rightAlign)\n", " classes += &quot; rightAlign&quot;\n", " if (classes.length &gt; 0)\n", " td.setAttribute(&quot;class&quot;, classes)\n", " tr.appendChild(td)\n", " let value = col.values[row]\n", " if (value.frameId !== undefined) {\n", " let frameId = value.frameId\n", " let expanded = rootDf.expandedFrames.has(frameId)\n", " let link = document.createElement(&quot;a&quot;)\n", " link.className = &quot;expander&quot;\n", " let that = this\n", " link.onclick = function () {\n", " if (rootDf.expandedFrames.has(frameId))\n", " rootDf.expandedFrames.delete(frameId)\n", " else rootDf.expandedFrames.add(frameId)\n", " that.renderTable(id)\n", " }\n", " link.appendChild(this.createExpander(expanded))\n", " link.innerHTML += value.value\n", " if (expanded) {\n", " td.appendChild(link)\n", " td.appendChild(document.createElement(&quot;p&quot;))\n", " const childTable = document.createElement(&quot;table&quot;)\n", " childTable.className = &quot;dataframe&quot;\n", " childTable.id = &quot;df_&quot; + frameId\n", " let childDf = rootDf.childFrames[frameId]\n", " childTable.df = childDf\n", " td.appendChild(childTable)\n", " this.renderTable(frameId)\n", " if (childDf.nrow !== childDf.totalRows) {\n", " const footer = document.createElement(&quot;p&quot;)\n", " footer.innerText = `... showing only top ${childDf.nrow} of ${childDf.totalRows} rows`\n", " td.appendChild(footer)\n", " }\n", " } else {\n", " td.appendChild(link)\n", " }\n", " } else if (value.style !== undefined) {\n", " td.innerHTML = value.value\n", " td.setAttribute(&quot;style&quot;, value.style)\n", " } else td.innerHTML = value\n", " this.nodeScriptReplace(td)\n", " }\n", " }\n", " }\n", "\n", " this.nodeScriptReplace = function (node) {\n", " if (this.nodeScriptIs(node) === true) {\n", " node.parentNode.replaceChild(this.nodeScriptClone(node), node);\n", " } else {\n", " let i = -1, children = node.childNodes;\n", " while (++i &lt; children.length) {\n", " this.nodeScriptReplace(children[i]);\n", " }\n", " }\n", "\n", " return node;\n", " }\n", "\n", " this.nodeScriptClone = function (node) {\n", " let script = document.createElement(&quot;script&quot;);\n", " script.text = node.innerHTML;\n", "\n", " let i = -1, attrs = node.attributes, attr;\n", " while (++i &lt; attrs.length) {\n", " script.setAttribute((attr = attrs[i]).name, attr.value);\n", " }\n", " return script;\n", " }\n", "\n", " this.nodeScriptIs = function (node) {\n", " return node.tagName === 'SCRIPT';\n", " }\n", " })()\n", "\n", " window.call_DataFrame = function (f) {\n", " return f();\n", " };\n", "\n", " let funQueue = window[&quot;kotlinQueues&quot;] &amp;&amp; window[&quot;kotlinQueues&quot;][&quot;DataFrame&quot;];\n", " if (funQueue) {\n", " funQueue.forEach(function (f) {\n", " f();\n", " });\n", " funQueue = [];\n", " }\n", "})()\n", "\n", "&sol;*&lt;!--*&sol;\n", "call_DataFrame(function() { DataFrame.addTable({ cols: [{ name: &quot;&lt;span title=&bsol;&quot;vetId: Int&bsol;&quot;&gt;vetId&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;1&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;2&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;3&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;4&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;5&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;6&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;vetName: String&bsol;&quot;&gt;vetName&lt;&sol;span&gt;&quot;, children: [], rightAlign: false, values: [&quot;James Carter&quot;,&quot;Helen Leary&quot;,&quot;Linda Douglas&quot;,&quot;Rafael Ortega&quot;,&quot;Henry Stevens&quot;,&quot;Sharon Jenkins&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;hoursBilled: Int&bsol;&quot;&gt;hoursBilled&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;28&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;37&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;37&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;34&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;30&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;41&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "], id: 1996488708, rootId: 1996488708, totalRows: 6 } ) });\n", "&sol;*--&gt;*&sol;\n", "\n", "call_DataFrame(function() { DataFrame.renderTable(1996488708) });\n", "\n", "\n", " &lt;&sol;script&gt;\n", " &lt;&sol;html&gt;\"></iframe>\n", " <script>\n", " function o_resize_iframe_out_3() {\n", " let elem = document.getElementById(\"iframe_out_3\");\n", " resize_iframe_out_3(elem);\n", " setInterval(resize_iframe_out_3, 5000, elem);\n", " }\n", " function resize_iframe_out_3(el) {\n", " let h = el.contentWindow.document.body.scrollHeight;\n", " el.height = h === 0 ? 0 : h + 41;\n", " }\n", " </script> <html theme='dark'>\n", " <head>\n", " <style type=\"text/css\">\n", " :root {\n", " --background: #fff;\n", " --background-odd: #f5f5f5;\n", " --background-hover: #d9edfd;\n", " --header-text-color: #474747;\n", " --text-color: #848484;\n", " --text-color-dark: #000;\n", " --text-color-medium: #737373;\n", " --text-color-pale: #b3b3b3;\n", " --inner-border-color: #aaa;\n", " --bold-border-color: #000;\n", " --link-color: #296eaa;\n", " --link-color-pale: #296eaa;\n", " --link-hover: #1a466c;\n", "}\n", "\n", ":root[theme=\"dark\"], :root [data-jp-theme-light=\"false\"], .dataframe_dark{\n", " --background: #303030;\n", " --background-odd: #3c3c3c;\n", " --background-hover: #464646;\n", " --header-text-color: #dddddd;\n", " --text-color: #b3b3b3;\n", " --text-color-dark: #dddddd;\n", " --text-color-medium: #b2b2b2;\n", " --text-color-pale: #737373;\n", " --inner-border-color: #707070;\n", " --bold-border-color: #777777;\n", " --link-color: #008dc0;\n", " --link-color-pale: #97e1fb;\n", " --link-hover: #00688e;\n", "}\n", "\n", "p.dataframe_description {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe {\n", " font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n", " font-size: 12px;\n", " background-color: var(--background);\n", " color: var(--text-color-dark);\n", " border: none;\n", " border-collapse: collapse;\n", "}\n", "\n", "table.dataframe th, td {\n", " padding: 6px;\n", " border: 1px solid transparent;\n", " text-align: left;\n", "}\n", "\n", "table.dataframe th {\n", " background-color: var(--background);\n", " color: var(--header-text-color);\n", "}\n", "\n", "table.dataframe td {\n", " vertical-align: top;\n", " white-space: nowrap;\n", "}\n", "\n", "table.dataframe th.bottomBorder {\n", " border-bottom-color: var(--bold-border-color);\n", "}\n", "\n", "table.dataframe tbody > tr:nth-child(odd) {\n", " background: var(--background-odd);\n", "}\n", "\n", "table.dataframe tbody > tr:nth-child(even) {\n", " background: var(--background);\n", "}\n", "\n", "table.dataframe tbody > tr:hover {\n", " background: var(--background-hover);\n", "}\n", "\n", "table.dataframe a {\n", " cursor: pointer;\n", " color: var(--link-color);\n", " text-decoration: none;\n", "}\n", "\n", "table.dataframe tr:hover > td a {\n", " color: var(--link-color-pale);\n", "}\n", "\n", "table.dataframe a:hover {\n", " color: var(--link-hover);\n", " text-decoration: underline;\n", "}\n", "\n", "table.dataframe img {\n", " max-width: fit-content;\n", "}\n", "\n", "table.dataframe th.complex {\n", " background-color: var(--background);\n", " border: 1px solid var(--background);\n", "}\n", "\n", "table.dataframe .leftBorder {\n", " border-left-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightBorder {\n", " border-right-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightAlign {\n", " text-align: right;\n", "}\n", "\n", "table.dataframe .expanderSvg {\n", " width: 8px;\n", " height: 8px;\n", " margin-right: 3px;\n", "}\n", "\n", "table.dataframe .expander {\n", " display: flex;\n", " align-items: center;\n", "}\n", "\n", "/* formatting */\n", "\n", "table.dataframe .null {\n", " color: var(--text-color-pale);\n", "}\n", "\n", "table.dataframe .structural {\n", " color: var(--text-color-medium);\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .dataFrameCaption {\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .numbers {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe td:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe tr:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "\n", " </style>\n", " </head>\n", " <body>\n", " <table class=\"dataframe\" id=\"static_df_1996488709\"><thead><tr><th class=\"bottomBorder\" style=\"text-align:left\">vetId</th><th class=\"bottomBorder\" style=\"text-align:left\">vetName</th><th class=\"bottomBorder\" style=\"text-align:left\">hoursBilled</th></tr></thead><tbody><tr><td style=\"vertical-align:top\">1</td><td style=\"vertical-align:top\">James Carter</td><td style=\"vertical-align:top\">28</td></tr><tr><td style=\"vertical-align:top\">2</td><td style=\"vertical-align:top\">Helen Leary</td><td style=\"vertical-align:top\">37</td></tr><tr><td style=\"vertical-align:top\">3</td><td style=\"vertical-align:top\">Linda Douglas</td><td style=\"vertical-align:top\">37</td></tr><tr><td style=\"vertical-align:top\">4</td><td style=\"vertical-align:top\">Rafael Ortega</td><td style=\"vertical-align:top\">34</td></tr><tr><td style=\"vertical-align:top\">5</td><td style=\"vertical-align:top\">Henry Stevens</td><td style=\"vertical-align:top\">30</td></tr><tr><td style=\"vertical-align:top\">6</td><td style=\"vertical-align:top\">Sharon Jenkins</td><td style=\"vertical-align:top\">41</td></tr></tbody></table>\n", " </body>\n", " <script>\n", " document.getElementById(\"static_df_1996488709\").style.display = \"none\";\n", " </script>\n", " </html>" ],
"application/kotlindataframe+json" : "{\"$version\":\"2.2.0\",\"metadata\":{\"columns\":[\"vetId\",\"vetName\",\"hoursBilled\"],\"types\":[{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Int\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.String\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Int\"}],\"nrow\":6,\"ncol\":3,\"is_formatted\":false},\"kotlin_dataframe\":[{\"vetId\":1,\"vetName\":\"James Carter\",\"hoursBilled\":28},{\"vetId\":2,\"vetName\":\"Helen Leary\",\"hoursBilled\":37},{\"vetId\":3,\"vetName\":\"Linda Douglas\",\"hoursBilled\":37},{\"vetId\":4,\"vetName\":\"Rafael Ortega\",\"hoursBilled\":34},{\"vetId\":5,\"vetName\":\"Henry Stevens\",\"hoursBilled\":30},{\"vetId\":6,\"vetName\":\"Sharon Jenkins\",\"hoursBilled\":41}]}"
},
"execution_count" : 34,
"metadata" : { },
"output_type" : "execute_result"
} ],
"execution_count" : 34
}, {
"metadata" : {
"ExecuteTime" : {
"end_time" : "2025-09-29T18:37:06.255306Z",
"start_time" : "2025-09-29T18:37:06.151869Z"
}
},
"cell_type" : "code",
"source" : [ "// Plot working hours data\n", "df.plot {\n", " bars {\n", " x(vetName)\n", " y(hoursBilled)\n", " }\n", "}" ],
"id" : "2d88506556718f04",
"outputs" : [ {
"data" : {
"text/html" : [ " <iframe src='about:blank' style='border:none !important;' width='600' height='400' srcdoc=\"&lt;html lang=&quot;en&quot;>\n", " &lt;head>\n", " &lt;meta charset=&quot;UTF-8&quot;>\n", " &lt;style> html, body { margin: 0; padding: 0; overflow: hidden; } &lt;/style>\n", " &lt;script type=&quot;text/javascript&quot; data-lets-plot-script=&quot;library&quot; src=&quot;https://cdn.jsdelivr.net/gh/JetBrains/[email protected]/js-package/distr/lets-plot.min.js&quot;>&lt;/script>\n", " &lt;/head>\n", " &lt;body>\n", " &lt;div id=&quot;oCMlM3&quot;>&lt;/div>\n", " &lt;script type=&quot;text/javascript&quot; data-lets-plot-script=&quot;plot&quot;>\n", " \n", " (function() {\n", " // ----------\n", " \n", " const forceImmediateRender = false;\n", " const responsive = false;\n", " \n", " let sizing = {\n", " width_mode: &quot;FIXED&quot;,\n", " height_mode: &quot;FIXED&quot;,\n", " width: 600.0, \n", " height: 400.0 \n", " };\n", " \n", " const preferredWidth = document.body.dataset.letsPlotPreferredWidth;\n", " if (preferredWidth !== undefined) {\n", " sizing = {\n", " width_mode: 'FIXED',\n", " height_mode: 'SCALED',\n", " width: parseFloat(preferredWidth)\n", " };\n", " }\n", " \n", " const containerDiv = document.getElementById(&quot;oCMlM3&quot;);\n", " let fig = null;\n", " \n", " function renderPlot() {\n", " if (fig === null) {\n", " const plotSpec = {\n", "&quot;mapping&quot;:{\n", "},\n", "&quot;data&quot;:{\n", "&quot;vetName&quot;:[&quot;James Carter&quot;,&quot;Helen Leary&quot;,&quot;Linda Douglas&quot;,&quot;Rafael Ortega&quot;,&quot;Henry Stevens&quot;,&quot;Sharon Jenkins&quot;],\n", "&quot;hoursBilled&quot;:[28.0,37.0,37.0,34.0,30.0,41.0]\n", "},\n", "&quot;kind&quot;:&quot;plot&quot;,\n", "&quot;scales&quot;:[{\n", "&quot;aesthetic&quot;:&quot;x&quot;,\n", "&quot;discrete&quot;:true\n", "},{\n", "&quot;aesthetic&quot;:&quot;y&quot;,\n", "&quot;limits&quot;:[null,null]\n", "}],\n", "&quot;layers&quot;:[{\n", "&quot;mapping&quot;:{\n", "&quot;x&quot;:&quot;vetName&quot;,\n", "&quot;y&quot;:&quot;hoursBilled&quot;\n", "},\n", "&quot;stat&quot;:&quot;identity&quot;,\n", "&quot;sampling&quot;:&quot;none&quot;,\n", "&quot;inherit_aes&quot;:false,\n", "&quot;position&quot;:&quot;dodge&quot;,\n", "&quot;geom&quot;:&quot;bar&quot;,\n", "&quot;data&quot;:{\n", "}\n", "}],\n", "&quot;data_meta&quot;:{\n", "&quot;series_annotations&quot;:[{\n", "&quot;type&quot;:&quot;str&quot;,\n", "&quot;column&quot;:&quot;vetName&quot;\n", "},{\n", "&quot;type&quot;:&quot;int&quot;,\n", "&quot;column&quot;:&quot;hoursBilled&quot;\n", "}]\n", "},\n", "&quot;spec_id&quot;:&quot;5&quot;\n", "};\n", " fig = LetsPlot.buildPlotFromProcessedSpecs(plotSpec, containerDiv, sizing);\n", " } else {\n", " fig.updateView({});\n", " }\n", " }\n", " \n", " const renderImmediately = \n", " forceImmediateRender || (\n", " sizing.width_mode === 'FIXED' &amp;&amp; \n", " (sizing.height_mode === 'FIXED' || sizing.height_mode === 'SCALED')\n", " );\n", " \n", " if (renderImmediately) {\n", " renderPlot();\n", " }\n", " \n", " if (!renderImmediately || responsive) {\n", " // Set up observer for initial sizing or continuous monitoring\n", " var observer = new ResizeObserver(function(entries) {\n", " for (let entry of entries) {\n", " if (entry.contentBoxSize &amp;&amp; \n", " entry.contentBoxSize[0].inlineSize > 0) {\n", " if (!responsive &amp;&amp; observer) {\n", " observer.disconnect();\n", " observer = null;\n", " }\n", " renderPlot();\n", " if (!responsive) {\n", " break;\n", " }\n", " }\n", " }\n", " });\n", " \n", " observer.observe(containerDiv);\n", " }\n", " \n", " // ----------\n", " })();\n", " \n", " &lt;/script>\n", " &lt;/body>\n", "&lt;/html>\"></iframe> <svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" display=\"block\" class=\"plt-container\" id=7a49f49f-7c0e-414c-960f-291ad16473cb width=\"100%\" height=\"100%\" style=\"max-width: 600.0px; max-height: 400.0px;\" viewBox=\"0 0 600.0 400.0\" preserveAspectRatio=\"xMinYMin meet\">\n", " <style type=\"text/css\">\n", " .plt-container {\n", " font-family: sans-serif;\n", " user-select: none;\n", " -webkit-user-select: none;\n", " -moz-user-select: none;\n", " -ms-user-select: none;\n", "}\n", "text {\n", " text-rendering: optimizeLegibility;\n", "}\n", "#pjyp5ZY .plot-title {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 16.0px;\n", "\n", "}\n", "#pjyp5ZY .plot-subtitle {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 15.0px;\n", "\n", "}\n", "#pjyp5ZY .plot-caption {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#pjyp5ZY .hyperlink-element {\n", "fill: #118ed8;\n", "font-weight: normal;\n", " font-style: normal;\n", "}\n", "#pjyp5ZY .legend-title {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 15.0px;\n", "\n", "}\n", "#pjyp5ZY .legend-item {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#pjyp5ZY .axis-title-x {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 15.0px;\n", "\n", "}\n", "#pjyp5ZY .axis-text-x {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#dbuf6pq .axis-tooltip-text-x {\n", "fill: #ffffff;\n", "font-weight: normal;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#pjyp5ZY .axis-title-y {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 15.0px;\n", "\n", "}\n", "#pjyp5ZY .axis-text-y {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#dbuf6pq .axis-tooltip-text-y {\n", "fill: #ffffff;\n", "font-weight: normal;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#pjyp5ZY .facet-strip-text-x {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#pjyp5ZY .facet-strip-text-y {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#dbuf6pq .tooltip-text {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#dbuf6pq .tooltip-title {\n", "fill: #474747;\n", "font-weight: bold;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#dbuf6pq .tooltip-label {\n", "fill: #474747;\n", "font-weight: bold;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "\n", " </style>\n", " <g id=\"pjyp5ZY\">\n", " <path fill-rule=\"evenodd\" fill=\"rgb(255,255,255)\" fill-opacity=\"1.0\" d=\"M0.0 0.0 L0.0 400.0 L600.0 400.0 L600.0 0.0 Z\">\n", " </path>\n", " <g transform=\"translate(21.0 6.0 ) \">\n", " <g>\n", " <g transform=\"translate(17.961210910936405 0.0 ) \">\n", " <g>\n", " <line x1=\"57.2659068107764\" y1=\"0.0\" x2=\"57.2659068107764\" y2=\"338.4\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"145.36730190427855\" y1=\"0.0\" x2=\"145.36730190427855\" y2=\"338.4\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"233.46869699778068\" y1=\"0.0\" x2=\"233.46869699778068\" y2=\"338.4\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"321.57009209128285\" y1=\"0.0\" x2=\"321.57009209128285\" y2=\"338.4\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"409.671487184785\" y1=\"0.0\" x2=\"409.671487184785\" y2=\"338.4\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"497.77288227828717\" y1=\"0.0\" x2=\"497.77288227828717\" y2=\"338.4\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " </g>\n", " </g>\n", " <g transform=\"translate(17.961210910936405 0.0 ) \">\n", " <g>\n", " <line x1=\"0.0\" y1=\"338.4\" x2=\"555.0387890890636\" y2=\"338.4\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"299.09686411149823\" x2=\"555.0387890890636\" y2=\"299.09686411149823\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"259.7937282229965\" x2=\"555.0387890890636\" y2=\"259.7937282229965\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"220.49059233449475\" x2=\"555.0387890890636\" y2=\"220.49059233449475\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"181.187456445993\" x2=\"555.0387890890636\" y2=\"181.187456445993\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"141.88432055749126\" x2=\"555.0387890890636\" y2=\"141.88432055749126\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"102.58118466898952\" x2=\"555.0387890890636\" y2=\"102.58118466898952\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"63.27804878048778\" x2=\"555.0387890890636\" y2=\"63.27804878048778\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"23.974912891986037\" x2=\"555.0387890890636\" y2=\"23.974912891986037\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " </g>\n", " </g>\n", " </g>\n", " <g clip-path=\"url(#cszpXqB)\" clip-bounds-jfx=\"[rect (17.961210910936405, 0.0), (555.0387890890636, 338.4)]\">\n", " <g transform=\"translate(17.961210910936405 0.0 ) \">\n", " <g>\n", " <g>\n", " <rect x=\"458.1272544862112\" y=\"16.1142857142857\" height=\"322.2857142857143\" width=\"79.29125558415194\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(17,142,216)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"370.02585939270904\" y=\"102.58118466898952\" height=\"235.81881533101046\" width=\"79.29125558415194\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(17,142,216)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"281.9244642992069\" y=\"71.13867595818812\" height=\"267.26132404181186\" width=\"79.29125558415194\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(17,142,216)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"193.8230692057047\" y=\"47.55679442508705\" height=\"290.84320557491293\" width=\"79.29125558415194\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(17,142,216)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"105.72167411220258\" y=\"47.55679442508705\" height=\"290.84320557491293\" width=\"79.29125558415197\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(17,142,216)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"17.62027901870043\" y=\"118.30243902439022\" height=\"220.09756097560975\" width=\"79.29125558415194\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(17,142,216)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " </g>\n", " </g>\n", " </g>\n", " <defs>\n", " <clipPath id=\"cszpXqB\">\n", " <rect x=\"17.961210910936405\" y=\"0.0\" width=\"555.0387890890636\" height=\"338.4\">\n", " </rect>\n", " </clipPath>\n", " </defs>\n", " </g>\n", " <g>\n", " <g transform=\"translate(17.961210910936405 338.4 ) \">\n", " <g transform=\"translate(57.2659068107764 0.0 ) \">\n", " <line stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" x2=\"0.0\" y2=\"4.0\">\n", " </line>\n", " <g transform=\"translate(0.0 6.0 ) \">\n", " <text class=\"axis-text-x\" text-anchor=\"middle\" dy=\"0.7em\" y=\"0.0\">\n", " <tspan>James Carter</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(145.36730190427855 0.0 ) \">\n", " <line stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" x2=\"0.0\" y2=\"4.0\">\n", " </line>\n", " <g transform=\"translate(0.0 21.6 ) \">\n", " <text class=\"axis-text-x\" text-anchor=\"middle\" dy=\"0.7em\" y=\"0.0\">\n", " <tspan>Helen Leary</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(233.46869699778068 0.0 ) \">\n", " <line stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" x2=\"0.0\" y2=\"4.0\">\n", " </line>\n", " <g transform=\"translate(0.0 6.0 ) \">\n", " <text class=\"axis-text-x\" text-anchor=\"middle\" dy=\"0.7em\" y=\"0.0\">\n", " <tspan>Linda Douglas</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(321.57009209128285 0.0 ) \">\n", " <line stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" x2=\"0.0\" y2=\"4.0\">\n", " </line>\n", " <g transform=\"translate(0.0 21.6 ) \">\n", " <text class=\"axis-text-x\" text-anchor=\"middle\" dy=\"0.7em\" y=\"0.0\">\n", " <tspan>Rafael Ortega</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(409.671487184785 0.0 ) \">\n", " <line stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" x2=\"0.0\" y2=\"4.0\">\n", " </line>\n", " <g transform=\"translate(0.0 6.0 ) \">\n", " <text class=\"axis-text-x\" text-anchor=\"middle\" dy=\"0.7em\" y=\"0.0\">\n", " <tspan>Henry Stevens</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(497.77288227828717 0.0 ) \">\n", " <line stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" x2=\"0.0\" y2=\"4.0\">\n", " </line>\n", " <g transform=\"translate(0.0 21.6 ) \">\n", " <text class=\"axis-text-x\" text-anchor=\"middle\" dy=\"0.7em\" y=\"0.0\">\n", " <tspan>Sharon Jenkins</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <line x1=\"0.0\" y1=\"0.0\" x2=\"555.0387890890636\" y2=\"0.0\" stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\">\n", " </line>\n", " </g>\n", " <g transform=\"translate(17.961210910936405 0.0 ) \">\n", " <g transform=\"translate(0.0 338.4 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\" y=\"0.0\">\n", " <tspan>0</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 299.09686411149823 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\" y=\"0.0\">\n", " <tspan>5</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 259.7937282229965 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\" y=\"0.0\">\n", " <tspan>10</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 220.49059233449475 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\" y=\"0.0\">\n", " <tspan>15</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 181.187456445993 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\" y=\"0.0\">\n", " <tspan>20</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 141.88432055749126 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\" y=\"0.0\">\n", " <tspan>25</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 102.58118466898952 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\" y=\"0.0\">\n", " <tspan>30</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 63.27804878048778 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\" y=\"0.0\">\n", " <tspan>35</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 23.974912891986037 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\" y=\"0.0\">\n", " <tspan>40</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " <g transform=\"translate(15.0 175.2 ) rotate(-90.0 ) \">\n", " <text class=\"axis-title-y\" y=\"0.0\" text-anchor=\"middle\">\n", " <tspan>hoursBilled</tspan>\n", " </text>\n", " </g>\n", " <g transform=\"translate(316.4806054554682 394.0 ) \">\n", " <text class=\"axis-title-x\" y=\"0.0\" text-anchor=\"middle\">\n", " <tspan>vetName</tspan>\n", " </text>\n", " </g>\n", " <path fill=\"rgb(0,0,0)\" fill-opacity=\"0.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" stroke-width=\"0.0\" d=\"M0.0 0.0 L0.0 400.0 L600.0 400.0 L600.0 0.0 Z\" pointer-events=\"none\">\n", " </path>\n", " </g>\n", " <g id=\"dbuf6pq\">\n", " </g>\n", "</svg>\n", " <script>document.getElementById(\"7a49f49f-7c0e-414c-960f-291ad16473cb\").style.display = \"none\";</script>" ],
"application/plot+json" : {
"output_type" : "lets_plot_spec",
"output" : {
"mapping" : { },
"data" : {
"vetName" : [ "James Carter", "Helen Leary", "Linda Douglas", "Rafael Ortega", "Henry Stevens", "Sharon Jenkins" ],
"hoursBilled" : [ 28.0, 37.0, 37.0, 34.0, 30.0, 41.0 ]
},
"kind" : "plot",
"scales" : [ {
"aesthetic" : "x",
"discrete" : true
}, {
"aesthetic" : "y",
"limits" : [ null, null ]
} ],
"layers" : [ {
"mapping" : {
"x" : "vetName",
"y" : "hoursBilled"
},
"stat" : "identity",
"sampling" : "none",
"inherit_aes" : false,
"position" : "dodge",
"geom" : "bar"
} ],
"data_meta" : {
"series_annotations" : [ {
"type" : "str",
"column" : "vetName"
}, {
"type" : "int",
"column" : "hoursBilled"
} ]
}
},
"apply_color_scheme" : true,
"swing_enabled" : true
}
},
"execution_count" : 50,
"metadata" : { },
"output_type" : "execute_result"
} ],
"execution_count" : 50
}, {
"metadata" : {
"ExecuteTime" : {
"end_time" : "2025-09-29T18:15:34.954779Z",
"start_time" : "2025-09-29T18:15:22.982157Z"
}
},
"cell_type" : "code",
"source" : "%use ktor-client",
"id" : "32f60f40025ccf7",
"outputs" : [ ],
"execution_count" : 38
}, {
"metadata" : {
"ExecuteTime" : {
"end_time" : "2025-09-29T18:36:08.018284Z",
"start_time" : "2025-09-29T18:36:07.858763Z"
}
},
"cell_type" : "code",
"source" : "http.get(\"http://localhost:8081/api/vetWorkInfo/date/2025-09-01\").bodyAsText()",
"id" : "582b3aa74fc0cc1",
"outputs" : [ {
"data" : {
"application/json" : [ {
"vetId" : 101,
"payment" : 0.0
}, {
"vetId" : 102,
"payment" : 0.0
} ],
"text/plain" : [ "[\n", " {\n", " \"vetId\": 101,\n", " \"payment\": 0.0\n", " },\n", " {\n", " \"vetId\": 102,\n", " \"payment\": 0.0\n", " }\n", "]" ],
"text/markdown" : "```json\n[\n {\n \"vetId\": 101,\n \"payment\": 0.0\n },\n {\n \"vetId\": 102,\n \"payment\": 0.0\n }\n]\n```"
},
"execution_count" : 47,
"metadata" : {
"application/json" : {
"expanded" : true
}
},
"output_type" : "execute_result"
} ],
"execution_count" : 47
}, {
"metadata" : {
"ExecuteTime" : {
"end_time" : "2025-09-29T18:36:12.492660Z",
"start_time" : "2025-09-29T18:36:12.329372Z"
}
},
"cell_type" : "code",
"source" : [ "import io.ktor.client.request.setBody\n", "import io.ktor.http.ContentType\n", "import io.ktor.http.contentType\n", "\n", "df.rows().forEach { row ->\n", " http.post(\"http://localhost:8081/api/vetWorkInfo\") {\n", " contentType(ContentType.Application.Json)\n", " setBody(\"\"\"\n", " {\n", " \"date\": \"2025-09-01\",\n", " \"vetId\": ${row.vetId},\n", " \"workHours\": ${row.hoursBilled}\n", " }\n", " \"\"\".trimIndent())\n", " }\n", "}" ],
"id" : "d491faf55020a0ba",
"outputs" : [ ],
"execution_count" : 48
}, {
"metadata" : {
"ExecuteTime" : {
"end_time" : "2025-09-29T18:37:44.726583Z",
"start_time" : "2025-09-29T18:37:44.588311Z"
}
},
"cell_type" : "code",
"source" : [ "val salaryData = http.get(\"http://localhost:8081/api/vetWorkInfo/date/2025-09-01\").deserializeJson()\n", "salaryData" ],
"id" : "997c60434a348380",
"outputs" : [ {
"data" : {
"application/json" : [ {
"vetId" : 101,
"payment" : 0.0
}, {
"vetId" : 102,
"payment" : 0.0
}, {
"vetId" : 3,
"payment" : 2220.0
}, {
"vetId" : 4,
"payment" : 2210.0
}, {
"vetId" : 5,
"payment" : 2100.0
}, {
"vetId" : 6,
"payment" : 3280.0
} ],
"text/plain" : [ "[\n", " {\n", " \"vetId\": 101,\n", " \"payment\": 0.0\n", " },\n", " {\n", " \"vetId\": 102,\n", " \"payment\": 0.0\n", " },\n", " {\n", " \"vetId\": 3,\n", " \"payment\": 2220.0\n", " },\n", " {\n", " \"vetId\": 4,\n", " \"payment\": 2210.0\n", " },\n", " {\n", " \"vetId\": 5,\n", " \"payment\": 2100.0\n", " },\n", " {\n", " \"vetId\": 6,\n", " \"payment\": 3280.0\n", " }\n", "]" ],
"text/markdown" : "```json\n[\n {\n \"vetId\": 101,\n \"payment\": 0.0\n },\n {\n \"vetId\": 102,\n \"payment\": 0.0\n },\n {\n \"vetId\": 3,\n \"payment\": 2220.0\n },\n {\n \"vetId\": 4,\n \"payment\": 2210.0\n },\n {\n \"vetId\": 5,\n \"payment\": 2100.0\n },\n {\n \"vetId\": 6,\n \"payment\": 3280.0\n }\n]\n```"
},
"execution_count" : 52,
"metadata" : {
"application/json" : {
"expanded" : true
}
},
"output_type" : "execute_result"
} ],
"execution_count" : 52
}, {
"metadata" : {
"ExecuteTime" : {
"end_time" : "2025-09-29T18:39:25.939227Z",
"start_time" : "2025-09-29T18:39:25.771964Z"
}
},
"cell_type" : "code",
"source" : [ "// Plot salary data\n", "val salaryDataFrame = salaryData.toDataFrame()\n", "salaryDataFrame" ],
"id" : "752a36bf3e1eae61",
"outputs" : [ {
"data" : {
"text/html" : [ " <iframe onload=\"o_resize_iframe_out_9()\" style=\"width:100%;\" class=\"result_container\" id=\"iframe_out_9\" frameBorder=\"0\" srcdoc=\" &lt;html theme='dark'&gt;\n", " &lt;head&gt;\n", " &lt;style type=&quot;text&sol;css&quot;&gt;\n", " :root {\n", " --background: #fff;\n", " --background-odd: #f5f5f5;\n", " --background-hover: #d9edfd;\n", " --header-text-color: #474747;\n", " --text-color: #848484;\n", " --text-color-dark: #000;\n", " --text-color-medium: #737373;\n", " --text-color-pale: #b3b3b3;\n", " --inner-border-color: #aaa;\n", " --bold-border-color: #000;\n", " --link-color: #296eaa;\n", " --link-color-pale: #296eaa;\n", " --link-hover: #1a466c;\n", "}\n", "\n", ":root[theme=&quot;dark&quot;], :root [data-jp-theme-light=&quot;false&quot;], .dataframe_dark{\n", " --background: #303030;\n", " --background-odd: #3c3c3c;\n", " --background-hover: #464646;\n", " --header-text-color: #dddddd;\n", " --text-color: #b3b3b3;\n", " --text-color-dark: #dddddd;\n", " --text-color-medium: #b2b2b2;\n", " --text-color-pale: #737373;\n", " --inner-border-color: #707070;\n", " --bold-border-color: #777777;\n", " --link-color: #008dc0;\n", " --link-color-pale: #97e1fb;\n", " --link-hover: #00688e;\n", "}\n", "\n", "p.dataframe_description {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe {\n", " font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\n", " font-size: 12px;\n", " background-color: var(--background);\n", " color: var(--text-color-dark);\n", " border: none;\n", " border-collapse: collapse;\n", "}\n", "\n", "table.dataframe th, td {\n", " padding: 6px;\n", " border: 1px solid transparent;\n", " text-align: left;\n", "}\n", "\n", "table.dataframe th {\n", " background-color: var(--background);\n", " color: var(--header-text-color);\n", "}\n", "\n", "table.dataframe td {\n", " vertical-align: top;\n", " white-space: nowrap;\n", "}\n", "\n", "table.dataframe th.bottomBorder {\n", " border-bottom-color: var(--bold-border-color);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:nth-child(odd) {\n", " background: var(--background-odd);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:nth-child(even) {\n", " background: var(--background);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:hover {\n", " background: var(--background-hover);\n", "}\n", "\n", "table.dataframe a {\n", " cursor: pointer;\n", " color: var(--link-color);\n", " text-decoration: none;\n", "}\n", "\n", "table.dataframe tr:hover &gt; td a {\n", " color: var(--link-color-pale);\n", "}\n", "\n", "table.dataframe a:hover {\n", " color: var(--link-hover);\n", " text-decoration: underline;\n", "}\n", "\n", "table.dataframe img {\n", " max-width: fit-content;\n", "}\n", "\n", "table.dataframe th.complex {\n", " background-color: var(--background);\n", " border: 1px solid var(--background);\n", "}\n", "\n", "table.dataframe .leftBorder {\n", " border-left-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightBorder {\n", " border-right-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightAlign {\n", " text-align: right;\n", "}\n", "\n", "table.dataframe .expanderSvg {\n", " width: 8px;\n", " height: 8px;\n", " margin-right: 3px;\n", "}\n", "\n", "table.dataframe .expander {\n", " display: flex;\n", " align-items: center;\n", "}\n", "\n", "&sol;* formatting *&sol;\n", "\n", "table.dataframe .null {\n", " color: var(--text-color-pale);\n", "}\n", "\n", "table.dataframe .structural {\n", " color: var(--text-color-medium);\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .dataFrameCaption {\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .numbers {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe td:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe tr:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "\n", ":root {\n", " --scroll-bg: #f5f5f5;\n", " --scroll-fg: #b3b3b3;\n", "}\n", ":root[theme=&quot;dark&quot;], :root [data-jp-theme-light=&quot;false&quot;]{\n", " --scroll-bg: #3c3c3c;\n", " --scroll-fg: #97e1fb;\n", "}\n", "body {\n", " scrollbar-color: var(--scroll-fg) var(--scroll-bg);\n", "}\n", "body::-webkit-scrollbar {\n", " width: 10px; &sol;* Mostly for vertical scrollbars *&sol;\n", " height: 10px; &sol;* Mostly for horizontal scrollbars *&sol;\n", "}\n", "body::-webkit-scrollbar-thumb {\n", " background-color: var(--scroll-fg);\n", "}\n", "body::-webkit-scrollbar-track {\n", " background-color: var(--scroll-bg);\n", "}\n", " &lt;&sol;style&gt;\n", " &lt;&sol;head&gt;\n", " &lt;body&gt;\n", " &lt;table class=&quot;dataframe&quot; id=&quot;df_1996488720&quot;&gt;&lt;&sol;table&gt;\n", "\n", "&lt;p class=&quot;dataframe_description&quot;&gt;DataFrame: rowsCount = 6, columnsCount = 2&lt;&sol;p&gt;\n", "\n", " &lt;&sol;body&gt;\n", " &lt;script&gt;\n", " (function () {\n", " window.DataFrame = window.DataFrame || new (function () {\n", " this.addTable = function (df) {\n", " let cols = df.cols;\n", " for (let i = 0; i &lt; cols.length; i++) {\n", " for (let c of cols[i].children) {\n", " cols[c].parent = i;\n", " }\n", " }\n", " df.nrow = 0\n", " for (let i = 0; i &lt; df.cols.length; i++) {\n", " if (df.cols[i].values.length &gt; df.nrow) df.nrow = df.cols[i].values.length\n", " }\n", " if (df.id === df.rootId) {\n", " df.expandedFrames = new Set()\n", " df.childFrames = {}\n", " const table = this.getTableElement(df.id)\n", " table.df = df\n", " for (let i = 0; i &lt; df.cols.length; i++) {\n", " let col = df.cols[i]\n", " if (col.parent === undefined &amp;&amp; col.children.length &gt; 0) col.expanded = true\n", " }\n", " } else {\n", " const rootDf = this.getTableData(df.rootId)\n", " rootDf.childFrames[df.id] = df\n", " }\n", " }\n", "\n", " this.computeRenderData = function (df) {\n", " let result = []\n", " let pos = 0\n", " for (let col = 0; col &lt; df.cols.length; col++) {\n", " if (df.cols[col].parent === undefined)\n", " pos += this.computeRenderDataRec(df.cols, col, pos, 0, result, false, false)\n", " }\n", " for (let i = 0; i &lt; result.length; i++) {\n", " let row = result[i]\n", " for (let j = 0; j &lt; row.length; j++) {\n", " let cell = row[j]\n", " if (j === 0)\n", " cell.leftBd = false\n", " if (j &lt; row.length - 1) {\n", " let nextData = row[j + 1]\n", " if (nextData.leftBd) cell.rightBd = true\n", " else if (cell.rightBd) nextData.leftBd = true\n", " } else cell.rightBd = false\n", " }\n", " }\n", " return result\n", " }\n", "\n", " this.computeRenderDataRec = function (cols, colId, pos, depth, result, leftBorder, rightBorder) {\n", " if (result.length === depth) {\n", " const array = [];\n", " if (pos &gt; 0) {\n", " let j = 0\n", " for (let i = 0; j &lt; pos; i++) {\n", " let c = result[depth - 1][i]\n", " j += c.span\n", " let copy = Object.assign({empty: true}, c)\n", " array.push(copy)\n", " }\n", " }\n", " result.push(array)\n", " }\n", " const col = cols[colId];\n", " let size = 0;\n", " if (col.expanded) {\n", " let childPos = pos\n", " for (let i = 0; i &lt; col.children.length; i++) {\n", " let child = col.children[i]\n", " let childLeft = i === 0 &amp;&amp; (col.children.length &gt; 1 || leftBorder)\n", " let childRight = i === col.children.length - 1 &amp;&amp; (col.children.length &gt; 1 || rightBorder)\n", " let childSize = this.computeRenderDataRec(cols, child, childPos, depth + 1, result, childLeft, childRight)\n", " childPos += childSize\n", " size += childSize\n", " }\n", " } else {\n", " for (let i = depth + 1; i &lt; result.length; i++)\n", " result[i].push({id: colId, span: 1, leftBd: leftBorder, rightBd: rightBorder, empty: true})\n", " size = 1\n", " }\n", " let left = leftBorder\n", " let right = rightBorder\n", " if (size &gt; 1) {\n", " left = true\n", " right = true\n", " }\n", " result[depth].push({id: colId, span: size, leftBd: left, rightBd: right})\n", " return size\n", " }\n", "\n", " this.getTableElement = function (id) {\n", " return document.getElementById(&quot;df_&quot; + id)\n", " }\n", "\n", " this.getTableData = function (id) {\n", " return this.getTableElement(id).df\n", " }\n", "\n", " this.createExpander = function (isExpanded) {\n", " const svgNs = &quot;http:&sol;&sol;www.w3.org&sol;2000&sol;svg&quot;\n", " let svg = document.createElementNS(svgNs, &quot;svg&quot;)\n", " svg.classList.add(&quot;expanderSvg&quot;)\n", " let path = document.createElementNS(svgNs, &quot;path&quot;)\n", " if (isExpanded) {\n", " svg.setAttribute(&quot;viewBox&quot;, &quot;0 -2 8 8&quot;)\n", " path.setAttribute(&quot;d&quot;, &quot;M1 0 l-1 1 4 4 4 -4 -1 -1 -3 3Z&quot;)\n", " } else {\n", " svg.setAttribute(&quot;viewBox&quot;, &quot;-2 0 8 8&quot;)\n", " path.setAttribute(&quot;d&quot;, &quot;M1 0 l-1 1 3 3 -3 3 1 1 4 -4Z&quot;)\n", " }\n", " path.setAttribute(&quot;fill&quot;, &quot;currentColor&quot;)\n", " svg.appendChild(path)\n", " return svg\n", " }\n", "\n", " this.renderTable = function (id) {\n", "\n", " let table = this.getTableElement(id)\n", "\n", " if (table === null) return\n", "\n", " table.innerHTML = &quot;&quot;\n", "\n", " let df = table.df\n", " let rootDf = df.rootId === df.id ? df : this.getTableData(df.rootId)\n", "\n", " &sol;&sol; header\n", " let header = document.createElement(&quot;thead&quot;)\n", " table.appendChild(header)\n", "\n", " let renderData = this.computeRenderData(df)\n", " for (let j = 0; j &lt; renderData.length; j++) {\n", " let rowData = renderData[j]\n", " let tr = document.createElement(&quot;tr&quot;);\n", " let isLastRow = j === renderData.length - 1\n", " header.appendChild(tr);\n", " for (let i = 0; i &lt; rowData.length; i++) {\n", " let cell = rowData[i]\n", " let th = document.createElement(&quot;th&quot;);\n", " th.setAttribute(&quot;colspan&quot;, cell.span)\n", " let colId = cell.id\n", " let col = df.cols[colId];\n", " if (!cell.empty) {\n", " if (col.children.length === 0) {\n", " th.innerHTML = col.name\n", " } else {\n", " let link = document.createElement(&quot;a&quot;)\n", " link.className = &quot;expander&quot;\n", " let that = this\n", " link.onclick = function () {\n", " col.expanded = !col.expanded\n", " that.renderTable(id)\n", " }\n", " link.appendChild(this.createExpander(col.expanded))\n", " link.innerHTML += col.name\n", " th.appendChild(link)\n", " }\n", " }\n", " let classes = (cell.leftBd ? &quot; leftBorder&quot; : &quot;&quot;) + (cell.rightBd ? &quot; rightBorder&quot; : &quot;&quot;)\n", " if (col.rightAlign)\n", " classes += &quot; rightAlign&quot;\n", " if (isLastRow)\n", " classes += &quot; bottomBorder&quot;\n", " if (classes.length &gt; 0)\n", " th.setAttribute(&quot;class&quot;, classes)\n", " tr.appendChild(th)\n", " }\n", " }\n", "\n", " &sol;&sol; body\n", " let body = document.createElement(&quot;tbody&quot;)\n", " table.appendChild(body)\n", "\n", " let columns = renderData.pop()\n", " for (let row = 0; row &lt; df.nrow; row++) {\n", " let tr = document.createElement(&quot;tr&quot;);\n", " body.appendChild(tr)\n", " for (let i = 0; i &lt; columns.length; i++) {\n", " let cell = columns[i]\n", " let td = document.createElement(&quot;td&quot;);\n", " let colId = cell.id\n", " let col = df.cols[colId]\n", " let classes = (cell.leftBd ? &quot; leftBorder&quot; : &quot;&quot;) + (cell.rightBd ? &quot; rightBorder&quot; : &quot;&quot;)\n", " if (col.rightAlign)\n", " classes += &quot; rightAlign&quot;\n", " if (classes.length &gt; 0)\n", " td.setAttribute(&quot;class&quot;, classes)\n", " tr.appendChild(td)\n", " let value = col.values[row]\n", " if (value.frameId !== undefined) {\n", " let frameId = value.frameId\n", " let expanded = rootDf.expandedFrames.has(frameId)\n", " let link = document.createElement(&quot;a&quot;)\n", " link.className = &quot;expander&quot;\n", " let that = this\n", " link.onclick = function () {\n", " if (rootDf.expandedFrames.has(frameId))\n", " rootDf.expandedFrames.delete(frameId)\n", " else rootDf.expandedFrames.add(frameId)\n", " that.renderTable(id)\n", " }\n", " link.appendChild(this.createExpander(expanded))\n", " link.innerHTML += value.value\n", " if (expanded) {\n", " td.appendChild(link)\n", " td.appendChild(document.createElement(&quot;p&quot;))\n", " const childTable = document.createElement(&quot;table&quot;)\n", " childTable.className = &quot;dataframe&quot;\n", " childTable.id = &quot;df_&quot; + frameId\n", " let childDf = rootDf.childFrames[frameId]\n", " childTable.df = childDf\n", " td.appendChild(childTable)\n", " this.renderTable(frameId)\n", " if (childDf.nrow !== childDf.totalRows) {\n", " const footer = document.createElement(&quot;p&quot;)\n", " footer.innerText = `... showing only top ${childDf.nrow} of ${childDf.totalRows} rows`\n", " td.appendChild(footer)\n", " }\n", " } else {\n", " td.appendChild(link)\n", " }\n", " } else if (value.style !== undefined) {\n", " td.innerHTML = value.value\n", " td.setAttribute(&quot;style&quot;, value.style)\n", " } else td.innerHTML = value\n", " this.nodeScriptReplace(td)\n", " }\n", " }\n", " }\n", "\n", " this.nodeScriptReplace = function (node) {\n", " if (this.nodeScriptIs(node) === true) {\n", " node.parentNode.replaceChild(this.nodeScriptClone(node), node);\n", " } else {\n", " let i = -1, children = node.childNodes;\n", " while (++i &lt; children.length) {\n", " this.nodeScriptReplace(children[i]);\n", " }\n", " }\n", "\n", " return node;\n", " }\n", "\n", " this.nodeScriptClone = function (node) {\n", " let script = document.createElement(&quot;script&quot;);\n", " script.text = node.innerHTML;\n", "\n", " let i = -1, attrs = node.attributes, attr;\n", " while (++i &lt; attrs.length) {\n", " script.setAttribute((attr = attrs[i]).name, attr.value);\n", " }\n", " return script;\n", " }\n", "\n", " this.nodeScriptIs = function (node) {\n", " return node.tagName === 'SCRIPT';\n", " }\n", " })()\n", "\n", " window.call_DataFrame = function (f) {\n", " return f();\n", " };\n", "\n", " let funQueue = window[&quot;kotlinQueues&quot;] &amp;&amp; window[&quot;kotlinQueues&quot;][&quot;DataFrame&quot;];\n", " if (funQueue) {\n", " funQueue.forEach(function (f) {\n", " f();\n", " });\n", " funQueue = [];\n", " }\n", "})()\n", "\n", "&sol;*&lt;!--*&sol;\n", "call_DataFrame(function() { DataFrame.addTable({ cols: [{ name: &quot;&lt;span title=&bsol;&quot;vetId: Int&bsol;&quot;&gt;vetId&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;101&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;102&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;3&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;4&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;5&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;6&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;payment: Double&bsol;&quot;&gt;payment&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;2220.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;2210.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;2100.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;3280.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "], id: 1996488720, rootId: 1996488720, totalRows: 6 } ) });\n", "&sol;*--&gt;*&sol;\n", "\n", "call_DataFrame(function() { DataFrame.renderTable(1996488720) });\n", "\n", "\n", " &lt;&sol;script&gt;\n", " &lt;&sol;html&gt;\"></iframe>\n", " <script>\n", " function o_resize_iframe_out_9() {\n", " let elem = document.getElementById(\"iframe_out_9\");\n", " resize_iframe_out_9(elem);\n", " setInterval(resize_iframe_out_9, 5000, elem);\n", " }\n", " function resize_iframe_out_9(el) {\n", " let h = el.contentWindow.document.body.scrollHeight;\n", " el.height = h === 0 ? 0 : h + 41;\n", " }\n", " </script> <html theme='dark'>\n", " <head>\n", " <style type=\"text/css\">\n", " :root {\n", " --background: #fff;\n", " --background-odd: #f5f5f5;\n", " --background-hover: #d9edfd;\n", " --header-text-color: #474747;\n", " --text-color: #848484;\n", " --text-color-dark: #000;\n", " --text-color-medium: #737373;\n", " --text-color-pale: #b3b3b3;\n", " --inner-border-color: #aaa;\n", " --bold-border-color: #000;\n", " --link-color: #296eaa;\n", " --link-color-pale: #296eaa;\n", " --link-hover: #1a466c;\n", "}\n", "\n", ":root[theme=\"dark\"], :root [data-jp-theme-light=\"false\"], .dataframe_dark{\n", " --background: #303030;\n", " --background-odd: #3c3c3c;\n", " --background-hover: #464646;\n", " --header-text-color: #dddddd;\n", " --text-color: #b3b3b3;\n", " --text-color-dark: #dddddd;\n", " --text-color-medium: #b2b2b2;\n", " --text-color-pale: #737373;\n", " --inner-border-color: #707070;\n", " --bold-border-color: #777777;\n", " --link-color: #008dc0;\n", " --link-color-pale: #97e1fb;\n", " --link-hover: #00688e;\n", "}\n", "\n", "p.dataframe_description {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe {\n", " font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n", " font-size: 12px;\n", " background-color: var(--background);\n", " color: var(--text-color-dark);\n", " border: none;\n", " border-collapse: collapse;\n", "}\n", "\n", "table.dataframe th, td {\n", " padding: 6px;\n", " border: 1px solid transparent;\n", " text-align: left;\n", "}\n", "\n", "table.dataframe th {\n", " background-color: var(--background);\n", " color: var(--header-text-color);\n", "}\n", "\n", "table.dataframe td {\n", " vertical-align: top;\n", " white-space: nowrap;\n", "}\n", "\n", "table.dataframe th.bottomBorder {\n", " border-bottom-color: var(--bold-border-color);\n", "}\n", "\n", "table.dataframe tbody > tr:nth-child(odd) {\n", " background: var(--background-odd);\n", "}\n", "\n", "table.dataframe tbody > tr:nth-child(even) {\n", " background: var(--background);\n", "}\n", "\n", "table.dataframe tbody > tr:hover {\n", " background: var(--background-hover);\n", "}\n", "\n", "table.dataframe a {\n", " cursor: pointer;\n", " color: var(--link-color);\n", " text-decoration: none;\n", "}\n", "\n", "table.dataframe tr:hover > td a {\n", " color: var(--link-color-pale);\n", "}\n", "\n", "table.dataframe a:hover {\n", " color: var(--link-hover);\n", " text-decoration: underline;\n", "}\n", "\n", "table.dataframe img {\n", " max-width: fit-content;\n", "}\n", "\n", "table.dataframe th.complex {\n", " background-color: var(--background);\n", " border: 1px solid var(--background);\n", "}\n", "\n", "table.dataframe .leftBorder {\n", " border-left-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightBorder {\n", " border-right-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightAlign {\n", " text-align: right;\n", "}\n", "\n", "table.dataframe .expanderSvg {\n", " width: 8px;\n", " height: 8px;\n", " margin-right: 3px;\n", "}\n", "\n", "table.dataframe .expander {\n", " display: flex;\n", " align-items: center;\n", "}\n", "\n", "/* formatting */\n", "\n", "table.dataframe .null {\n", " color: var(--text-color-pale);\n", "}\n", "\n", "table.dataframe .structural {\n", " color: var(--text-color-medium);\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .dataFrameCaption {\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .numbers {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe td:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe tr:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "\n", " </style>\n", " </head>\n", " <body>\n", " <table class=\"dataframe\" id=\"static_df_1996488721\"><thead><tr><th class=\"bottomBorder\" style=\"text-align:left\">vetId</th><th class=\"bottomBorder\" style=\"text-align:left\">payment</th></tr></thead><tbody><tr><td style=\"vertical-align:top\">101</td><td style=\"vertical-align:top\">0.000000</td></tr><tr><td style=\"vertical-align:top\">102</td><td style=\"vertical-align:top\">0.000000</td></tr><tr><td style=\"vertical-align:top\">3</td><td style=\"vertical-align:top\">2220.000000</td></tr><tr><td style=\"vertical-align:top\">4</td><td style=\"vertical-align:top\">2210.000000</td></tr><tr><td style=\"vertical-align:top\">5</td><td style=\"vertical-align:top\">2100.000000</td></tr><tr><td style=\"vertical-align:top\">6</td><td style=\"vertical-align:top\">3280.000000</td></tr></tbody></table>\n", " </body>\n", " <script>\n", " document.getElementById(\"static_df_1996488721\").style.display = \"none\";\n", " </script>\n", " </html>" ],
"application/kotlindataframe+json" : "{\"$version\":\"2.2.0\",\"metadata\":{\"columns\":[\"vetId\",\"payment\"],\"types\":[{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Int\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Double\"}],\"nrow\":6,\"ncol\":2,\"is_formatted\":false},\"kotlin_dataframe\":[{\"vetId\":101,\"payment\":0.0},{\"vetId\":102,\"payment\":0.0},{\"vetId\":3,\"payment\":2220.0},{\"vetId\":4,\"payment\":2210.0},{\"vetId\":5,\"payment\":2100.0},{\"vetId\":6,\"payment\":3280.0}]}"
},
"execution_count" : 54,
"metadata" : { },
"output_type" : "execute_result"
} ],
"execution_count" : 54
}, {
"metadata" : {
"ExecuteTime" : {
"end_time" : "2025-09-29T18:43:33.648973Z",
"start_time" : "2025-09-29T18:43:33.448931Z"
}
},
"cell_type" : "code",
"source" : [ "val salary = salaryDataFrame.leftJoin(df) { vetId }\n", "salary" ],
"id" : "ea6ccd5a8bd9d8ee",
"outputs" : [ {
"data" : {
"text/html" : [ " <iframe onload=\"o_resize_iframe_out_13()\" style=\"width:100%;\" class=\"result_container\" id=\"iframe_out_13\" frameBorder=\"0\" srcdoc=\" &lt;html theme='dark'&gt;\n", " &lt;head&gt;\n", " &lt;style type=&quot;text&sol;css&quot;&gt;\n", " :root {\n", " --background: #fff;\n", " --background-odd: #f5f5f5;\n", " --background-hover: #d9edfd;\n", " --header-text-color: #474747;\n", " --text-color: #848484;\n", " --text-color-dark: #000;\n", " --text-color-medium: #737373;\n", " --text-color-pale: #b3b3b3;\n", " --inner-border-color: #aaa;\n", " --bold-border-color: #000;\n", " --link-color: #296eaa;\n", " --link-color-pale: #296eaa;\n", " --link-hover: #1a466c;\n", "}\n", "\n", ":root[theme=&quot;dark&quot;], :root [data-jp-theme-light=&quot;false&quot;], .dataframe_dark{\n", " --background: #303030;\n", " --background-odd: #3c3c3c;\n", " --background-hover: #464646;\n", " --header-text-color: #dddddd;\n", " --text-color: #b3b3b3;\n", " --text-color-dark: #dddddd;\n", " --text-color-medium: #b2b2b2;\n", " --text-color-pale: #737373;\n", " --inner-border-color: #707070;\n", " --bold-border-color: #777777;\n", " --link-color: #008dc0;\n", " --link-color-pale: #97e1fb;\n", " --link-hover: #00688e;\n", "}\n", "\n", "p.dataframe_description {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe {\n", " font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\n", " font-size: 12px;\n", " background-color: var(--background);\n", " color: var(--text-color-dark);\n", " border: none;\n", " border-collapse: collapse;\n", "}\n", "\n", "table.dataframe th, td {\n", " padding: 6px;\n", " border: 1px solid transparent;\n", " text-align: left;\n", "}\n", "\n", "table.dataframe th {\n", " background-color: var(--background);\n", " color: var(--header-text-color);\n", "}\n", "\n", "table.dataframe td {\n", " vertical-align: top;\n", " white-space: nowrap;\n", "}\n", "\n", "table.dataframe th.bottomBorder {\n", " border-bottom-color: var(--bold-border-color);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:nth-child(odd) {\n", " background: var(--background-odd);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:nth-child(even) {\n", " background: var(--background);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:hover {\n", " background: var(--background-hover);\n", "}\n", "\n", "table.dataframe a {\n", " cursor: pointer;\n", " color: var(--link-color);\n", " text-decoration: none;\n", "}\n", "\n", "table.dataframe tr:hover &gt; td a {\n", " color: var(--link-color-pale);\n", "}\n", "\n", "table.dataframe a:hover {\n", " color: var(--link-hover);\n", " text-decoration: underline;\n", "}\n", "\n", "table.dataframe img {\n", " max-width: fit-content;\n", "}\n", "\n", "table.dataframe th.complex {\n", " background-color: var(--background);\n", " border: 1px solid var(--background);\n", "}\n", "\n", "table.dataframe .leftBorder {\n", " border-left-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightBorder {\n", " border-right-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightAlign {\n", " text-align: right;\n", "}\n", "\n", "table.dataframe .expanderSvg {\n", " width: 8px;\n", " height: 8px;\n", " margin-right: 3px;\n", "}\n", "\n", "table.dataframe .expander {\n", " display: flex;\n", " align-items: center;\n", "}\n", "\n", "&sol;* formatting *&sol;\n", "\n", "table.dataframe .null {\n", " color: var(--text-color-pale);\n", "}\n", "\n", "table.dataframe .structural {\n", " color: var(--text-color-medium);\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .dataFrameCaption {\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .numbers {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe td:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe tr:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "\n", ":root {\n", " --scroll-bg: #f5f5f5;\n", " --scroll-fg: #b3b3b3;\n", "}\n", ":root[theme=&quot;dark&quot;], :root [data-jp-theme-light=&quot;false&quot;]{\n", " --scroll-bg: #3c3c3c;\n", " --scroll-fg: #97e1fb;\n", "}\n", "body {\n", " scrollbar-color: var(--scroll-fg) var(--scroll-bg);\n", "}\n", "body::-webkit-scrollbar {\n", " width: 10px; &sol;* Mostly for vertical scrollbars *&sol;\n", " height: 10px; &sol;* Mostly for horizontal scrollbars *&sol;\n", "}\n", "body::-webkit-scrollbar-thumb {\n", " background-color: var(--scroll-fg);\n", "}\n", "body::-webkit-scrollbar-track {\n", " background-color: var(--scroll-bg);\n", "}\n", " &lt;&sol;style&gt;\n", " &lt;&sol;head&gt;\n", " &lt;body&gt;\n", " &lt;table class=&quot;dataframe&quot; id=&quot;df_1996488728&quot;&gt;&lt;&sol;table&gt;\n", "\n", "&lt;p class=&quot;dataframe_description&quot;&gt;DataFrame: rowsCount = 6, columnsCount = 4&lt;&sol;p&gt;\n", "\n", " &lt;&sol;body&gt;\n", " &lt;script&gt;\n", " (function () {\n", " window.DataFrame = window.DataFrame || new (function () {\n", " this.addTable = function (df) {\n", " let cols = df.cols;\n", " for (let i = 0; i &lt; cols.length; i++) {\n", " for (let c of cols[i].children) {\n", " cols[c].parent = i;\n", " }\n", " }\n", " df.nrow = 0\n", " for (let i = 0; i &lt; df.cols.length; i++) {\n", " if (df.cols[i].values.length &gt; df.nrow) df.nrow = df.cols[i].values.length\n", " }\n", " if (df.id === df.rootId) {\n", " df.expandedFrames = new Set()\n", " df.childFrames = {}\n", " const table = this.getTableElement(df.id)\n", " table.df = df\n", " for (let i = 0; i &lt; df.cols.length; i++) {\n", " let col = df.cols[i]\n", " if (col.parent === undefined &amp;&amp; col.children.length &gt; 0) col.expanded = true\n", " }\n", " } else {\n", " const rootDf = this.getTableData(df.rootId)\n", " rootDf.childFrames[df.id] = df\n", " }\n", " }\n", "\n", " this.computeRenderData = function (df) {\n", " let result = []\n", " let pos = 0\n", " for (let col = 0; col &lt; df.cols.length; col++) {\n", " if (df.cols[col].parent === undefined)\n", " pos += this.computeRenderDataRec(df.cols, col, pos, 0, result, false, false)\n", " }\n", " for (let i = 0; i &lt; result.length; i++) {\n", " let row = result[i]\n", " for (let j = 0; j &lt; row.length; j++) {\n", " let cell = row[j]\n", " if (j === 0)\n", " cell.leftBd = false\n", " if (j &lt; row.length - 1) {\n", " let nextData = row[j + 1]\n", " if (nextData.leftBd) cell.rightBd = true\n", " else if (cell.rightBd) nextData.leftBd = true\n", " } else cell.rightBd = false\n", " }\n", " }\n", " return result\n", " }\n", "\n", " this.computeRenderDataRec = function (cols, colId, pos, depth, result, leftBorder, rightBorder) {\n", " if (result.length === depth) {\n", " const array = [];\n", " if (pos &gt; 0) {\n", " let j = 0\n", " for (let i = 0; j &lt; pos; i++) {\n", " let c = result[depth - 1][i]\n", " j += c.span\n", " let copy = Object.assign({empty: true}, c)\n", " array.push(copy)\n", " }\n", " }\n", " result.push(array)\n", " }\n", " const col = cols[colId];\n", " let size = 0;\n", " if (col.expanded) {\n", " let childPos = pos\n", " for (let i = 0; i &lt; col.children.length; i++) {\n", " let child = col.children[i]\n", " let childLeft = i === 0 &amp;&amp; (col.children.length &gt; 1 || leftBorder)\n", " let childRight = i === col.children.length - 1 &amp;&amp; (col.children.length &gt; 1 || rightBorder)\n", " let childSize = this.computeRenderDataRec(cols, child, childPos, depth + 1, result, childLeft, childRight)\n", " childPos += childSize\n", " size += childSize\n", " }\n", " } else {\n", " for (let i = depth + 1; i &lt; result.length; i++)\n", " result[i].push({id: colId, span: 1, leftBd: leftBorder, rightBd: rightBorder, empty: true})\n", " size = 1\n", " }\n", " let left = leftBorder\n", " let right = rightBorder\n", " if (size &gt; 1) {\n", " left = true\n", " right = true\n", " }\n", " result[depth].push({id: colId, span: size, leftBd: left, rightBd: right})\n", " return size\n", " }\n", "\n", " this.getTableElement = function (id) {\n", " return document.getElementById(&quot;df_&quot; + id)\n", " }\n", "\n", " this.getTableData = function (id) {\n", " return this.getTableElement(id).df\n", " }\n", "\n", " this.createExpander = function (isExpanded) {\n", " const svgNs = &quot;http:&sol;&sol;www.w3.org&sol;2000&sol;svg&quot;\n", " let svg = document.createElementNS(svgNs, &quot;svg&quot;)\n", " svg.classList.add(&quot;expanderSvg&quot;)\n", " let path = document.createElementNS(svgNs, &quot;path&quot;)\n", " if (isExpanded) {\n", " svg.setAttribute(&quot;viewBox&quot;, &quot;0 -2 8 8&quot;)\n", " path.setAttribute(&quot;d&quot;, &quot;M1 0 l-1 1 4 4 4 -4 -1 -1 -3 3Z&quot;)\n", " } else {\n", " svg.setAttribute(&quot;viewBox&quot;, &quot;-2 0 8 8&quot;)\n", " path.setAttribute(&quot;d&quot;, &quot;M1 0 l-1 1 3 3 -3 3 1 1 4 -4Z&quot;)\n", " }\n", " path.setAttribute(&quot;fill&quot;, &quot;currentColor&quot;)\n", " svg.appendChild(path)\n", " return svg\n", " }\n", "\n", " this.renderTable = function (id) {\n", "\n", " let table = this.getTableElement(id)\n", "\n", " if (table === null) return\n", "\n", " table.innerHTML = &quot;&quot;\n", "\n", " let df = table.df\n", " let rootDf = df.rootId === df.id ? df : this.getTableData(df.rootId)\n", "\n", " &sol;&sol; header\n", " let header = document.createElement(&quot;thead&quot;)\n", " table.appendChild(header)\n", "\n", " let renderData = this.computeRenderData(df)\n", " for (let j = 0; j &lt; renderData.length; j++) {\n", " let rowData = renderData[j]\n", " let tr = document.createElement(&quot;tr&quot;);\n", " let isLastRow = j === renderData.length - 1\n", " header.appendChild(tr);\n", " for (let i = 0; i &lt; rowData.length; i++) {\n", " let cell = rowData[i]\n", " let th = document.createElement(&quot;th&quot;);\n", " th.setAttribute(&quot;colspan&quot;, cell.span)\n", " let colId = cell.id\n", " let col = df.cols[colId];\n", " if (!cell.empty) {\n", " if (col.children.length === 0) {\n", " th.innerHTML = col.name\n", " } else {\n", " let link = document.createElement(&quot;a&quot;)\n", " link.className = &quot;expander&quot;\n", " let that = this\n", " link.onclick = function () {\n", " col.expanded = !col.expanded\n", " that.renderTable(id)\n", " }\n", " link.appendChild(this.createExpander(col.expanded))\n", " link.innerHTML += col.name\n", " th.appendChild(link)\n", " }\n", " }\n", " let classes = (cell.leftBd ? &quot; leftBorder&quot; : &quot;&quot;) + (cell.rightBd ? &quot; rightBorder&quot; : &quot;&quot;)\n", " if (col.rightAlign)\n", " classes += &quot; rightAlign&quot;\n", " if (isLastRow)\n", " classes += &quot; bottomBorder&quot;\n", " if (classes.length &gt; 0)\n", " th.setAttribute(&quot;class&quot;, classes)\n", " tr.appendChild(th)\n", " }\n", " }\n", "\n", " &sol;&sol; body\n", " let body = document.createElement(&quot;tbody&quot;)\n", " table.appendChild(body)\n", "\n", " let columns = renderData.pop()\n", " for (let row = 0; row &lt; df.nrow; row++) {\n", " let tr = document.createElement(&quot;tr&quot;);\n", " body.appendChild(tr)\n", " for (let i = 0; i &lt; columns.length; i++) {\n", " let cell = columns[i]\n", " let td = document.createElement(&quot;td&quot;);\n", " let colId = cell.id\n", " let col = df.cols[colId]\n", " let classes = (cell.leftBd ? &quot; leftBorder&quot; : &quot;&quot;) + (cell.rightBd ? &quot; rightBorder&quot; : &quot;&quot;)\n", " if (col.rightAlign)\n", " classes += &quot; rightAlign&quot;\n", " if (classes.length &gt; 0)\n", " td.setAttribute(&quot;class&quot;, classes)\n", " tr.appendChild(td)\n", " let value = col.values[row]\n", " if (value.frameId !== undefined) {\n", " let frameId = value.frameId\n", " let expanded = rootDf.expandedFrames.has(frameId)\n", " let link = document.createElement(&quot;a&quot;)\n", " link.className = &quot;expander&quot;\n", " let that = this\n", " link.onclick = function () {\n", " if (rootDf.expandedFrames.has(frameId))\n", " rootDf.expandedFrames.delete(frameId)\n", " else rootDf.expandedFrames.add(frameId)\n", " that.renderTable(id)\n", " }\n", " link.appendChild(this.createExpander(expanded))\n", " link.innerHTML += value.value\n", " if (expanded) {\n", " td.appendChild(link)\n", " td.appendChild(document.createElement(&quot;p&quot;))\n", " const childTable = document.createElement(&quot;table&quot;)\n", " childTable.className = &quot;dataframe&quot;\n", " childTable.id = &quot;df_&quot; + frameId\n", " let childDf = rootDf.childFrames[frameId]\n", " childTable.df = childDf\n", " td.appendChild(childTable)\n", " this.renderTable(frameId)\n", " if (childDf.nrow !== childDf.totalRows) {\n", " const footer = document.createElement(&quot;p&quot;)\n", " footer.innerText = `... showing only top ${childDf.nrow} of ${childDf.totalRows} rows`\n", " td.appendChild(footer)\n", " }\n", " } else {\n", " td.appendChild(link)\n", " }\n", " } else if (value.style !== undefined) {\n", " td.innerHTML = value.value\n", " td.setAttribute(&quot;style&quot;, value.style)\n", " } else td.innerHTML = value\n", " this.nodeScriptReplace(td)\n", " }\n", " }\n", " }\n", "\n", " this.nodeScriptReplace = function (node) {\n", " if (this.nodeScriptIs(node) === true) {\n", " node.parentNode.replaceChild(this.nodeScriptClone(node), node);\n", " } else {\n", " let i = -1, children = node.childNodes;\n", " while (++i &lt; children.length) {\n", " this.nodeScriptReplace(children[i]);\n", " }\n", " }\n", "\n", " return node;\n", " }\n", "\n", " this.nodeScriptClone = function (node) {\n", " let script = document.createElement(&quot;script&quot;);\n", " script.text = node.innerHTML;\n", "\n", " let i = -1, attrs = node.attributes, attr;\n", " while (++i &lt; attrs.length) {\n", " script.setAttribute((attr = attrs[i]).name, attr.value);\n", " }\n", " return script;\n", " }\n", "\n", " this.nodeScriptIs = function (node) {\n", " return node.tagName === 'SCRIPT';\n", " }\n", " })()\n", "\n", " window.call_DataFrame = function (f) {\n", " return f();\n", " };\n", "\n", " let funQueue = window[&quot;kotlinQueues&quot;] &amp;&amp; window[&quot;kotlinQueues&quot;][&quot;DataFrame&quot;];\n", " if (funQueue) {\n", " funQueue.forEach(function (f) {\n", " f();\n", " });\n", " funQueue = [];\n", " }\n", "})()\n", "\n", "&sol;*&lt;!--*&sol;\n", "call_DataFrame(function() { DataFrame.addTable({ cols: [{ name: &quot;&lt;span title=&bsol;&quot;vetId: Int&bsol;&quot;&gt;vetId&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;101&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;102&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;3&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;4&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;5&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;6&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;payment: Double&bsol;&quot;&gt;payment&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;2220.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;2210.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;2100.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;3280.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;vetName: String?&bsol;&quot;&gt;vetName&lt;&sol;span&gt;&quot;, children: [], rightAlign: false, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;null&bsol;&quot;&gt;null&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;null&bsol;&quot;&gt;null&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;Linda Douglas&quot;,&quot;Rafael Ortega&quot;,&quot;Henry Stevens&quot;,&quot;Sharon Jenkins&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;hoursBilled: Int?&bsol;&quot;&gt;hoursBilled&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;null&bsol;&quot;&gt;null&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;null&bsol;&quot;&gt;null&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;37&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;34&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;30&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;41&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "], id: 1996488728, rootId: 1996488728, totalRows: 6 } ) });\n", "&sol;*--&gt;*&sol;\n", "\n", "call_DataFrame(function() { DataFrame.renderTable(1996488728) });\n", "\n", "\n", " &lt;&sol;script&gt;\n", " &lt;&sol;html&gt;\"></iframe>\n", " <script>\n", " function o_resize_iframe_out_13() {\n", " let elem = document.getElementById(\"iframe_out_13\");\n", " resize_iframe_out_13(elem);\n", " setInterval(resize_iframe_out_13, 5000, elem);\n", " }\n", " function resize_iframe_out_13(el) {\n", " let h = el.contentWindow.document.body.scrollHeight;\n", " el.height = h === 0 ? 0 : h + 41;\n", " }\n", " </script> <html theme='dark'>\n", " <head>\n", " <style type=\"text/css\">\n", " :root {\n", " --background: #fff;\n", " --background-odd: #f5f5f5;\n", " --background-hover: #d9edfd;\n", " --header-text-color: #474747;\n", " --text-color: #848484;\n", " --text-color-dark: #000;\n", " --text-color-medium: #737373;\n", " --text-color-pale: #b3b3b3;\n", " --inner-border-color: #aaa;\n", " --bold-border-color: #000;\n", " --link-color: #296eaa;\n", " --link-color-pale: #296eaa;\n", " --link-hover: #1a466c;\n", "}\n", "\n", ":root[theme=\"dark\"], :root [data-jp-theme-light=\"false\"], .dataframe_dark{\n", " --background: #303030;\n", " --background-odd: #3c3c3c;\n", " --background-hover: #464646;\n", " --header-text-color: #dddddd;\n", " --text-color: #b3b3b3;\n", " --text-color-dark: #dddddd;\n", " --text-color-medium: #b2b2b2;\n", " --text-color-pale: #737373;\n", " --inner-border-color: #707070;\n", " --bold-border-color: #777777;\n", " --link-color: #008dc0;\n", " --link-color-pale: #97e1fb;\n", " --link-hover: #00688e;\n", "}\n", "\n", "p.dataframe_description {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe {\n", " font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n", " font-size: 12px;\n", " background-color: var(--background);\n", " color: var(--text-color-dark);\n", " border: none;\n", " border-collapse: collapse;\n", "}\n", "\n", "table.dataframe th, td {\n", " padding: 6px;\n", " border: 1px solid transparent;\n", " text-align: left;\n", "}\n", "\n", "table.dataframe th {\n", " background-color: var(--background);\n", " color: var(--header-text-color);\n", "}\n", "\n", "table.dataframe td {\n", " vertical-align: top;\n", " white-space: nowrap;\n", "}\n", "\n", "table.dataframe th.bottomBorder {\n", " border-bottom-color: var(--bold-border-color);\n", "}\n", "\n", "table.dataframe tbody > tr:nth-child(odd) {\n", " background: var(--background-odd);\n", "}\n", "\n", "table.dataframe tbody > tr:nth-child(even) {\n", " background: var(--background);\n", "}\n", "\n", "table.dataframe tbody > tr:hover {\n", " background: var(--background-hover);\n", "}\n", "\n", "table.dataframe a {\n", " cursor: pointer;\n", " color: var(--link-color);\n", " text-decoration: none;\n", "}\n", "\n", "table.dataframe tr:hover > td a {\n", " color: var(--link-color-pale);\n", "}\n", "\n", "table.dataframe a:hover {\n", " color: var(--link-hover);\n", " text-decoration: underline;\n", "}\n", "\n", "table.dataframe img {\n", " max-width: fit-content;\n", "}\n", "\n", "table.dataframe th.complex {\n", " background-color: var(--background);\n", " border: 1px solid var(--background);\n", "}\n", "\n", "table.dataframe .leftBorder {\n", " border-left-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightBorder {\n", " border-right-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightAlign {\n", " text-align: right;\n", "}\n", "\n", "table.dataframe .expanderSvg {\n", " width: 8px;\n", " height: 8px;\n", " margin-right: 3px;\n", "}\n", "\n", "table.dataframe .expander {\n", " display: flex;\n", " align-items: center;\n", "}\n", "\n", "/* formatting */\n", "\n", "table.dataframe .null {\n", " color: var(--text-color-pale);\n", "}\n", "\n", "table.dataframe .structural {\n", " color: var(--text-color-medium);\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .dataFrameCaption {\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .numbers {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe td:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe tr:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "\n", " </style>\n", " </head>\n", " <body>\n", " <table class=\"dataframe\" id=\"static_df_1996488729\"><thead><tr><th class=\"bottomBorder\" style=\"text-align:left\">vetId</th><th class=\"bottomBorder\" style=\"text-align:left\">payment</th><th class=\"bottomBorder\" style=\"text-align:left\">vetName</th><th class=\"bottomBorder\" style=\"text-align:left\">hoursBilled</th></tr></thead><tbody><tr><td style=\"vertical-align:top\">101</td><td style=\"vertical-align:top\">0.000000</td><td style=\"vertical-align:top\">null</td><td style=\"vertical-align:top\">null</td></tr><tr><td style=\"vertical-align:top\">102</td><td style=\"vertical-align:top\">0.000000</td><td style=\"vertical-align:top\">null</td><td style=\"vertical-align:top\">null</td></tr><tr><td style=\"vertical-align:top\">3</td><td style=\"vertical-align:top\">2220.000000</td><td style=\"vertical-align:top\">Linda Douglas</td><td style=\"vertical-align:top\">37</td></tr><tr><td style=\"vertical-align:top\">4</td><td style=\"vertical-align:top\">2210.000000</td><td style=\"vertical-align:top\">Rafael Ortega</td><td style=\"vertical-align:top\">34</td></tr><tr><td style=\"vertical-align:top\">5</td><td style=\"vertical-align:top\">2100.000000</td><td style=\"vertical-align:top\">Henry Stevens</td><td style=\"vertical-align:top\">30</td></tr><tr><td style=\"vertical-align:top\">6</td><td style=\"vertical-align:top\">3280.000000</td><td style=\"vertical-align:top\">Sharon Jenkins</td><td style=\"vertical-align:top\">41</td></tr></tbody></table>\n", " </body>\n", " <script>\n", " document.getElementById(\"static_df_1996488729\").style.display = \"none\";\n", " </script>\n", " </html>" ],
"application/kotlindataframe+json" : "{\"$version\":\"2.2.0\",\"metadata\":{\"columns\":[\"vetId\",\"payment\",\"vetName\",\"hoursBilled\"],\"types\":[{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Int\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Double\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.String?\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Int?\"}],\"nrow\":6,\"ncol\":4,\"is_formatted\":false},\"kotlin_dataframe\":[{\"vetId\":101,\"payment\":0.0,\"vetName\":null,\"hoursBilled\":null},{\"vetId\":102,\"payment\":0.0,\"vetName\":null,\"hoursBilled\":null},{\"vetId\":3,\"payment\":2220.0,\"vetName\":\"Linda Douglas\",\"hoursBilled\":37},{\"vetId\":4,\"payment\":2210.0,\"vetName\":\"Rafael Ortega\",\"hoursBilled\":34},{\"vetId\":5,\"payment\":2100.0,\"vetName\":\"Henry Stevens\",\"hoursBilled\":30},{\"vetId\":6,\"payment\":3280.0,\"vetName\":\"Sharon Jenkins\",\"hoursBilled\":41}]}"
},
"execution_count" : 56,
"metadata" : { },
"output_type" : "execute_result"
} ],
"execution_count" : 56
}, {
"metadata" : {
"ExecuteTime" : {
"end_time" : "2025-09-29T18:48:27.284536Z",
"start_time" : "2025-09-29T18:48:27.128812Z"
}
},
"cell_type" : "code",
"source" : [ "val plotData = salary\n", " .dropNulls { hoursBilled }\n", "plotData" ],
"id" : "b6c91be8d36a061e",
"outputs" : [ {
"data" : {
"text/html" : [ " <iframe onload=\"o_resize_iframe_out_21()\" style=\"width:100%;\" class=\"result_container\" id=\"iframe_out_21\" frameBorder=\"0\" srcdoc=\" &lt;html theme='dark'&gt;\n", " &lt;head&gt;\n", " &lt;style type=&quot;text&sol;css&quot;&gt;\n", " :root {\n", " --background: #fff;\n", " --background-odd: #f5f5f5;\n", " --background-hover: #d9edfd;\n", " --header-text-color: #474747;\n", " --text-color: #848484;\n", " --text-color-dark: #000;\n", " --text-color-medium: #737373;\n", " --text-color-pale: #b3b3b3;\n", " --inner-border-color: #aaa;\n", " --bold-border-color: #000;\n", " --link-color: #296eaa;\n", " --link-color-pale: #296eaa;\n", " --link-hover: #1a466c;\n", "}\n", "\n", ":root[theme=&quot;dark&quot;], :root [data-jp-theme-light=&quot;false&quot;], .dataframe_dark{\n", " --background: #303030;\n", " --background-odd: #3c3c3c;\n", " --background-hover: #464646;\n", " --header-text-color: #dddddd;\n", " --text-color: #b3b3b3;\n", " --text-color-dark: #dddddd;\n", " --text-color-medium: #b2b2b2;\n", " --text-color-pale: #737373;\n", " --inner-border-color: #707070;\n", " --bold-border-color: #777777;\n", " --link-color: #008dc0;\n", " --link-color-pale: #97e1fb;\n", " --link-hover: #00688e;\n", "}\n", "\n", "p.dataframe_description {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe {\n", " font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\n", " font-size: 12px;\n", " background-color: var(--background);\n", " color: var(--text-color-dark);\n", " border: none;\n", " border-collapse: collapse;\n", "}\n", "\n", "table.dataframe th, td {\n", " padding: 6px;\n", " border: 1px solid transparent;\n", " text-align: left;\n", "}\n", "\n", "table.dataframe th {\n", " background-color: var(--background);\n", " color: var(--header-text-color);\n", "}\n", "\n", "table.dataframe td {\n", " vertical-align: top;\n", " white-space: nowrap;\n", "}\n", "\n", "table.dataframe th.bottomBorder {\n", " border-bottom-color: var(--bold-border-color);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:nth-child(odd) {\n", " background: var(--background-odd);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:nth-child(even) {\n", " background: var(--background);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:hover {\n", " background: var(--background-hover);\n", "}\n", "\n", "table.dataframe a {\n", " cursor: pointer;\n", " color: var(--link-color);\n", " text-decoration: none;\n", "}\n", "\n", "table.dataframe tr:hover &gt; td a {\n", " color: var(--link-color-pale);\n", "}\n", "\n", "table.dataframe a:hover {\n", " color: var(--link-hover);\n", " text-decoration: underline;\n", "}\n", "\n", "table.dataframe img {\n", " max-width: fit-content;\n", "}\n", "\n", "table.dataframe th.complex {\n", " background-color: var(--background);\n", " border: 1px solid var(--background);\n", "}\n", "\n", "table.dataframe .leftBorder {\n", " border-left-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightBorder {\n", " border-right-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightAlign {\n", " text-align: right;\n", "}\n", "\n", "table.dataframe .expanderSvg {\n", " width: 8px;\n", " height: 8px;\n", " margin-right: 3px;\n", "}\n", "\n", "table.dataframe .expander {\n", " display: flex;\n", " align-items: center;\n", "}\n", "\n", "&sol;* formatting *&sol;\n", "\n", "table.dataframe .null {\n", " color: var(--text-color-pale);\n", "}\n", "\n", "table.dataframe .structural {\n", " color: var(--text-color-medium);\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .dataFrameCaption {\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .numbers {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe td:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe tr:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "\n", ":root {\n", " --scroll-bg: #f5f5f5;\n", " --scroll-fg: #b3b3b3;\n", "}\n", ":root[theme=&quot;dark&quot;], :root [data-jp-theme-light=&quot;false&quot;]{\n", " --scroll-bg: #3c3c3c;\n", " --scroll-fg: #97e1fb;\n", "}\n", "body {\n", " scrollbar-color: var(--scroll-fg) var(--scroll-bg);\n", "}\n", "body::-webkit-scrollbar {\n", " width: 10px; &sol;* Mostly for vertical scrollbars *&sol;\n", " height: 10px; &sol;* Mostly for horizontal scrollbars *&sol;\n", "}\n", "body::-webkit-scrollbar-thumb {\n", " background-color: var(--scroll-fg);\n", "}\n", "body::-webkit-scrollbar-track {\n", " background-color: var(--scroll-bg);\n", "}\n", " &lt;&sol;style&gt;\n", " &lt;&sol;head&gt;\n", " &lt;body&gt;\n", " &lt;table class=&quot;dataframe&quot; id=&quot;df_1996488744&quot;&gt;&lt;&sol;table&gt;\n", "\n", "&lt;p class=&quot;dataframe_description&quot;&gt;DataFrame: rowsCount = 4, columnsCount = 4&lt;&sol;p&gt;\n", "\n", " &lt;&sol;body&gt;\n", " &lt;script&gt;\n", " (function () {\n", " window.DataFrame = window.DataFrame || new (function () {\n", " this.addTable = function (df) {\n", " let cols = df.cols;\n", " for (let i = 0; i &lt; cols.length; i++) {\n", " for (let c of cols[i].children) {\n", " cols[c].parent = i;\n", " }\n", " }\n", " df.nrow = 0\n", " for (let i = 0; i &lt; df.cols.length; i++) {\n", " if (df.cols[i].values.length &gt; df.nrow) df.nrow = df.cols[i].values.length\n", " }\n", " if (df.id === df.rootId) {\n", " df.expandedFrames = new Set()\n", " df.childFrames = {}\n", " const table = this.getTableElement(df.id)\n", " table.df = df\n", " for (let i = 0; i &lt; df.cols.length; i++) {\n", " let col = df.cols[i]\n", " if (col.parent === undefined &amp;&amp; col.children.length &gt; 0) col.expanded = true\n", " }\n", " } else {\n", " const rootDf = this.getTableData(df.rootId)\n", " rootDf.childFrames[df.id] = df\n", " }\n", " }\n", "\n", " this.computeRenderData = function (df) {\n", " let result = []\n", " let pos = 0\n", " for (let col = 0; col &lt; df.cols.length; col++) {\n", " if (df.cols[col].parent === undefined)\n", " pos += this.computeRenderDataRec(df.cols, col, pos, 0, result, false, false)\n", " }\n", " for (let i = 0; i &lt; result.length; i++) {\n", " let row = result[i]\n", " for (let j = 0; j &lt; row.length; j++) {\n", " let cell = row[j]\n", " if (j === 0)\n", " cell.leftBd = false\n", " if (j &lt; row.length - 1) {\n", " let nextData = row[j + 1]\n", " if (nextData.leftBd) cell.rightBd = true\n", " else if (cell.rightBd) nextData.leftBd = true\n", " } else cell.rightBd = false\n", " }\n", " }\n", " return result\n", " }\n", "\n", " this.computeRenderDataRec = function (cols, colId, pos, depth, result, leftBorder, rightBorder) {\n", " if (result.length === depth) {\n", " const array = [];\n", " if (pos &gt; 0) {\n", " let j = 0\n", " for (let i = 0; j &lt; pos; i++) {\n", " let c = result[depth - 1][i]\n", " j += c.span\n", " let copy = Object.assign({empty: true}, c)\n", " array.push(copy)\n", " }\n", " }\n", " result.push(array)\n", " }\n", " const col = cols[colId];\n", " let size = 0;\n", " if (col.expanded) {\n", " let childPos = pos\n", " for (let i = 0; i &lt; col.children.length; i++) {\n", " let child = col.children[i]\n", " let childLeft = i === 0 &amp;&amp; (col.children.length &gt; 1 || leftBorder)\n", " let childRight = i === col.children.length - 1 &amp;&amp; (col.children.length &gt; 1 || rightBorder)\n", " let childSize = this.computeRenderDataRec(cols, child, childPos, depth + 1, result, childLeft, childRight)\n", " childPos += childSize\n", " size += childSize\n", " }\n", " } else {\n", " for (let i = depth + 1; i &lt; result.length; i++)\n", " result[i].push({id: colId, span: 1, leftBd: leftBorder, rightBd: rightBorder, empty: true})\n", " size = 1\n", " }\n", " let left = leftBorder\n", " let right = rightBorder\n", " if (size &gt; 1) {\n", " left = true\n", " right = true\n", " }\n", " result[depth].push({id: colId, span: size, leftBd: left, rightBd: right})\n", " return size\n", " }\n", "\n", " this.getTableElement = function (id) {\n", " return document.getElementById(&quot;df_&quot; + id)\n", " }\n", "\n", " this.getTableData = function (id) {\n", " return this.getTableElement(id).df\n", " }\n", "\n", " this.createExpander = function (isExpanded) {\n", " const svgNs = &quot;http:&sol;&sol;www.w3.org&sol;2000&sol;svg&quot;\n", " let svg = document.createElementNS(svgNs, &quot;svg&quot;)\n", " svg.classList.add(&quot;expanderSvg&quot;)\n", " let path = document.createElementNS(svgNs, &quot;path&quot;)\n", " if (isExpanded) {\n", " svg.setAttribute(&quot;viewBox&quot;, &quot;0 -2 8 8&quot;)\n", " path.setAttribute(&quot;d&quot;, &quot;M1 0 l-1 1 4 4 4 -4 -1 -1 -3 3Z&quot;)\n", " } else {\n", " svg.setAttribute(&quot;viewBox&quot;, &quot;-2 0 8 8&quot;)\n", " path.setAttribute(&quot;d&quot;, &quot;M1 0 l-1 1 3 3 -3 3 1 1 4 -4Z&quot;)\n", " }\n", " path.setAttribute(&quot;fill&quot;, &quot;currentColor&quot;)\n", " svg.appendChild(path)\n", " return svg\n", " }\n", "\n", " this.renderTable = function (id) {\n", "\n", " let table = this.getTableElement(id)\n", "\n", " if (table === null) return\n", "\n", " table.innerHTML = &quot;&quot;\n", "\n", " let df = table.df\n", " let rootDf = df.rootId === df.id ? df : this.getTableData(df.rootId)\n", "\n", " &sol;&sol; header\n", " let header = document.createElement(&quot;thead&quot;)\n", " table.appendChild(header)\n", "\n", " let renderData = this.computeRenderData(df)\n", " for (let j = 0; j &lt; renderData.length; j++) {\n", " let rowData = renderData[j]\n", " let tr = document.createElement(&quot;tr&quot;);\n", " let isLastRow = j === renderData.length - 1\n", " header.appendChild(tr);\n", " for (let i = 0; i &lt; rowData.length; i++) {\n", " let cell = rowData[i]\n", " let th = document.createElement(&quot;th&quot;);\n", " th.setAttribute(&quot;colspan&quot;, cell.span)\n", " let colId = cell.id\n", " let col = df.cols[colId];\n", " if (!cell.empty) {\n", " if (col.children.length === 0) {\n", " th.innerHTML = col.name\n", " } else {\n", " let link = document.createElement(&quot;a&quot;)\n", " link.className = &quot;expander&quot;\n", " let that = this\n", " link.onclick = function () {\n", " col.expanded = !col.expanded\n", " that.renderTable(id)\n", " }\n", " link.appendChild(this.createExpander(col.expanded))\n", " link.innerHTML += col.name\n", " th.appendChild(link)\n", " }\n", " }\n", " let classes = (cell.leftBd ? &quot; leftBorder&quot; : &quot;&quot;) + (cell.rightBd ? &quot; rightBorder&quot; : &quot;&quot;)\n", " if (col.rightAlign)\n", " classes += &quot; rightAlign&quot;\n", " if (isLastRow)\n", " classes += &quot; bottomBorder&quot;\n", " if (classes.length &gt; 0)\n", " th.setAttribute(&quot;class&quot;, classes)\n", " tr.appendChild(th)\n", " }\n", " }\n", "\n", " &sol;&sol; body\n", " let body = document.createElement(&quot;tbody&quot;)\n", " table.appendChild(body)\n", "\n", " let columns = renderData.pop()\n", " for (let row = 0; row &lt; df.nrow; row++) {\n", " let tr = document.createElement(&quot;tr&quot;);\n", " body.appendChild(tr)\n", " for (let i = 0; i &lt; columns.length; i++) {\n", " let cell = columns[i]\n", " let td = document.createElement(&quot;td&quot;);\n", " let colId = cell.id\n", " let col = df.cols[colId]\n", " let classes = (cell.leftBd ? &quot; leftBorder&quot; : &quot;&quot;) + (cell.rightBd ? &quot; rightBorder&quot; : &quot;&quot;)\n", " if (col.rightAlign)\n", " classes += &quot; rightAlign&quot;\n", " if (classes.length &gt; 0)\n", " td.setAttribute(&quot;class&quot;, classes)\n", " tr.appendChild(td)\n", " let value = col.values[row]\n", " if (value.frameId !== undefined) {\n", " let frameId = value.frameId\n", " let expanded = rootDf.expandedFrames.has(frameId)\n", " let link = document.createElement(&quot;a&quot;)\n", " link.className = &quot;expander&quot;\n", " let that = this\n", " link.onclick = function () {\n", " if (rootDf.expandedFrames.has(frameId))\n", " rootDf.expandedFrames.delete(frameId)\n", " else rootDf.expandedFrames.add(frameId)\n", " that.renderTable(id)\n", " }\n", " link.appendChild(this.createExpander(expanded))\n", " link.innerHTML += value.value\n", " if (expanded) {\n", " td.appendChild(link)\n", " td.appendChild(document.createElement(&quot;p&quot;))\n", " const childTable = document.createElement(&quot;table&quot;)\n", " childTable.className = &quot;dataframe&quot;\n", " childTable.id = &quot;df_&quot; + frameId\n", " let childDf = rootDf.childFrames[frameId]\n", " childTable.df = childDf\n", " td.appendChild(childTable)\n", " this.renderTable(frameId)\n", " if (childDf.nrow !== childDf.totalRows) {\n", " const footer = document.createElement(&quot;p&quot;)\n", " footer.innerText = `... showing only top ${childDf.nrow} of ${childDf.totalRows} rows`\n", " td.appendChild(footer)\n", " }\n", " } else {\n", " td.appendChild(link)\n", " }\n", " } else if (value.style !== undefined) {\n", " td.innerHTML = value.value\n", " td.setAttribute(&quot;style&quot;, value.style)\n", " } else td.innerHTML = value\n", " this.nodeScriptReplace(td)\n", " }\n", " }\n", " }\n", "\n", " this.nodeScriptReplace = function (node) {\n", " if (this.nodeScriptIs(node) === true) {\n", " node.parentNode.replaceChild(this.nodeScriptClone(node), node);\n", " } else {\n", " let i = -1, children = node.childNodes;\n", " while (++i &lt; children.length) {\n", " this.nodeScriptReplace(children[i]);\n", " }\n", " }\n", "\n", " return node;\n", " }\n", "\n", " this.nodeScriptClone = function (node) {\n", " let script = document.createElement(&quot;script&quot;);\n", " script.text = node.innerHTML;\n", "\n", " let i = -1, attrs = node.attributes, attr;\n", " while (++i &lt; attrs.length) {\n", " script.setAttribute((attr = attrs[i]).name, attr.value);\n", " }\n", " return script;\n", " }\n", "\n", " this.nodeScriptIs = function (node) {\n", " return node.tagName === 'SCRIPT';\n", " }\n", " })()\n", "\n", " window.call_DataFrame = function (f) {\n", " return f();\n", " };\n", "\n", " let funQueue = window[&quot;kotlinQueues&quot;] &amp;&amp; window[&quot;kotlinQueues&quot;][&quot;DataFrame&quot;];\n", " if (funQueue) {\n", " funQueue.forEach(function (f) {\n", " f();\n", " });\n", " funQueue = [];\n", " }\n", "})()\n", "\n", "&sol;*&lt;!--*&sol;\n", "call_DataFrame(function() { DataFrame.addTable({ cols: [{ name: &quot;&lt;span title=&bsol;&quot;vetId: Int&bsol;&quot;&gt;vetId&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;3&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;4&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;5&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;6&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;payment: Double&bsol;&quot;&gt;payment&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;2220.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;2210.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;2100.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;3280.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;vetName: String&bsol;&quot;&gt;vetName&lt;&sol;span&gt;&quot;, children: [], rightAlign: false, values: [&quot;Linda Douglas&quot;,&quot;Rafael Ortega&quot;,&quot;Henry Stevens&quot;,&quot;Sharon Jenkins&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;hoursBilled: Int&bsol;&quot;&gt;hoursBilled&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;37&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;34&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;30&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;41&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "], id: 1996488744, rootId: 1996488744, totalRows: 4 } ) });\n", "&sol;*--&gt;*&sol;\n", "\n", "call_DataFrame(function() { DataFrame.renderTable(1996488744) });\n", "\n", "\n", " &lt;&sol;script&gt;\n", " &lt;&sol;html&gt;\"></iframe>\n", " <script>\n", " function o_resize_iframe_out_21() {\n", " let elem = document.getElementById(\"iframe_out_21\");\n", " resize_iframe_out_21(elem);\n", " setInterval(resize_iframe_out_21, 5000, elem);\n", " }\n", " function resize_iframe_out_21(el) {\n", " let h = el.contentWindow.document.body.scrollHeight;\n", " el.height = h === 0 ? 0 : h + 41;\n", " }\n", " </script> <html theme='dark'>\n", " <head>\n", " <style type=\"text/css\">\n", " :root {\n", " --background: #fff;\n", " --background-odd: #f5f5f5;\n", " --background-hover: #d9edfd;\n", " --header-text-color: #474747;\n", " --text-color: #848484;\n", " --text-color-dark: #000;\n", " --text-color-medium: #737373;\n", " --text-color-pale: #b3b3b3;\n", " --inner-border-color: #aaa;\n", " --bold-border-color: #000;\n", " --link-color: #296eaa;\n", " --link-color-pale: #296eaa;\n", " --link-hover: #1a466c;\n", "}\n", "\n", ":root[theme=\"dark\"], :root [data-jp-theme-light=\"false\"], .dataframe_dark{\n", " --background: #303030;\n", " --background-odd: #3c3c3c;\n", " --background-hover: #464646;\n", " --header-text-color: #dddddd;\n", " --text-color: #b3b3b3;\n", " --text-color-dark: #dddddd;\n", " --text-color-medium: #b2b2b2;\n", " --text-color-pale: #737373;\n", " --inner-border-color: #707070;\n", " --bold-border-color: #777777;\n", " --link-color: #008dc0;\n", " --link-color-pale: #97e1fb;\n", " --link-hover: #00688e;\n", "}\n", "\n", "p.dataframe_description {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe {\n", " font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n", " font-size: 12px;\n", " background-color: var(--background);\n", " color: var(--text-color-dark);\n", " border: none;\n", " border-collapse: collapse;\n", "}\n", "\n", "table.dataframe th, td {\n", " padding: 6px;\n", " border: 1px solid transparent;\n", " text-align: left;\n", "}\n", "\n", "table.dataframe th {\n", " background-color: var(--background);\n", " color: var(--header-text-color);\n", "}\n", "\n", "table.dataframe td {\n", " vertical-align: top;\n", " white-space: nowrap;\n", "}\n", "\n", "table.dataframe th.bottomBorder {\n", " border-bottom-color: var(--bold-border-color);\n", "}\n", "\n", "table.dataframe tbody > tr:nth-child(odd) {\n", " background: var(--background-odd);\n", "}\n", "\n", "table.dataframe tbody > tr:nth-child(even) {\n", " background: var(--background);\n", "}\n", "\n", "table.dataframe tbody > tr:hover {\n", " background: var(--background-hover);\n", "}\n", "\n", "table.dataframe a {\n", " cursor: pointer;\n", " color: var(--link-color);\n", " text-decoration: none;\n", "}\n", "\n", "table.dataframe tr:hover > td a {\n", " color: var(--link-color-pale);\n", "}\n", "\n", "table.dataframe a:hover {\n", " color: var(--link-hover);\n", " text-decoration: underline;\n", "}\n", "\n", "table.dataframe img {\n", " max-width: fit-content;\n", "}\n", "\n", "table.dataframe th.complex {\n", " background-color: var(--background);\n", " border: 1px solid var(--background);\n", "}\n", "\n", "table.dataframe .leftBorder {\n", " border-left-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightBorder {\n", " border-right-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightAlign {\n", " text-align: right;\n", "}\n", "\n", "table.dataframe .expanderSvg {\n", " width: 8px;\n", " height: 8px;\n", " margin-right: 3px;\n", "}\n", "\n", "table.dataframe .expander {\n", " display: flex;\n", " align-items: center;\n", "}\n", "\n", "/* formatting */\n", "\n", "table.dataframe .null {\n", " color: var(--text-color-pale);\n", "}\n", "\n", "table.dataframe .structural {\n", " color: var(--text-color-medium);\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .dataFrameCaption {\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .numbers {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe td:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe tr:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "\n", " </style>\n", " </head>\n", " <body>\n", " <table class=\"dataframe\" id=\"static_df_1996488745\"><thead><tr><th class=\"bottomBorder\" style=\"text-align:left\">vetId</th><th class=\"bottomBorder\" style=\"text-align:left\">payment</th><th class=\"bottomBorder\" style=\"text-align:left\">vetName</th><th class=\"bottomBorder\" style=\"text-align:left\">hoursBilled</th></tr></thead><tbody><tr><td style=\"vertical-align:top\">3</td><td style=\"vertical-align:top\">2220.000000</td><td style=\"vertical-align:top\">Linda Douglas</td><td style=\"vertical-align:top\">37</td></tr><tr><td style=\"vertical-align:top\">4</td><td style=\"vertical-align:top\">2210.000000</td><td style=\"vertical-align:top\">Rafael Ortega</td><td style=\"vertical-align:top\">34</td></tr><tr><td style=\"vertical-align:top\">5</td><td style=\"vertical-align:top\">2100.000000</td><td style=\"vertical-align:top\">Henry Stevens</td><td style=\"vertical-align:top\">30</td></tr><tr><td style=\"vertical-align:top\">6</td><td style=\"vertical-align:top\">3280.000000</td><td style=\"vertical-align:top\">Sharon Jenkins</td><td style=\"vertical-align:top\">41</td></tr></tbody></table>\n", " </body>\n", " <script>\n", " document.getElementById(\"static_df_1996488745\").style.display = \"none\";\n", " </script>\n", " </html>" ],
"application/kotlindataframe+json" : "{\"$version\":\"2.2.0\",\"metadata\":{\"columns\":[\"vetId\",\"payment\",\"vetName\",\"hoursBilled\"],\"types\":[{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Int\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Double\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.String\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Int\"}],\"nrow\":4,\"ncol\":4,\"is_formatted\":false},\"kotlin_dataframe\":[{\"vetId\":3,\"payment\":2220.0,\"vetName\":\"Linda Douglas\",\"hoursBilled\":37},{\"vetId\":4,\"payment\":2210.0,\"vetName\":\"Rafael Ortega\",\"hoursBilled\":34},{\"vetId\":5,\"payment\":2100.0,\"vetName\":\"Henry Stevens\",\"hoursBilled\":30},{\"vetId\":6,\"payment\":3280.0,\"vetName\":\"Sharon Jenkins\",\"hoursBilled\":41}]}"
},
"execution_count" : 62,
"metadata" : { },
"output_type" : "execute_result"
} ],
"execution_count" : 62
}, {
"metadata" : {
"ExecuteTime" : {
"end_time" : "2025-09-29T18:49:07.480526Z",
"start_time" : "2025-09-29T18:49:07.311371Z"
}
},
"cell_type" : "code",
"source" : [ "// Plot salary data\n", "plotData.plot {\n", " bars {\n", " x(vetName)\n", " y(payment)\n", " }\n", " hLine {\n", " yIntercept.constant(payment.mean())\n", " color = Color.RED\n", " type = LineType.DASHED\n", " width = 1.0\n", " }\n", "}" ],
"id" : "8017bd3671330676",
"outputs" : [ {
"data" : {
"text/html" : [ " <iframe src='about:blank' style='border:none !important;' width='600' height='400' srcdoc=\"&lt;html lang=&quot;en&quot;>\n", " &lt;head>\n", " &lt;meta charset=&quot;UTF-8&quot;>\n", " &lt;style> html, body { margin: 0; padding: 0; overflow: hidden; } &lt;/style>\n", " &lt;script type=&quot;text/javascript&quot; data-lets-plot-script=&quot;library&quot; src=&quot;https://cdn.jsdelivr.net/gh/JetBrains/[email protected]/js-package/distr/lets-plot.min.js&quot;>&lt;/script>\n", " &lt;/head>\n", " &lt;body>\n", " &lt;div id=&quot;1cxAa1&quot;>&lt;/div>\n", " &lt;script type=&quot;text/javascript&quot; data-lets-plot-script=&quot;plot&quot;>\n", " \n", " (function() {\n", " // ----------\n", " \n", " const forceImmediateRender = false;\n", " const responsive = false;\n", " \n", " let sizing = {\n", " width_mode: &quot;FIXED&quot;,\n", " height_mode: &quot;FIXED&quot;,\n", " width: 600.0, \n", " height: 400.0 \n", " };\n", " \n", " const preferredWidth = document.body.dataset.letsPlotPreferredWidth;\n", " if (preferredWidth !== undefined) {\n", " sizing = {\n", " width_mode: 'FIXED',\n", " height_mode: 'SCALED',\n", " width: parseFloat(preferredWidth)\n", " };\n", " }\n", " \n", " const containerDiv = document.getElementById(&quot;1cxAa1&quot;);\n", " let fig = null;\n", " \n", " function renderPlot() {\n", " if (fig === null) {\n", " const plotSpec = {\n", "&quot;mapping&quot;:{\n", "},\n", "&quot;data&quot;:{\n", "&quot;vetName&quot;:[&quot;Linda Douglas&quot;,&quot;Rafael Ortega&quot;,&quot;Henry Stevens&quot;,&quot;Sharon Jenkins&quot;],\n", "&quot;payment&quot;:[2220.0,2210.0,2100.0,3280.0]\n", "},\n", "&quot;kind&quot;:&quot;plot&quot;,\n", "&quot;scales&quot;:[{\n", "&quot;aesthetic&quot;:&quot;x&quot;,\n", "&quot;discrete&quot;:true\n", "},{\n", "&quot;aesthetic&quot;:&quot;y&quot;,\n", "&quot;limits&quot;:[null,null]\n", "}],\n", "&quot;layers&quot;:[{\n", "&quot;mapping&quot;:{\n", "&quot;x&quot;:&quot;vetName&quot;,\n", "&quot;y&quot;:&quot;payment&quot;\n", "},\n", "&quot;stat&quot;:&quot;identity&quot;,\n", "&quot;sampling&quot;:&quot;none&quot;,\n", "&quot;inherit_aes&quot;:false,\n", "&quot;position&quot;:&quot;dodge&quot;,\n", "&quot;geom&quot;:&quot;bar&quot;,\n", "&quot;data&quot;:{\n", "}\n", "},{\n", "&quot;mapping&quot;:{\n", "},\n", "&quot;stat&quot;:&quot;identity&quot;,\n", "&quot;yintercept&quot;:2452.5,\n", "&quot;color&quot;:&quot;#ee6666&quot;,\n", "&quot;size&quot;:1.0,\n", "&quot;linetype&quot;:&quot;dashed&quot;,\n", "&quot;sampling&quot;:&quot;none&quot;,\n", "&quot;inherit_aes&quot;:false,\n", "&quot;position&quot;:&quot;identity&quot;,\n", "&quot;geom&quot;:&quot;hline&quot;,\n", "&quot;data&quot;:{\n", "}\n", "}],\n", "&quot;data_meta&quot;:{\n", "&quot;series_annotations&quot;:[{\n", "&quot;type&quot;:&quot;str&quot;,\n", "&quot;column&quot;:&quot;vetName&quot;\n", "},{\n", "&quot;type&quot;:&quot;float&quot;,\n", "&quot;column&quot;:&quot;payment&quot;\n", "}]\n", "},\n", "&quot;spec_id&quot;:&quot;26&quot;\n", "};\n", " fig = LetsPlot.buildPlotFromProcessedSpecs(plotSpec, containerDiv, sizing);\n", " } else {\n", " fig.updateView({});\n", " }\n", " }\n", " \n", " const renderImmediately = \n", " forceImmediateRender || (\n", " sizing.width_mode === 'FIXED' &amp;&amp; \n", " (sizing.height_mode === 'FIXED' || sizing.height_mode === 'SCALED')\n", " );\n", " \n", " if (renderImmediately) {\n", " renderPlot();\n", " }\n", " \n", " if (!renderImmediately || responsive) {\n", " // Set up observer for initial sizing or continuous monitoring\n", " var observer = new ResizeObserver(function(entries) {\n", " for (let entry of entries) {\n", " if (entry.contentBoxSize &amp;&amp; \n", " entry.contentBoxSize[0].inlineSize > 0) {\n", " if (!responsive &amp;&amp; observer) {\n", " observer.disconnect();\n", " observer = null;\n", " }\n", " renderPlot();\n", " if (!responsive) {\n", " break;\n", " }\n", " }\n", " }\n", " });\n", " \n", " observer.observe(containerDiv);\n", " }\n", " \n", " // ----------\n", " })();\n", " \n", " &lt;/script>\n", " &lt;/body>\n", "&lt;/html>\"></iframe> <svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" display=\"block\" class=\"plt-container\" id=ab8b0823-a0eb-40f8-a7b5-44f319666dba width=\"100%\" height=\"100%\" style=\"max-width: 600.0px; max-height: 400.0px;\" viewBox=\"0 0 600.0 400.0\" preserveAspectRatio=\"xMinYMin meet\">\n", " <style type=\"text/css\">\n", " .plt-container {\n", " font-family: sans-serif;\n", " user-select: none;\n", " -webkit-user-select: none;\n", " -moz-user-select: none;\n", " -ms-user-select: none;\n", "}\n", "text {\n", " text-rendering: optimizeLegibility;\n", "}\n", "#pMCrnSV .plot-title {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 16.0px;\n", "\n", "}\n", "#pMCrnSV .plot-subtitle {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 15.0px;\n", "\n", "}\n", "#pMCrnSV .plot-caption {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#pMCrnSV .hyperlink-element {\n", "fill: #118ed8;\n", "font-weight: normal;\n", " font-style: normal;\n", "}\n", "#pMCrnSV .legend-title {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 15.0px;\n", "\n", "}\n", "#pMCrnSV .legend-item {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#pMCrnSV .axis-title-x {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 15.0px;\n", "\n", "}\n", "#pMCrnSV .axis-text-x {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#dSCMnb7 .axis-tooltip-text-x {\n", "fill: #ffffff;\n", "font-weight: normal;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#pMCrnSV .axis-title-y {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 15.0px;\n", "\n", "}\n", "#pMCrnSV .axis-text-y {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#dSCMnb7 .axis-tooltip-text-y {\n", "fill: #ffffff;\n", "font-weight: normal;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#pMCrnSV .facet-strip-text-x {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#pMCrnSV .facet-strip-text-y {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#dSCMnb7 .tooltip-text {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#dSCMnb7 .tooltip-title {\n", "fill: #474747;\n", "font-weight: bold;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#dSCMnb7 .tooltip-label {\n", "fill: #474747;\n", "font-weight: bold;\n", " font-style: normal;font-family: sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "\n", " </style>\n", " <g id=\"pMCrnSV\">\n", " <path fill-rule=\"evenodd\" fill=\"rgb(255,255,255)\" fill-opacity=\"1.0\" d=\"M0.0 0.0 L0.0 400.0 L600.0 400.0 L600.0 0.0 Z\">\n", " </path>\n", " <g transform=\"translate(21.0 6.0 ) \">\n", " <g>\n", " <g transform=\"translate(38.99591213121782 0.0 ) \">\n", " <g>\n", " <line x1=\"80.72154816621125\" y1=\"0.0\" x2=\"80.72154816621125\" y2=\"354.0\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"204.90854534499778\" y1=\"0.0\" x2=\"204.90854534499778\" y2=\"354.0\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"329.09554252378433\" y1=\"0.0\" x2=\"329.09554252378433\" y2=\"354.0\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"453.28253970257083\" y1=\"0.0\" x2=\"453.28253970257083\" y2=\"354.0\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " </g>\n", " </g>\n", " <g transform=\"translate(38.99591213121782 0.0 ) \">\n", " <g>\n", " <line x1=\"0.0\" y1=\"354.0\" x2=\"534.0040878687822\" y2=\"354.0\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"302.6062717770035\" x2=\"534.0040878687822\" y2=\"302.6062717770035\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"251.21254355400697\" x2=\"534.0040878687822\" y2=\"251.21254355400697\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"199.81881533101046\" x2=\"534.0040878687822\" y2=\"199.81881533101046\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"148.42508710801394\" x2=\"534.0040878687822\" y2=\"148.42508710801394\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"97.03135888501743\" x2=\"534.0040878687822\" y2=\"97.03135888501743\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"45.63763066202091\" x2=\"534.0040878687822\" y2=\"45.63763066202091\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " </g>\n", " </g>\n", " </g>\n", " <g clip-path=\"url(#cOzu9u6)\" clip-bounds-jfx=\"[rect (38.99591213121782, 0.0), (534.0040878687822, 354.0)]\">\n", " <g transform=\"translate(38.99591213121782 0.0 ) \">\n", " <g>\n", " <g>\n", " <rect x=\"397.3983909721169\" y=\"16.857142857142833\" height=\"337.14285714285717\" width=\"111.76829746090789\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(17,142,216)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"273.2113937933304\" y=\"138.14634146341464\" height=\"215.85365853658536\" width=\"111.76829746090795\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(17,142,216)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"149.02439661454383\" y=\"126.8397212543554\" height=\"227.1602787456446\" width=\"111.76829746090795\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(17,142,216)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"24.837399435757305\" y=\"125.81184668989548\" height=\"228.18815331010452\" width=\"111.76829746090789\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(17,142,216)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " </g>\n", " <g>\n", " <line x1=\"0.0\" y1=\"101.91376306620208\" x2=\"534.0040878687822\" y2=\"101.91376306620208\" stroke=\"rgb(238,102,102)\" stroke-opacity=\"1.0\" fill=\"none\" stroke-width=\"2.2\" stroke-dasharray=\"8.8,8.8\" stroke-dashoffset=\"0.0\">\n", " </line>\n", " </g>\n", " </g>\n", " </g>\n", " <defs>\n", " <clipPath id=\"c1CChWV\">\n", " <rect x=\"38.99591213121782\" y=\"0.0\" width=\"534.0040878687822\" height=\"354.0\">\n", " </rect>\n", " </clipPath>\n", " </defs>\n", " <defs>\n", " <clipPath id=\"cOzu9u6\">\n", " <rect x=\"38.99591213121782\" y=\"0.0\" width=\"534.0040878687822\" height=\"354.0\">\n", " </rect>\n", " </clipPath>\n", " </defs>\n", " </g>\n", " <g>\n", " <g transform=\"translate(38.99591213121782 354.0 ) \">\n", " <g transform=\"translate(80.72154816621125 0.0 ) \">\n", " <line stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" x2=\"0.0\" y2=\"4.0\">\n", " </line>\n", " <g transform=\"translate(0.0 6.0 ) \">\n", " <text class=\"axis-text-x\" text-anchor=\"middle\" dy=\"0.7em\" y=\"0.0\">\n", " <tspan>Linda Douglas</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(204.90854534499778 0.0 ) \">\n", " <line stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" x2=\"0.0\" y2=\"4.0\">\n", " </line>\n", " <g transform=\"translate(0.0 6.0 ) \">\n", " <text class=\"axis-text-x\" text-anchor=\"middle\" dy=\"0.7em\" y=\"0.0\">\n", " <tspan>Rafael Ortega</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(329.09554252378433 0.0 ) \">\n", " <line stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" x2=\"0.0\" y2=\"4.0\">\n", " </line>\n", " <g transform=\"translate(0.0 6.0 ) \">\n", " <text class=\"axis-text-x\" text-anchor=\"middle\" dy=\"0.7em\" y=\"0.0\">\n", " <tspan>Henry Stevens</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(453.28253970257083 0.0 ) \">\n", " <line stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" x2=\"0.0\" y2=\"4.0\">\n", " </line>\n", " <g transform=\"translate(0.0 6.0 ) \">\n", " <text class=\"axis-text-x\" text-anchor=\"middle\" dy=\"0.7em\" y=\"0.0\">\n", " <tspan>Sharon Jenkins</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <line x1=\"0.0\" y1=\"0.0\" x2=\"534.0040878687822\" y2=\"0.0\" stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\">\n", " </line>\n", " </g>\n", " <g transform=\"translate(38.99591213121782 0.0 ) \">\n", " <g transform=\"translate(0.0 354.0 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\" y=\"0.0\">\n", " <tspan>0</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 302.6062717770035 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\" y=\"0.0\">\n", " <tspan>500</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 251.21254355400697 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\" y=\"0.0\">\n", " <tspan>1,000</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 199.81881533101046 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\" y=\"0.0\">\n", " <tspan>1,500</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 148.42508710801394 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\" y=\"0.0\">\n", " <tspan>2,000</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 97.03135888501743 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\" y=\"0.0\">\n", " <tspan>2,500</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 45.63763066202091 ) \">\n", " <g transform=\"translate(-2.0 0.0 ) \">\n", " <text class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\" y=\"0.0\">\n", " <tspan>3,000</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " <g transform=\"translate(15.0 183.0 ) rotate(-90.0 ) \">\n", " <text class=\"axis-title-y\" y=\"0.0\" text-anchor=\"middle\">\n", " <tspan>payment</tspan>\n", " </text>\n", " </g>\n", " <g transform=\"translate(326.99795606560895 394.0 ) \">\n", " <text class=\"axis-title-x\" y=\"0.0\" text-anchor=\"middle\">\n", " <tspan>vetName</tspan>\n", " </text>\n", " </g>\n", " <path fill=\"rgb(0,0,0)\" fill-opacity=\"0.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" stroke-width=\"0.0\" d=\"M0.0 0.0 L0.0 400.0 L600.0 400.0 L600.0 0.0 Z\" pointer-events=\"none\">\n", " </path>\n", " </g>\n", " <g id=\"dSCMnb7\">\n", " </g>\n", "</svg>\n", " <script>document.getElementById(\"ab8b0823-a0eb-40f8-a7b5-44f319666dba\").style.display = \"none\";</script>" ],
"application/plot+json" : {
"output_type" : "lets_plot_spec",
"output" : {
"mapping" : { },
"data" : {
"vetName" : [ "Linda Douglas", "Rafael Ortega", "Henry Stevens", "Sharon Jenkins" ],
"payment" : [ 2220.0, 2210.0, 2100.0, 3280.0 ]
},
"kind" : "plot",
"scales" : [ {
"aesthetic" : "x",
"discrete" : true
}, {
"aesthetic" : "y",
"limits" : [ null, null ]
} ],
"layers" : [ {
"mapping" : {
"x" : "vetName",
"y" : "payment"
},
"stat" : "identity",
"sampling" : "none",
"inherit_aes" : false,
"position" : "dodge",
"geom" : "bar"
}, {
"mapping" : { },
"stat" : "identity",
"yintercept" : 2452.5,
"color" : "#ee6666",
"size" : 1.0,
"linetype" : "dashed",
"sampling" : "none",
"inherit_aes" : false,
"position" : "identity",
"geom" : "hline"
} ],
"data_meta" : {
"series_annotations" : [ {
"type" : "str",
"column" : "vetName"
}, {
"type" : "float",
"column" : "payment"
} ]
}
},
"apply_color_scheme" : true,
"swing_enabled" : true
}
},
"execution_count" : 67,
"metadata" : { },
"output_type" : "execute_result"
} ],
"execution_count" : 67
} ],
"metadata" : {
"kernelspec" : {
"display_name" : "Kotlin",
"language" : "kotlin",
"name" : "kotlin"
},
"language_info" : {
"name" : "kotlin",
"version" : "2.2.20",
"mimetype" : "text/x-kotlin",
"file_extension" : ".kt",
"pygments_lexer" : "kotlin",
"codemirror_mode" : "text/x-kotlin",
"nbconvert_exporter" : ""
}
},
"nbformat" : 4,
"nbformat_minor" : 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment