Publications by rdata.lu Blog | Data science with R
License
LICENSE Unless otherwise mentioned code from this blog can used as per MIT or Apache 2.0 license. Related To leave a comment for the author, please follow the link and comment on their blog: rdata.lu Blog | Data science with R. R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other top...
545 sym
Disclaimer
Disclaimer Your disclaimer text here NOTE:Some information in this website might be copied from other websites. If you see something is your copyright or something should not belong here, please feel free to contact me. I will remove necessary parts. Related To leave a comment for the author, please follo...
735 sym
Scraping data from STATEC’s public tables
A lot of open data is available in Luxembourg’s open data portal, but sometimes, it is not very easy to download. In the video below, I give you an example of such data and show how you can use rvest to get the data easily. After watching the video, take a look at the code below. This code does two things; first it scrapes the data, and then it...
3407 sym R (5160 sym/6 pcs)
How tidyeval could make your life easier
First thing’s first: maybe you shouldn’t care about tidyeval. Maybe you don’t need it. If you exclusively work interactively, I don’t think that learning about tidyeval is important. I can only speak for me, and explain to you why I personally find tidyeval useful. I wanted to write this blog post after reading this twitter thread and spe...
3168 sym R (302 sym/3 pcs)
Communication between R and d3js
Hello everyone, In this post we will focus on how to send a message from R to javascript. More precisely, we will focus on the basic keywords and knowledge to integrate a d3.js graph into shiny, just like here. If you have any issue to make shiny and javascript communicate after reading this post, I suggest you to go back to this simple shiny app...
2778 sym R (661 sym/4 pcs) 4 img
Let’s make ggplot2 purrr again
Update: I’ve included another way of saving a separate plot by group in this article, as pointed out by @monitus. Actually, this is the preferred solution; using dplyr::do() is deprecated, according to Hadley Wickham himself. I’ll be honest: the title is a bit misleading. I will not use purrr that much in this blog post. Actually, I will use ...
5045 sym R (2277 sym/12 pcs) 4 img
Barplot with ggplot2/plotly
Hello everyones, I just finished my MOOC on Foundations of strategic business analitycs. It was interresting and at the end of this course, I had to present a graph that was suppose to be relevent for a business organization. Different datasets were availables: speed dating, Co2 emissons, bike sharing, loans, telecom churn, fuel prices, medical e...
1993 sym R (8179 sym/2 pcs) 4 img
Easy peasy STATA-like marginal effects with R
Model interpretation is essential in the social sciences. If one wants to know the effect of variable x on the dependent variable y, marginal effects are an easy way to get the answer. STATA includes a margins command that has been ported to R by Thomas J. Leeper of the London School of Economics and Political Science. You can find the source cod...
3078 sym R (3256 sym/11 pcs) 4 img
Scraping data from the local elections
One of my journalist friend was looking at the result of the local election in Luxembourg and he was dissatisfied because he was unable to compare the results of all the communes. In fact, he wanted to compare the number of women that were candidates in each commune. So I asked him to hold on and I came back one hour later with this script that e...
2818 sym R (5735 sym/10 pcs)
Functional peace of mind
I think what I enjoy the most about functional programming is the peace of mind that comes with it. With functional programming, there’s a lot of stuff you don’t need to think about. You can write functions that are general enough so that they solve a variety of problems. For example, imagine for a second that R does not have the sum() functi...
3086 sym R (3436 sym/5 pcs)