<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/how-to-self-publish-a-book/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://blog.datascienceheroes.com/how-to-self-publish-a-book/"> R - Data Science Heroes Blog</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<div><img alt="How to self-publish a book" src="https://i1.wp.com/blog.datascienceheroes.com/content/images/2018/08/dslb_wood.jpg?w=456&ssl=1" data-recalc-dims="1">
<p>Hello World!</p>
<p>tl;dr: A list of useful resources aimed to self-publish a book on Amazon using Bookdown.</p>
<ul>
<li>Writing style</li>
<li>Did I use any editor?</li>
<li>Marketing</li>
<li>How to create the book: Bookdown!</li>
<li>Self-publishing on Amazon (Kindle and paperback)</li>
<li>Costs and earnings</li>
<li>Publishing outside Amazon: Gumroad</li>
<li>Proofreading</li>
<li>Cover</li>
<li>ISBN</li>
<li>11-tips to write good</li>
</ul>
<h2>Introduction</h2>
<p>A friend of mine told me to write down all the details about self-publishing a book.<br>
So here you go - a long post explaining almost all the things I have done and discovered.</p>
<p>First of all, my thanks go to Bookdown. This R package allows enthusiastic people to self-publish a book! Although the book is based on R language, this process can be applied to any kind of book.</p>
<p>Kaylen Sanders from OpenDataScience.com did a poetic <a rel="nofollow" href="https://opendatascience.com/the-open-source-project-data-science-live-book-is-now-available" target="_blank">review of it</a>.</p>
<h2>The end</h2>
<p>The two-year journey culminated with two paperback versions available on Amazon (Color and B&amp;W), a Kindle version, an epub version, a PDF, and a <a rel="nofollow" href="http://livebook.datascienceheroes.com/" target="_blank">website</a>.</p>
<p><img alt="How to self-publish a book" title="plot of chunk unnamed-chunk-1" src="https://i1.wp.com/s3.amazonaws.com/datascienceheroes.com/img/blog/dslb_2.gif?w=300&ssl=1" data-recalc-dims="1"></p>
<h2>The start</h2>
<p>I didn’t plan to write a book. Around six years ago, I started using R and, as with many programmers, my &quot;personal&quot; library with many shortcuts began to grow.</p>
<p>Then I thought that this library could help more people, so after arranging lots of things in the right place, I published the ‘funModeling’ package on CRAN in February 2016.</p>
<p>Google and the book <a rel="nofollow" href="http://r-pkgs.had.co.nz/" target="_blank">R Packages</a> from Hadley Wickham (April 2015) were incredibly useful. Don’t hesitate to check out that book if you plan to write a package.</p>
<p><img alt="How to self-publish a book" title="plot of chunk unnamed-chunk-2" src="https://i0.wp.com/s3.amazonaws.com/datascienceheroes.com/img/blog/01_r_packages.png?w=250&ssl=1" data-recalc-dims="1"></p>
<p>I deeply believe that when there is an explanation behind what we use and what we do, it changes the way we perceive the action. So, I started to document the funModeling package functions.</p>
<p>The documentation grew rapidly, and soon escaped from the original scope of the package to include general explanations of machine learning and data preparation, and then the first version of the book was born!</p>
<p>Two months after the release, I rewrote everything from scratch.</p>
<p>There are two <strong>key points</strong> here:</p>
<ol>
<li>We don't always we have a clear goal - we just &quot;walk&quot; and that goal takes shape.</li>
<li>The first version is not always the ultimate one; start now with the ideas you already have and let them grow.</li>
</ol>
<p></p>
<h2>Writing style</h2>
<p>I wanted to &quot;write everything I know&quot; - things that took me a lot of time to learn - and expose the concepts with examples, lots of examples, so the reader can check them and extract their own conclusions.</p>
<p>The other remarkable point was on ‘how to interpret all the results.�? I found that when someone explains the analytical thinking path, extracting different conclusions from the analysis; then the undersanding around the topic is boosted.</p>
<p>These two books are aligned with the last idea:</p>
<p><img alt="How to self-publish a book" title="plot of chunk unnamed-chunk-3" src="https://i1.wp.com/s3.amazonaws.com/datascienceheroes.com/img/blog/02_dm_jiawei.png?w=250&ssl=1" data-recalc-dims="1"></p>
<p><em>Data Mining: Concepts and Techniques 3rd Edition</em> by Jiawei Han, Micheline Kamber and Jian Pei (2012)</p>
<p><img alt="How to self-publish a book" title="plot of chunk unnamed-chunk-4" src="https://i0.wp.com/s3.amazonaws.com/datascienceheroes.com/img/blog/03_dm_torgo.png?w=250&ssl=1" data-recalc-dims="1"></p>
<p><em>Data Mining with R: Learning with Case Studies</em> by Luís Torgo (2011)</p>
<p>Note: Data Science = Data Mining + some marketing <img alt="😉" src="https://s.w.org/images/core/emoji/11/72x72/1f609.png" class="wp-smiley"> Nowadays: Data Mining = web scraping</p>
<p></p>
<h2>Did I use any editor?</h2>
<p>Nope, you can 100% self-publish a book on your own, with patience and the Amazon self-publishing service.</p>
<p>Editors can help in the book structure, proofreading, marketing, printing, and distribution among others. It saves time.</p>
<p></p>
<h2>Marketing</h2>
<p>A friend of mine surprised me with a Facebook ad campaign for the book when I launched it. Except from that, all marketing was done by word-of-mouth and some posts in the <a rel="nofollow" href="http://blog.datascienceheroes.com/" target="_blank">Data Science Heroes Blog</a>.</p>
<p>Would you share it? <img alt="😉" src="https://s.w.org/images/core/emoji/11/72x72/1f609.png" class="wp-smiley"></p>
<p></p>
<h2>How to create the book: Bookdown!</h2>
<p>This amazing R package provides all the processes to create Kindle and paperback editions.</p>
<p><strong>Get started with the minimum reproducible example at</strong>: <a rel="nofollow" href="https://bookdown.org/yihui/bookdown" target="_blank">https://bookdown.org/yihui/bookdown</a></p>
<p><img alt="How to self-publish a book" title="plot of chunk unnamed-chunk-5" src="https://i0.wp.com/s3.amazonaws.com/datascienceheroes.com/img/blog/05_bookdown_cover.png?w=250&ssl=1" data-recalc-dims="1"></p>
<p><strong>The <em>Data Science Live Book</em> was 100% done using R and RStudio.</strong></p>
<p>Only Bookdown should be a BIG point in any <em>&quot;Why R?&quot;</em> list.</p>
<p>You should google all of these terms before starting: Latex, Yaml, Knitr, R markdown, Pandoc, GitBook. None of them are Pokémon.</p>
<p></p>
<h2>Self-publishing on Amazon</h2>
<p><img alt="How to self-publish a book" title="plot of chunk unnamed-chunk-6" src="https://i2.wp.com/s3.amazonaws.com/datascienceheroes.com/img/blog/06_amazon.png?w=150&ssl=1" data-recalc-dims="1"></p>
<p>Amazon runs a program called <a rel="nofollow" href="https://kdp.amazon.com/" target="_blank">Kindle Direct Publishing</a> (KDP).</p>
<h3>Publishing the paperback version</h3>
<p>You upload the PDF and Amazon will <strong>print on demand</strong>. That’s it. You don’t have to invest any money to buy so many copies before the release. After you publish, if one person from the Antartida buys a copy, then it is printed and delivered.</p>
<p>There are other print-on-demand publishers, like <a rel="nofollow" href="https://www.lulu.com/" target="_blank">lulu.com</a>.</p>
<p>I chose to have both versions: <a rel="nofollow" href="https://www.amazon.com/dp/9874269049" target="_blank">Black &amp; White</a> and <a rel="nofollow" href="https://www.amazon.com/dp/9874273666" target="_blank">Color</a>.</p>
<p>The quality is excellent in both, but the color one is stunning! I see how colors help us to understand. However, the printing costs are around four times higher for this version.</p>
<p>Amazon will check several layout points before approving the release.</p>
<p>Check the color version:</p>
<p><img alt="How to self-publish a book" title="plot of chunk unnamed-chunk-7" src="https://i0.wp.com/s3.amazonaws.com/datascienceheroes.com/img/blog/07_dslb.png?w=456&ssl=1" data-recalc-dims="1"></p>
<p>And one from the black and white:</p>
<p><img alt="How to self-publish a book" title="plot of chunk unnamed-chunk-8" src="https://i2.wp.com/s3.amazonaws.com/datascienceheroes.com/img/blog/08_dslb.png?w=456&ssl=1" data-recalc-dims="1"></p>
<p>Note the quality of the plots and code layout - pretty important in a programming book.</p>
<h3>Publishing the Kindle version</h3>
<p>Easier to publish than the paperback.</p>
<p>The Kindle version of the Data Science Live Book, <a rel="nofollow" href="https://www.amazon.com/dp/9874273666" target="_blank">here</a>!</p>
<p>(Amazon is incredibly vast, from printing-publishing books to host deep learning processes in AWS. Someday, Amazon and Google will be countries.)</p>
<p>You won’t become rich publishing books unless you have a catchy title, like &quot;Fifty Shades of Data in Grey.&quot;</p>
<p></p>
<h2>Costs and earnings</h2>
<h3>Kindle</h3>
<p>There are two royalty options: 35% or 70%. We always want the higher, right? Well, in the 70% range, the book price must be US$9.99 at the most.</p>
<p>More info: <a rel="nofollow" href="https://kdp.amazon.com/en_US/help/topic/G200634560" target="_blank">https://kdp.amazon.com/en_US/help/topic/G200634560</a></p>
<h3>Paperback</h3>
<p>Printing costs depend on <strong>several factors</strong>. On this page, you will find how costs/royalties are calculated as well as a &quot;Printing cost calculator&quot; excel file: <a rel="nofollow" href="https://kdp.amazon.com/en_US/help/topic/G201834340" target="_blank">https://kdp.amazon.com/en_US/help/topic/G201834340</a></p>
<p><img alt="How to self-publish a book" title="plot of chunk unnamed-chunk-9" src="https://i0.wp.com/s3.amazonaws.com/datascienceheroes.com/img/blog/09_earnings.png?w=456&ssl=1" data-recalc-dims="1"></p>
<p>Amazon royalties are around 40% of retail price.</p>
<p>Typically, royalties when using a publisher are around 8 - 12% of the retail price. Source <a rel="nofollow" href="https://www.alanjacobson.com/writers-toolkit/the-business-of-publishing/" target="_blank">here</a>.</p>
<p>Having a publisher/editor may facilitate several of things, so don’t opt out only because of the earnings.</p>
<p></p>
<h2>Publishing outside Amazon: Gumroad</h2>
<p><a rel="nofollow" href="https://gumroad.com/" target="_blank">Gumroad</a> is a service that allows users to sell different types of files across the internet, e.g., music, videos, and data science books.</p>
<p><img alt="How to self-publish a book" title="plot of chunk unnamed-chunk-10" src="https://i1.wp.com/s3.amazonaws.com/datascienceheroes.com/img/blog/10_gumroad.png?w=250&ssl=1" data-recalc-dims="1"></p>
<p>Gumroad provides a shopping cart and, after payment, the buyer automatically receives an email with the download link. It works really well! No one complains about the service. The pricing is affordable: <em>&quot;If you use the Free version of Gumroad, our fee is just 8.5% + 30 cents per transaction. If you get the Premium version of Gumroad for $10 (USD)/month, our fee is 3.5% + 30 cents per sale.&quot;</em></p>
<p>I started with the free version and then changed to premium.</p>
<p>One of the most useful features is that they allow embedding the payment form into your website. You can check mine <a rel="nofollow" href="https://livebook.datascienceheroes.com/download-book.html" target="_blank">here</a>.</p>
<p>The other useful feature is name your price. The minimum price to download the <em>Data Science Live Book</em> is US$5 and the buyer gets all three versions: PDF, .mobi, and .epub.</p>
<p>While I was writing this post, I saw that 37% of buyers spent more than the minimum - <strong>I’m happy</strong> you like the project!</p>
<p>This is a list of unique buyers' countries that bought using Gumroad - so it works worldwide.</p>
<p><img alt="How to self-publish a book" title="plot of chunk unnamed-chunk-11" src="https://i1.wp.com/s3.amazonaws.com/datascienceheroes.com/img/blog/11_countries.png?w=456&ssl=1" data-recalc-dims="1"></p>
<p>Did you find the outlier? <img alt="😛" src="https://s.w.org/images/core/emoji/11/72x72/1f61b.png" class="wp-smiley"></p>
<p></p>
<h2>Proofreading</h2>
<p>Try always to share the book before its release.<br>
Proofreading is needed at two levels: <strong>technical and grammatical</strong>.</p>
<p>Regarding the technical aspects, the proofreading was mainly done by Pablo Seibelt, Head of Data in Auth0. I have also made some changes based on people's feedback. (Thanks!).</p>
<p>Regarding the grammar check, I hired several English teachers, to finally keep with one outstanding freelancer, Dr. Candy Pettus, from www.fiverr.com (a site to hire freelancers).</p>
<p><img alt="How to self-publish a book" title="plot of chunk unnamed-chunk-12" src="https://i0.wp.com/s3.amazonaws.com/datascienceheroes.com/img/blog/12_gramarly.png?w=200&ssl=1" data-recalc-dims="1"><br>
<img alt="How to self-publish a book" title="plot of chunk unnamed-chunk-13" src="https://i0.wp.com/s3.amazonaws.com/datascienceheroes.com/img/blog/13_deepl.png?w=200&ssl=1" data-recalc-dims="1"></p>
<p>Because my native language is Spanish (Hola!), I also use tools like <a rel="nofollow" href="https://www.grammarly.com/" target="_blank">Grammarly</a> and <a rel="nofollow" href="https://www.deepl.com/" target="_blank">DeepL</a> (which works better than Google Translate).</p>
<p></p>
<h2>Cover</h2>
<p>The tree was generated by an iterative and short algorithm.<br>
Representing that simplicity is the seed of complexity.<br>
Like fractals.<br>
Like the Lorenz Attractor.<br>
And like nature itself…</p>
<p>Then, the designer, <a rel="nofollow" href="https://www.linkedin.com/in/barbaramercedes/" target="_blank">Barbara Muños</a>, took the little tree and made the magic!</p>
<p><img alt="How to self-publish a book" title="plot of chunk unnamed-chunk-14" src="https://i1.wp.com/s3.amazonaws.com/datascienceheroes.com/img/blog/14_cover_dslb.png?w=300&ssl=1" data-recalc-dims="1"></p>
<p>And, yes, the curve on the top follows the Fibonacci ratio, a feature present in flowers, art, the human body, and &quot;a big etc.&quot;</p>
<p>There are plenty of cover designers on <a rel="nofollow" href="https://www.fiverr.com/" target="_blank">fiverr.com</a>.</p>
<p></p>
<h2>ISBN</h2>
<p>The International Standard Book Number (<a rel="nofollow" href="https://en.wikipedia.org/wiki/International_Standard_Book_Number" target="_blank">ISBN</a>) is a unique numeric commercial book identifier. Publishers purchase an ISBN from an affiliate of the International ISBN Agency.</p>
<p><strong>You will need an ISBN for each book version</strong>. In my case, I bought three: one for each of the Kindle, B&amp;W, and color versions. Note: the content is the same in all three.</p>
<p>Amazon can provide you with a &quot;free&quot; ISBN if you sell the book only with them. If you want to sell in other markets, then you will have to get outside of Amazon.</p>
<h3>Imprint</h3>
<p>&quot;An imprint of a publisher is a trade name under which it publishes a work&quot; Source: <a rel="nofollow" href="https://en.wikipedia.org/wiki/Imprint_(trade_name)" target="_blank">Wikipedia</a>.</p>
<p>The imprint is defined when you register your ISBN. Being a self-publisher means that you can pick your imprint name (it can be your real name or a fictitious one).</p>
<p>If you self-publish and you bought an ISBN outside the US, then you have to let <a rel="nofollow" href="http://www.bowker.com/" target="_blank">bowker.com</a> know that you effectively own the ISBN you are uploading. Contact them by email for more information.</p>
<p>Disclaimer: I’m not an expert on the ISBN or imprint name, therefore, what applies in my case may not in yours.</p>
<p></p>
<h2>How to write good</h2>
<p><img alt="How to self-publish a book" title="plot of chunk unnamed-chunk-15" src="https://i2.wp.com/s3.amazonaws.com/datascienceheroes.com/img/blog/15_write_good.png?w=456&ssl=1" data-recalc-dims="1"></p>
<ol start="11">
<li>Memes</li>
</ol>
<p></p>
<h2>Next post</h2>
<p>I prepared a list of issues and Bookdown configurations to keep in mind that took me lot of time to find. Hopefully, it will save you time.</p>
<p></p>
<h2>Final words</h2>
<p>Is it possible to self-publish a book? Yes, definitely!</p>
<p>Some links:</p>
<ul>
<li>Github <a rel="nofollow" href="https://github.com/pablo14/data-science-live-book" target="_blank">https://github.com/pablo14/data-science-live-book</a></li>
<li>Web version: <a rel="nofollow" href="http://livebook.datascienceheroes.com/" target="_blank">http://livebook.datascienceheroes.com</a></li>
<li>Amazon B&amp;W: <a rel="nofollow" href="https://www.amazon.com/dp/9874269049" target="_blank">https://www.amazon.com/dp/9874269049</a></li>
<li>Amazon Color: <a rel="nofollow" href="https://www.amazon.com/dp/9874273666" target="_blank">https://www.amazon.com/dp/9874273666</a></li>
</ul>
<p>I found this post useful on this topic: <a rel="nofollow" href="https://msperlin.github.io/2017-02-16-Writing-a-book/" target="_blank">Writing an R book and self-publishing it in Amazon</a> by Marcelo Perlin.</p>
<p>I will leave you with the back of the <em>Data Science Live Book</em>:</p>
<p><img alt="How to self-publish a book" title="plot of chunk unnamed-chunk-16" src="https://i1.wp.com/s3.amazonaws.com/datascienceheroes.com/img/blog/16_back.png?w=250&ssl=1" data-recalc-dims="1"></p>
<hr>
<p>Thanks for reading! <img alt="🙂" src="https://s.w.org/images/core/emoji/11/72x72/1f642.png" class="wp-smiley"></p>
<p><a rel="nofollow" href="https://blog.datascienceheroes.com/how-to-self-publish-a-book/blog.datascienceheroes.com" target="_blank">Blog</a></p>
<p><a rel="nofollow" href="https://www.linkedin.com/in/pcasas/" target="_blank">Linkedin</a></p>
<p><a rel="nofollow" href="https://twitter.com/pabloc_ds" target="_blank">Twitter</a></p>
</div>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://blog.datascienceheroes.com/how-to-self-publish-a-book/"> R - Data Science Heroes Blog</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/eErY0ucUKZ4" height="1"></a></div>