Publications by Daniel Marcelino
Stacking files made easy
Every campaign cycle I usually do similar things, go to a repository, download a bounce of data, merge and store them to an existing RData file for posterior analysis. I’ve already wrote about this topic some time ago, but this time I think my script became simpler. Set the Directory Let’s assume you’re not in the same directory of your fil...
1807 sym R (429 sym/5 pcs)
Flowers/Fractals
Last week, I attended a “Flower Fest” where I had the opportunity to admire several of the most beautiful and awarded flowers, orchids, and decoration plants. Surprisingly, though, I never had thought of flowers like fractals the way I did this time. Fractals attract lots of interest, especially from mathematicians who actually spend some ti...
2165 sym 22 img
Study of a plot
I began to think on a nice way of plotting campaign expenditures in a paper I’m working on. I thought this would be something like the following–simple but meaningful even when there are outliers in both tails. Though I like the seniors Tukey’s boxplot and scatter plots, I had already used them the last time I published about this topic, so...
1664 sym 2 img
LDA on Ferguson Grand Jury I
Tweet The case of Michael Brown, an unarmed black teenager, who was shot and killed on August 9th, by Darren Wilson, a white police officer, in Ferguson has driven public opinion around the globe to the suburb of St. Louis. After few weeks, on Nov. 24, the St. Louis County prosecutor announced that a grand jury decided not to indict Mr. Wilson. T...
6575 sym 4 img
Network analysis with igraph
Suddenly, I had to learn network analysis. Two weeks ago I started with a book by Christakis and Fowler, then a book by Kolaczyk and Csárdi, now here I am in a “how to” analyse network data using R moment. This is much like learning-by-doing knowledge, so may be useful for newcomers, although at this point I’m more concerned on visualizati...
971 sym 4 img
The Greek thing
Greeks have been quite volatile on their opinion whether they should accept or not a proposal by the country’s creditors for more austerity to keep aid flowing. The polls conducted over this week look like crazy, though that “belly” was likely provoked by the anxiety on what comes next after Greece not paying IMF back. The data were collec...
796 sym 2 img
The Greek thing II
Just few hours before Greeks head to the polls to decide on the bailout agreement, and ultimately, whether the country will stay in the euro, there is no overwhelming advantage of either side. Actually, the margin became blurred over the last three days, with the “Yes” position rehearsing a last-minute recovery. Despite this last-...
1569 sym 6 img
I loved this %>% crosstable
This is a public tank you for @heatherturner’s contribution. Now the SciencesPo’s crosstable can work in a chain (%>%) fashion; useful for using along with other packages that have integrated the magrittr operator. > candidatos %>% + filter(desc_cargo == 'DEPUTADO ESTADUAL'| desc_cargo =='DEPUTADO DISTRITAL' | desc_cargo =='DEPUTAD...
627 sym R (4013 sym/2 pcs)
Ternary plots in politics
This week, I read a post by Nicholas Hamilton about ternary plots that made me think, how this geometric diagram has many different application in science fields. Couple weeks ago, I was reading a book by Donald Saari, who uses ternary charts massively to project election outcomes in different electoral settings. Perhaps, most common, ternary dia...
1936 sym 6 img
Argentine general election, 2015
The 2015 Argentine’s presidential election to be held next October 25th is approaching and the dispute begun to appear more clearly since the major parties announced their potential candidates last June. This Sunday, the political parties are holding their primaries for the upcoming presidential election. As in US, in Argentine the primaries ar...
2848 sym 6 img