{ "cells": [ { "cell_type": "code", "execution_count": 1, "id": "e652c876", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
DataFrame: rowsCount = 5, columnsCount = 12
\n", " \n", " \n", " " ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "val mpgDf = DataFrame.readCSV(\"https://raw.githubusercontent.com/JetBrains/lets-plot-kotlin/master/docs/examples/data/mpg.csv\")\n", "mpgDf.head()\n" ] }, { "cell_type": "code", "execution_count": 4, "id": "d96bde5a", "metadata": {}, "outputs": [], "source": [ "val mpgMap = mpgDf.toMap()" ] }, { "cell_type": "code", "execution_count": 5, "id": "ee76c246", "metadata": {}, "outputs": [], "source": [ "val p = letsPlot(mpgMap) { x = \"drv\"; y = \"hwy\" }" ] }, { "cell_type": "code", "execution_count": 6, "id": "723d6e0e", "metadata": {}, "outputs": [ { "data": { "text/html": [ " \n", " " ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "p + geomPoint()" ] }, { "cell_type": "code", "execution_count": 7, "id": "55ab1c0b", "metadata": {}, "outputs": [ { "data": { "text/html": [ " \n", " " ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "p + geomJitter()" ] }, { "cell_type": "code", "execution_count": 8, "id": "4796abb8", "metadata": {}, "outputs": [ { "data": { "text/html": [ " \n", " " ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "p + geomBoxplot(outlierColor = \"pen\") { color = \"drv\" } +\n", " geomJitter(height = 0.0) { color = \"drv\" }" ] } ], "metadata": { "kernelspec": { "display_name": "Kotlin", "language": "kotlin", "name": "kotlin" }, "language_info": { "codemirror_mode": "text/x-kotlin", "file_extension": ".kt", "mimetype": "text/x-kotlin", "name": "kotlin", "nbconvert_exporter": "", "pygments_lexer": "kotlin", "version": "1.8.20" } }, "nbformat": 4, "nbformat_minor": 5 }