Kotlin Conf 2019 で Kotlin for Data Science が発表されましたね。
今回は Kotlin + Jupyter notebooks で給与の額面から手取りを求めてみたいと思います。
Kotlin kernel for Jupyter notebooks
Jupyter notebooks 用の Kotlin kernel を使うと、Jupyter notebooks 内の Kotlin コードを実行し、Java や Kotlin で書かれた 3rd-party data science frameworks を使うことができます。https://github.com/Kotlin/kotlin-jupyter
に conda か pip を使ったインストール方法があります。
私はソースからビルドしました。
$ git clone git@github.com:Kotlin/kotlin-jupyter.git
$ cd kotlin-jupyter/
$ ./gradlew install
$ jupyter notebook
で Jupyter notebooks が起動します。
New から新規作成するときに Kotlin を選択します。

あとは Kotlin のコードを書いて実行できます。



Lets-Plot for Kotlin (https://github.com/JetBrains/lets-plot-kotlin) を使ってグラフも作ろうかと思ったのですが API がまだよくわからなかったので、それは次回以降にしたいと思います。
0 件のコメント:
コメントを投稿