<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/the-japanr-conference-2018-round-up/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://ryo-n7.github.io/2018-12-06-japanr-conference-roundup-blog-post/"> R by R(yo)</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p>This past weekend was the <strong>9th JapanR Conference</strong> hosted at <a rel="nofollow" href="https://linecorp.com/en/" target="_blank">LINE<br>
Corporation</a> in Tokyo, Japan!</p>
<p>I’ve been back in Japan for nearly a year now and I’ve been going to<br>
nearly every one of the R user meetups here,<br>
<a rel="nofollow" href="https://tokyor.connpass.com/" target="_blank">TokyoR</a>, and it’s been a great experience<br>
to learn about R and its wide variety of uses by Japanese practitioners<br>
and academics. Besides the near-monthly meetup of TokyoR there are<br>
smaller gatherings spread throughout Japan such as<br>
<a rel="nofollow" href="https://fukuoka-r.connpass.com/" target="_blank">FukuokaR</a> and<br>
<a rel="nofollow" href="https://tsukubar.org/" target="_blank">TsukubaR</a> but the meeting that gathers the<br>
biggest crowd is the <a rel="nofollow" href="http://japanr.net/" target="_blank">JapanR Conference</a> held every<br>
December since 2010. Of course, there are outliers such as the <a rel="nofollow" href="https://tokyor.connpass.com/event/92522/" target="_blank">special<br>
TokyoR session</a> this past July<br>
when <a rel="nofollow" href="https://twitter.com/RStudioJoe" target="_blank">Joe Rickert</a> and <a rel="nofollow" href="https://twitter.com/hadleywickham" target="_blank">Hadley<br>
Wickham</a> visited Japan!</p>
<ul>
<li>Want to learn more about <strong>TokyoR</strong> and when the next meeting is?<br>
Check this <a rel="nofollow" href="https://tokyor.connpass.com/" target="_blank">link</a>! (Next meeting is<br>
January 19th, 2019)</li>
<li>Want to learn more about <strong>JapanR</strong>? Check this<br>
<a rel="nofollow" href="http://japanr.net/" target="_blank">link</a>!</li>
</ul>
<p>This time around I took the time to take notes on the presentations and<br>
write up a little round-up blog post about it. As much as I would like<br>
to write about every single presentation there were a number of topics<br>
where I really wouldn’t have been able to explain well even if the<br>
presentation were done in English! You can watch most of the<br>
presentations on the <a rel="nofollow" href="https://www.youtube.com/channel/UCXKQBlJczU7YTyVu_wW7yHA" target="_blank">JapanR YouTube<br>
channel</a>.<br>
Although the talks are in <strong>Japanese</strong> maybe you’ll still find something<br>
useful in their slides… or you can read on as I give a summary on around<br>
9 (out of 22) presentations that I found interesting!</p>
<p><strong>NOTE</strong>: Some people presented using their Twitter/online name only,<br>
it’s just a cultural thing I’ve found here relating to privacy.</p>
<p><strong>NOTE 2</strong>: There are still several presentations/slides that haven’t<br>
been uploaded yet but I will put more screenshots in as they become<br>
available so please check back in the coming days!</p>
<h1>The Presentations</h1>
<h3>Creating your own RMarkdown template! – <a rel="nofollow" href="https://twitter.com/kazutan" target="_blank">Kazuhiro Maeda</a></h3>
<p><strong>Kazuhiro Maeda</strong> is well known in the Japanese R community mainly<br>
through his online avatar (an elephant plushie) and his love for R<br>
Markdown. For this conference he presented about creating your own<br>
customized R Markdown template. Maeda-san noted that knowledge of CSS,<br>
JavaScript, and Pandoc are crucial for this task as he first explained<br>
how the <code>render()</code> function works to create a document of your choice.<br>
Within this explanation he highlighted how the output from a <code>render()</code><br>
call depends on templates and options set through Pandoc, therefore it<br>
is important to create a template that has options that can be utilized<br>
by Pandoc. As making a template from scratch is extremely difficult,<br>
Maeda-san recommended that you find an existing template and play around<br>
with it to get used to the process involved.</p>
<p>An example template Maeda-san worked on was: having an image pop out<br>
when you click on it in your R markdown document. To do this you need to<br>
use “lightbox” (a JavaScript library) and implement a script in your<br>
Pandoc template that calls on this library at the appropriate time (when<br>
you click on an image). Following a very thorough and technical<br>
explanation he showed us the fruits of his labor in a live-demo that you<br>
can see <a rel="nofollow" href="https://youtu.be/sXXXsb1MNMk?t=5003" target="_blank">here</a>, where he knits the<br>
R Markdown document and clicks on a plot image, et Voila! It pops up<br>
very nicely!</p>
<p>Since I wasn’t able to translate the template creation process well<br>
enough (live-translating technical stuff is hard!), I will leave some<br>
good links to creating your own R Markdown template in English below:</p>
<ul>
<li><a rel="nofollow" href="https://bookdown.org/yihui/rmarkdown/document-templates.html" target="_blank">Document<br>
Templates</a><br>
chapter from Yihui Xie’s <strong>R Markdown: The Definitive Guide</strong></li>
<li>A <a rel="nofollow" href="http://jianghao.wang/post/2017-12-08-rmarkdown-templates/" target="_blank">list</a><br>
of R Markdown template packages from Jianghao Wang</li>
<li>An example: the R markdown templates used by <a rel="nofollow" href="https://github.com/robjhyndman/MonashEBSTemplates" target="_blank">Monash University<br>
Department of Econometrics and Business<br>
Statistics</a></li>
<li>A short <a rel="nofollow" href="http://ismayc.github.io/ecots2k16/template_pkg/" target="_blank">tutorial</a><br>
by Chester Ismay</li>
</ul>
<h3>Easy and modern data analysis with <strong>“R AnalyticFlow”</strong>! – <a rel="nofollow" href="https://www.ef-prime.com/index_en.html" target="_blank">Ryota Suzuki</a></h3>
<p><strong>Ryota Suzuki</strong>, CEO of<br>
<a rel="nofollow" href="https://www.ef-prime.com/index_en.html" target="_blank">ef-prime</a> and author of the<br>
<a rel="nofollow" href="http://stat.sys.i.kyoto-u.ac.jp/prog/pvclust/" target="_blank">pvclust</a> package, gave a<br>
talk on <a rel="nofollow" href="https://r.analyticflow.com/en/" target="_blank">R AnalyticFlow</a> which is a free<br>
software that his company built that utilizes the R environment for<br>
statistical computing in a GUI format. <strong>R AnalyticFlow</strong> was created in<br>
Java and is compatible with Windows, Mac, and Linux OSs as well as being<br>
available in English, Japanese, Chinese, and many more languages.</p>
<p><center><br>
<img src="https://i0.wp.com/i.imgur.com/82vTlE6.jpg?w=450&ssl=1" data-recalc-dims="1"><br>
</center></p>
<p>As you can see in the picture above, <strong>R AnalyticFlow</strong> allows you to<br>
represent your data analysis workflow through nodes and edges in a<br>
descriptive flow chart. In previous versions of the GUI, the goal was to<br>
use as much of base R functions as possible but more recently R data<br>
analyses including predictive modeling have been relying heavily on<br>
external packages such as the <code>tidyverse</code>, <code>glmnet</code>, <code>xgboost</code>, etc. So<br>
now the new direction Suzuki-san wants to take is to implement these<br>
packages into <strong>R AnalyticFlow</strong> and provide support to users who want<br>
to install their own packages to use in the GUI. Lastly, in a <a rel="nofollow" href="https://youtu.be/sXXXsb1MNMk?t=6563" target="_blank">live<br>
demonstration</a> he showed us a<br>
development version of the GUI as he made some simple <code>ggplot2</code> plots<br>
with a simple mouse-and-click. Due to the new direction <strong>R<br>
AnalyticFlow</strong> is taking, Suzuki-san is looking for Java developers to<br>
help contribute to the development of the new versions of the GUI. If<br>
you know your way around Java and want to help, let him know!</p>
<h3>I have completely understood Shiny! – <a rel="nofollow" href="https://twitter.com/Med_KU" target="_blank">Med_KU</a></h3>
<p>In what was a very lively and fun presentation, <code>@Med_KU</code> took us<br>
through a very comprehensive tour of Shiny apps. First he talked about<br>
how to create a Shiny app via R Studio, working with the app.R and ui.R<br>
files, and publishing through R Studio Connect. Afterwards, he went<br>
through many examples with <code>plotly</code> and <code>googleVis</code> showing all the<br>
interactive/reactive capabilities that Shiny apps are known for.<br>
Personally, I’m more of a <code>ggiraph</code> fan myself (I use it at work for<br>
flexdashboards and Shiny apps) but <code>@Med_KU</code>’s presentation has gotten<br>
me interested in trying <code>googleVis</code> out as well!</p>
<p>I recommend watching the<br>
<a rel="nofollow" href="https://www.youtube.com/watch?v=sXXXsb1MNMk&feature=youtu.be&t=6928" target="_blank">recording</a><br>
of the presentation as <code>@Med_KU</code> goes through a lot of different<br>
examples!</p>
<h3>DID Analysis with R! – <a rel="nofollow" href="https://twitter.com/Yagi__Bei" target="_blank">Yuki Yagi</a></h3>
<p>University student <strong>Yuki Yagi</strong> presented on DID<br>
(Difference-in-differences) analysis and how he utilized it in one of<br>
his research papers. For those unfamiliar, DID is a statistical<br>
technique that observes that differential effect of a treatment<br>
(training program, medication intake, etc.) on a treatment group vs. a<br>
control group. A quick overview of DID can be found<br>
<a rel="nofollow" href="https://www.mailman.columbia.edu/research/population-health-methods/difference-difference-estimation" target="_blank">here</a>.</p>
<p>The main question that Yagi-san investigated in his research paper was:<br>
“What would be the impact on the number of patents produced when<br>
research subsidies were given to companies that were already highly<br>
skilled and had a track record of producing many patents.”</p>
<p><center><br>
<img src="https://i2.wp.com/i.imgur.com/13MQoUu.jpg?w=450&ssl=1" data-recalc-dims="1"><br>
</center></p>
<p>DID is really easy to understand given the above diagram. On the left<br>
hand side is the measurement of the outcome variable, in this case the<br>
number of patents before the treatment while on the right is the<br>
measurement of the number of patents after the treatment (research<br>
subsidies) were given to the treatment group (blue dot is the control<br>
and red dot is the treatment group).</p>
<p><center><br>
<img src="https://i2.wp.com/i.imgur.com/555oM5Z.jpg?w=450&ssl=1" data-recalc-dims="1"><br>
</center></p>
<p>Above is how the model looked like for the research question with the<br>
use of dummy variables for B (subsidy), C (post-treatment), and D<br>
(subsidy + post-treatment).</p>
<h3>Rugby Analytics with R! – <a rel="nofollow" href="https://twitter.com/K_Shoppi" target="_blank">Koichi Kinoshita</a></h3>
<p><strong>Koichi Kinoshita</strong>, a rugby performance analyst for the<br>
<a rel="nofollow" href="https://sunwolves.or.jp/en/" target="_blank">HITO-Communications Sunwolves</a> and the<br>
Northland Rugby Union (in New Zealand), gave a presentation on how he<br>
applied his nascent R skills to his favorite sport. After giving a brief<br>
explanation about the state of sports analytics in rugby and his resolve<br>
to improve his data analytics skills in R, he showed us a number of<br>
plots from data he gathered from the Japanese national rugby league<br>
website.</p>
<p>Throughout the presentation Kinoshita-san tried to answer several<br>
questions such as “<em>Is tackling percentage related to lost tries?</em>”,<br>
“<em>Do a higher number of tackles help stop line-breaks?</em>”, “<em>Can you stop<br>
line-breaks if you have a higher tackle success percentage?</em>” among<br>
others as he explained his results in thorough detail using plots as a<br>
visual aid. Ultimately, his data showed that those Japanese rugby teams<br>
with over 86% tackle success rate were able to limit line-breaks to 10<br>
or less and were very likely to win matches while those teams with a<br>
tackle success rate below 78% mostly wound up losing.</p>
<p>Armed with this knowledge, Kinoshita-san investigated further and found<br>
that across the entire season around half the teams totaled around<br>
100~150 tackles in any single game. Assuming an 80% tackle success<br>
rate, a team with 100 tackles will have 20 mistackles while a team with<br>
150 tackles will have 30 mistackles. So, the big question was: “<strong>How<br>
much will this 10 mistackle difference cost a team?</strong>”</p>
<p>Consequently, Kinoshita-san ran a regression analysis on line-breaks<br>
against a mistackles and found that on average you concede 10<br>
line-breaks from 30 mistackles. Coupling this with data presented that<br>
if a team concedes 10 line-breaks or over a team is ~70% likely to lose<br>
a game, a higher number of attempted tackles isn’t necessarily a good<br>
thing, what matters is <strong>preventing line-breaks</strong> with successful<br>
tackles!</p>
<p>In his conclusion, Kinoshita-san brought up a really good point in that<br>
it’s not enough to look at pure success/fail percentages and he brought<br>
up pass completion rate in soccer as an example. I concurred with his<br>
statement as in soccer you could naively assume a team being “dominant”<br>
or “good” if they have a really high pass completion rate, but if most<br>
of those successful passes came from the defenders and goalkeeper<br>
passing among themselves you can’t really say that that is a good thing.<br>
In soccer (and in other sports) it’s important to dig a little bit<br>
deeper, for example it might be more insightful to look at a soccer<br>
team’s pass completion rate in the opposition’s third of the pitch!</p>
<h3>Using linear regression to find a new home in Tokyo! – <a rel="nofollow" href="https://twitter.com/hana_orin" target="_blank">Kaori Sawamura</a></h3>
<p>This presentation by <strong>Kaori Sawamura</strong> showed off a fun real life case<br>
study using R. One of Sawamura-san’s co-workers wanted to move to Tokyo<br>
and become a “city boy”, so she set out to use some of her newly learned<br>
R skills to take try to find a dream home for him!</p>
<p>Here are the 3 basic requirements that Sawamura-san was given:</p>
<ul>
<li>Somewhere with a gym close by (preferably Tokyo Metropolitan<br>
Gymnasium)</li>
<li>Somewhere close to Sendagaya Station</li>
<li>Somewhere with a monthly rent below 200,000 Yen</li>
</ul>
<p>After filtering out houses above 200,000 Yen monthly rent Sawamura-san<br>
fitted a multiple linear regression as seen below:</p>
<p><center><br>
<img src="https://i2.wp.com/i.imgur.com/TvsEmpw.jpg?w=450&ssl=1" data-recalc-dims="1"><br>
</center></p>
<p>After looking at the diagnostic plots for the model she took out a few<br>
outliers that she confirmed was mainly due to incorrect data on the<br>
housing website and was able to cut her list down to around 70 houses!<br>
Then using leaflet Sawamura-san mapped out all the potential houses that<br>
fit her criteria and labelled them with details about the<br>
house/apartment.</p>
<p>After doing the analysis, she showed it to her co-worker and got him to<br>
take a look around. Unfortunately, the information provided by the<br>
website didn’t account for things such as construction work, cleanliness<br>
and safety of the neighborhood, along with the added bonus of having to<br>
live with the landlord. So this case study was also a great reminder<br>
about the necessity of doing some field work in addition to analytics!</p>
<h3>Using external C/C++ libraries with R! – <a rel="nofollow" href="https://twitter.com/heavywatal" target="_blank">Wataru Iwasaki</a></h3>
<ul>
<li><a rel="nofollow" href="https://heavywatal.github.io/slides/japanr2018/" target="_blank">Slides (in<br>
English!)</a></li>
</ul>
<p><strong>Wataru Iwasaki</strong> loves using C++ and R, he has given talks on the<br>
subject <a rel="nofollow" href="https://heavywatal.github.io/slides/tokyor71/" target="_blank">before</a> and this<br>
time was no different as he talked about incorporating and using C/C++<br>
libraries with R. First, he introduced a number of great online<br>
resources for developing <code>Rcpp</code> packages including stuff from his own<br>
website as well as the free <a rel="nofollow" href="https://teuder.github.io/rcpp4everyone_en/" target="_blank">“Rcpp for Everyone (English<br>
version)”</a> written by fellow<br>
Japanese R user <a rel="nofollow" href="https://twitter.com/teuder" target="_blank">Masaki Tsuda</a>.</p>
<p><center><br>
<img src="https://i1.wp.com/i.imgur.com/WvOGgHa.jpg?w=450&ssl=1" data-recalc-dims="1"><br>
</center></p>
<p>Next, he talked about a couple of basic steps needed to incorporate<br>
C/C++ libraries as well as the advantages and disadvantages of the<br>
various styles of doing so.</p>
<p><center><br>
<img src="https://i0.wp.com/i.imgur.com/AtAILYt.jpg?w=450&ssl=1" data-recalc-dims="1"><br>
</center></p>
<p>In Iwasaki-san’s concluding remarks he called on the community to share<br>
their knowledge of handling external C++ libraries via social media or<br>
through blog posts.</p>
<h3>Build an R compiler…with R! – <a rel="nofollow" href="https://twitter.com/igjit" target="_blank">igjit</a></h3>
<ul>
<li><a rel="nofollow" href="https://igjit.github.io/slides/2018/12/nrc/#/" target="_blank">Slides</a></li>
</ul>
<p>For this presentation <code>@igjit</code> told us about his attempt at creating an<br>
R compiler written in R! You can see the fruits of his labor in the<br>
<code>nrc</code> package that he created <a rel="nofollow" href="https://github.com/igjit/nrc" target="_blank">here</a>.<br>
<strong>Note</strong>: currently it only works on Linux so you should use something<br>
like Docker if you want to try it out on other OSs.</p>
<p>Here are some examples:</p>
<p>Simple addition:</p>
<p><center><br>
<img src="https://i0.wp.com/i.imgur.com/xlBhBA3.jpg?w=450&ssl=1" data-recalc-dims="1"><br>
</center></p>
<p>You can even assign and use variables! (the function that got cut off is<br>
<code>execute</code>):</p>
<p><center><br>
<img src="https://i2.wp.com/i.imgur.com/pZePhpc.jpg?w=450&ssl=1" data-recalc-dims="1"><br>
</center></p>
<p>I unfortunately don’t have much experience with compilers so it was<br>
tough for me to understand the technical details but it was another<br>
pretty cool example of how you can use R for just about anything!</p>
<h3>Tennis Player Ratings with R! – <a rel="nofollow" href="https://twitter.com/flaty13" target="_blank">flaty13</a></h3>
<ul>
<li><a rel="nofollow" href="https://docs.google.com/presentation/d/1QSm7EDgNk7OeLWb266LZ57787v0tybirQ3Kr5A9cmHA/edit#slide=id.p" target="_blank">Slides</a></li>
<li><a rel="nofollow" href="https://github.com/flaty4218/20181117_TennisAnalysis" target="_blank">Code</a></li>
</ul>
<p>In the second use of R in sports analysis we had <code>@flaty13</code> take a look<br>
at tennis player ELO ratings. After a brief introduction relating to<br>
tennis, ELO ratings, and his views on the difficulty of rating/ranking<br>
tennis players, he used a data set from Kaggle and the <code>PlayerRatings</code><br>
package to conjure up some visualizations on tennis player rankings over<br>
time.</p>
<p><center><br>
<img src="https://i1.wp.com/i.imgur.com/zU0oUGD.jpg?w=450&ssl=1" data-recalc-dims="1"><br>
</center></p>
<p>As a matter of course, he also looked at <strong>Kei Nishikori</strong>’s performance<br>
and highlighted his rapid rise in the rankings during 2014 where he<br>
became the first Asian to reach a <a rel="nofollow" href="https://en.wikipedia.org/wiki/2014_US_Open_%E2%80%93_Men%27s_Singles" target="_blank">Grand Slam tournament<br>
final</a>!</p>
<p><center><br>
<img src="https://i2.wp.com/i.imgur.com/RyE4xhk.jpg?w=450&ssl=1" data-recalc-dims="1"><br>
</center></p>
<p>Overall, it was nice to see how sports analytics have grown these past<br>
few years in Japan as besides this tennis presentation and the rugby<br>
presentation earlier there have been presentations relating to soccer<br>
and baseball analytics at past TokyoR meetups.</p>
<h1>Conclusion</h1>
<p>Following both the main talks and the LTs, sushi and drinks were served<br>
at the after-party as R users from all over Japan shared their stories<br>
of success and struggle alike!</p>
<p>The main organizer, <a rel="nofollow" href="https://twitter.com/gepuro" target="_blank">Atsushi Hayakawa</a><br>
mentioned that he eventually wants <strong>JapanR</strong> to grow even bigger in the<br>
coming years and to have every participant give a LT! Whether as a joke<br>
or if that is actually feasible it would be cool if we set the <em>Guiness<br>
World Record for Most Presentations at an R Conference</em>!</p>
<p>As you saw the quality of presentations at JapanR was very high.<br>
Unfortunately, most of the content was only in Japanese which I thought<br>
was a shame. That’s why I thought of doing this to share the knowledge<br>
of <strong>Japanese R Users</strong> to those around the world! This is my first time<br>
writing up one of these and I hope to contribute more and improve in the<br>
years to come!</p>
<p>If you’re ever in Japan, come join us for some R&amp;R … and R!</p>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://ryo-n7.github.io/2018-12-06-japanr-conference-roundup-blog-post/"> R by R(yo)</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/QfDnYE8lZRs" height="1"></a></div>