How to add a live chat to your Shiny app

How to add a live chat to your Shiny app
As I am currently working on a Fraud Analytics Web Application based on Shiny (currently on beta version, more later on this blog) I found myself asking: wouldn’t be great to add live chat support to my Web Application visitors?
It would indeed!
an ancient example of chatting - Camera degli Sposi, Andrea Mantegna 1465 -1474
an ancient example of chatting – Camera degli Sposi, Andrea Mantegna 1465 -1474
But how to do it?
Unfortunately, looking on Google didn’t give any useful result.
Therefore I had to find it out by myself.

Continue reading “How to add a live chat to your Shiny app”

Advertisement

Catching Fraud with Benford’s law (and another Shiny App)

Catching Fraud with Benford’s law (and another Shiny App)

In the early ‘900 Frank Benford observed that ‘1’ was more frequent as first digit in his own logarithms manual.

More than one hundred years later, we can use this curious finding to look for fraud on populations of data.

just give a try to the shiny app

What ‘Benford’s Law’ stands for?

Around 1938 Frank Benford, a physicist at the General Electrics research laboratories, observed that logarithmic tables were more worn within first pages: was this casual or due to an actual prevalence of numbers near 1 as first digits?

Continue reading “Catching Fraud with Benford’s law (and another Shiny App)”

How to use Github with Rstudio : step-by-step tutorial

How to use Github with Rstudio : step-by-step tutorial

Pushing to my Github repository directly from the Rstudio project, avoiding that annoying “copy & paste” job. Since it is one of Best Practices for Scientific Computing, I have been struggling for a while with this problem.  Now that I managed to solve the problem, I think you may find useful the detailed tutorial that follows. I am not going to explain you the reason why you should use Github with your  Rstudio project, but if you are asking this to yourself, you may find useful a Stack Overflow discussion on the topic.

0. download last git version

you can download the last git version from Git website git logo

Continue reading “How to use Github with Rstudio : step-by-step tutorial”

Network Visualisation With R

Network Visualisation With R

The main reason why

After all, I am still an Internal Auditor. Therefore I often face one of the typical internal auditors problems: understand links between people and companies, in order to discover the existence of hidden communities that could expose the company to unknown risks.

the solution: linker

In order to address this problem I am developing Linker, a lean shiny app that take 1 to 1 links as an input and gives as output a network map:
the Linker
click the picture to reach the app

Continue reading “Network Visualisation With R”

Querying Google With R

Querying Google With R
If you have a blog you may want to discover how your website is performing for given keywords on Google Search Engine. As we all know, this topic is not a trivial one.
Problem is that the analogycal solution would be quite time-consuming, requiring you to search your website for every single keyword, on many many pages.
Feeling this way?
“Pain and fear, pain and fear for me” – Oliver Twist
I was.

Continue reading “Querying Google With R”

Best Practices for Scientific Computing

Best Practices for Scientific Computing

I reproduce here below principles from the amazing paper Best Practices for Scientific Computing, published on 2012 by a group of US and UK professors. The main purpose of the paper is to “teach”  good programming habits shared from professional developers to people  that weren’t born developer, and became developers just for professional purposes.

Scientists spend an increasing amount of time building and using software. However, most scientists are never taught how to do this efficiently

Best Practices for Scientific Computing

  1. Write programs for people, not computers.

    1. a program should not require its readers to hold more than a handful of facts in memory at once
    2. names should be consistent, distinctive and meaningful
    3. code style and formatting should be consistent
    4. all aspects of software development should be broken down into tasks roughly an hour long Continue reading “Best Practices for Scientific Computing”

excel right() function in R

as part of the excel functions in R, I have developed this custom function, reproducing the excel right() function in th R language. Feel free to copy and use it.

right = function (string, char){
substr(string,nchar(string)-(char-1),nchar(string))}

you can find other function in the Excel functions in R post.

excel left() function in R

as part of the excel functions in R, I have developed this custom function, emulating the excel left() function in th R language. Feel free to copy and use it.

left = function (string,char){

 substr(string,1,char)}

you can find other function in the Excel functions in R post.

excel functions in R

excel functions in R
I have started my “data-journey” from Excel, getting excited by formulas like VLookup(), right() and left().
then datasets got bigger, and I discovered that little spreadsheets were not enough, and look for something bigger and stronger, eventually coming to R.
So, for fun and for practice, I have written down some of excel functions in R.
I hope you will enjoy.

Excel Functions in R:

  • find()
  • vlookup()