Recently I made a website for making insightful calculations for crowdfunding and peer to peer lending. Although I made websites with HTML and PHP when younger, this was the first complete website I took on in many years. As an amateur I like to share the technologies I used: Hugo & Markdown; R Shiny & a bit LaTeX; Adsense & cookies in JavaScript.

Using the Calculator

Hugo & Markdown

With Hugo you create static websites, without the hassle of databases and complicated CMS. There are several themes available and where necessary customization is endless. The Hugo engine builds all the necessary pages, while you focus on your content in Markdown. This means you write your pages and posts in very plain text with some tags and other markers for markup. Hugo takes care of the layout, adding menus, tag and category pages. Hugo lets you test your website locally too and after building it, you just upload all the files from a local folder to your host and done you are.

R Shiny & a bit of LaTeX

For the calculator I went with R Shiny. The mathematical logic of the calculator is easy to care off in R, the statistical programming language, and is used to:

  • Calculate remaining debt, repayments, (cumulative) interest;
  • Make (CSV) tables;
  • Plot graphs;
  • Prepare downloadable reports.

Graph by the Calculator

On top off that Shiny, a R library, serves everything to the browser. For the optional PDF output I adjusted a LaTeX template. To share a calculation, some bits of JavaScript pass URL parameters to the application in an iframe.

Adsense & cookies in JavaScript

As a learning experience and to cover some of my expenses and time I decided to use Google Adsense. To be professional about it, I made a cookiewall that asks the visitor to consent to my cookies. For that cookie consent I gladly used this cookie warning, by Scott Herbert. [FYI: after three weeks I have only earned cents.]

Lastly, over time when a website gains visibility I am sure you can also glean lots of information from Google Analytics and their Webmaster Tools.

Many thanks to Stack Overflow and contributors there. One can learn a lot from all the code answers, tips and suggestions already there.