 Hello, my name is Kazuma Ruhashi, and my internet name is 1284 km. Nice to meet you. So, today my title is Charity. Charity visualizes real-world data with Ruby. So, I came to Thailand for the first time. I wanted to see the child player river. I was able to achieve it yesterday. I'm so glad. Thank you for holding the RubyConf Thailand. About me, I'm a programmer. I came from Japan, Tokyo. So, I made Ruby 2.6 standard CSV library 1.523 times faster. A creator of a visualization library named Charity. Today, I will talk about it. And I'm a member of Asakusa RB. Do you know Asakusa RB? Here is Asakusa. This is Kaminarimon. Kaminarimon is Thunder Gate. So, if you ever come to Japan, come to Asakusa RB. By the way, what language do you use? Ruby, Java, Python, JavaScript, English, Thai, Japanese, or many other languages. I don't know how to write Ruby, but speaking of languages, not Ruby. I recently learned some interesting things. Come to English, Thai, and Japanese. I think these are similar pronunciations. Shopping. In Thai, shopping. Is it right, my pronoun? In Japanese, shopping. Online. In Thai, online. In Japanese, online. Donut. In Thai, donut. Donut. In Japanese, donuts. This is similar. This is emoji of tea. In Japanese, this is pronounced cha. In Thai, cha. It's okay? In English, tea. So, in Thai, cha is pronounced in English, tea. Cha is tea. Cha, tea. Do you know? Yeah. So, today I would like to talk about chatty. Our chatty. Chatty is open source Ruby library for visualizing your data in a simple way. For example, chatty outputs these graphs. We can easily plot using chatty. Chatty using Ruby, Java, Python, and JavaScript. These days, there is no default standard visualization tool for Ruby. On the other hand, each above language has its own good plotting library. So, chatty is visualizing your data by standing on the shoulders of giants. Characteristics of chatty. Chatty has two abstraction layer. One is data abstraction layer. It abstracts the data structure. The other one, plotting abstraction layer. It abstracts back and plotting libraries. I will explain about it later. This is basic usage of chatty. I will show a demo. Okay. I'll show a demo. This is basic usage. First, we need data to visualize. Let's get ready. Require data sets. This line. Darlu is a convenience data structure. This is a data set plugin to export the data set as Darlu data frame object. And use iris, iris data sets. Like such a data. And here is a chatty part. Require chatty and create a chatty plotter instance. Plotter. And next, set the data to render this block. In this block, set the data. And then call render method. So, render such this image. If we want to render with other kind of chat, this line, only one line, change call method to barH from scatter. So, scatter, barH to render. And render barH, horizon. BarH image. And this is a multi-layout example. It is possible. Plotter layout to layout, scatter, and barH. This is this barH. Let's get barH, life to sift to layout. And render. It is possible. And so, three times life to sift, render, such image. Great layout is also possible. Great layout, great to do. And this is such an image. Next, focus on the code we need to write. This is output images. How code we need to write? This is pipeline example. Require chatty and create instance. And set data and render method call render with save file name. This is graph backend example. We want to use another backend. Different is only one line. One line is this line. Chatty brought the new graph. Graph is backend specified backend. This example, pipeline. This is graph. Only one line. About plotting abstraction layer. It is below layer. From the previous example, the difference is one line to change backend. Here is one of the features of chatty. We can easily switch backend libraries with almost the same code. More about plotting abstraction layer. Currently, supported backend is below. This is a graph. Google chat, and chatty now works with Ruby. How to develop backend? I feel that pipelot has the largest number of graph types that can be output. When we want to add graph to support, we often implement pipelot first as a reference implementation. After that, we will implement other libraries. Another case is, for example, Google chat, bokeh, these were implemented by a request that I'd like to use chatty if this library is supported by the backend. So, oh, okay, okay. If there is a real user and real-world use case exists, it depends on the priority with other work, but consider support for new backend. Next, about data abstraction layer. It's above abstraction layer. Chatty supports these data structures. I'll show a demo. Dalu, newmo, nla, nmatrix, and ductbreak. This is a sample of newmo, nla. First, require chatty and create instance. Require newmo, nla, setdata to chatty table. Chatty table equals nla, setdata. Chatty table columns specify a symbol. It's okay, and it's also okay. Specify a string, and then chatty to bar and bar to render. So, this image is rendered. Chatty.2 boxplot render, rendered boxplot, and the bubble, bubble chat, curve, scatter, error bar, error bar, not error bar. This is not error bar. Histogram. This is newmo, nla, nmatrix. This is nmatrix sample. Require chatty and create instance. Require nmatrix and set nmatrix data to chatty table. Almost the same as nla sample. Chatty table and chatty.2 bar render, boxplot render, bubble render. Almost the same. This is active record. Require chatty and create instance. Require active record. Active record establish connection with SQLite on memory and define schema. So, then create sample model. So, this is create sample data. 100 records. And select as we often do in web application. So, this name sells, sells, set sells to chatty table and to scatter, scatter with argument specified column name. Scatter render, render such an image. 2 bar, boxplot, bubble and so on. So, chatty can respond to various data structures. That's because chatty table. Chatty table is abstracted. Picture summary of chatty. Chatty has two abstraction layers, data abstraction layer, protein abstraction layer. We can use the data structures we need. We can use output libraries we want to use. We can use them in any combination we need with almost no code relight. Introduction of various use cases of chatty recently. We introduced chatty in our production environment of web application, which is our job. This web application is a common layer of the application. At that time, we were asking for chatty to add JSON, not image file. Here is an example using portrait.js. I will show demo. This is now executing Rails application. This is portrait.js back end sample. In this code, like that, in Rails controller, chatty, create instance and set data to table. This is portrait.js back end feature to JSON. Roy out. View is only one div tag. So JSON data and Roy out data is used by JavaScript import, portrait.js and the new plot specified ID name, sample, and JSON data and Roy out data. So output such a this HTML and JavaScript. This case is different. Do you know benchmark driver? Benchmark driver is great benchmark tool. This combination is also possible because chatty has data abstraction layer to support various data structures. For example, benchmark driver outputs as below by default. This is Ruby CSV benchmarks output default. But benchmark, gem install benchmark driver output chatty and benchmark driver chatty. So this image, output this image. Summary of data abstraction layer currently supports array hash, Daru, and benchmark driver as chatty adapter. It can output image and HTML and JSON format. Now chatty is working. So this tweet impression became my motivation. So I implemented Geoffrey chart back in thanks to charts development progress. My development is progress. Chatty with JR Ruby. This is output sample. So create instance Geoffrey chart specified. Geoffrey chart and bar plot, bar H, bar ball, curve, chatty, yeah, and then this is my first JR Ruby gem. JR Ruby gem include Java files. So this is gem spec in gem spec. Spec platform equal Java and spec requirements specify Java. And at runtime dependency, Java dependencies. Java dependencies, it is when bundle install, so at the same time, this Java file is installed. So this gem is not bundle Java file. So when bundle install, when bundle install, at the same time, install Java file. So chatty, please use JR Ruby. If there are JR Ruby, this is not yet complete chatty. If you have important use cases, I can write code. I'm glad to hear everyone's thoughts. Future plan. We aim for this improvement interface. This is continued. Support roll it to RO for data abstraction layer because Apache RO is great. With stable version and support data set. So like Titanic data set. So if you are interested in chatty, feel free to talk me. That's all. Thank you.