Articles by Daniel Marcelino

The butterfly curve

October 7, 2015 | Daniel Marcelino

I came across the butterfly curve, which was discovered by Temple Fay. The butterfly curve is produced by a parametric equation where: x = sin(t) * (e^cos(t)-2cos(λt)-sin(t/12)^5) and y = cos(t) * (e^cos(t)-2cos(λt)-sin(t/12)^5). Where t stands for time ... [Read more...]

Argentine general election, 2015

August 7, 2015 | Daniel Marcelino

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 ...
[Read more...]

Ternary plots in politics

August 4, 2015 | Daniel Marcelino

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 ... [Read more...]

I loved this %>% crosstable

July 28, 2015 | Daniel Marcelino

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 =='DEPUTADO FEDERAL' | desc_cargo =='VEREADOR' | desc_... [Read more...]

The Greek thing II

July 4, 2015 | Daniel Marcelino

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 ... [Read more...]

The Greek thing

July 4, 2015 | Daniel Marcelino

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 ... [Read more...]

Network analysis with igraph

June 23, 2015 | Daniel Marcelino

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 ... [Read more...]

LDA on Ferguson Grand Jury I

December 9, 2014 | Daniel Marcelino

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 ... [Read more...]

Study of a plot

December 3, 2014 | Daniel Marcelino

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 ... [Read more...]

Flowers/Fractals

November 21, 2014 | Daniel Marcelino

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 ... [Read more...]

Stacking files made easy

November 20, 2014 | Daniel Marcelino

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 ... [Read more...]

Frente Amplio Winnability

November 14, 2014 | Daniel Marcelino

Uruguayan voters are about to give give Frente Amplio a third mandate this November 30th. The following graph shows how the outcome would look like if the election were held this week. The undecided voters were distributed accordingly to each party as by the election day. The picture draws the ... [Read more...]

Brazilian latest polls and house effects

October 25, 2014 | Daniel Marcelino

The latest polls just released tonight are suggesting a numerical tie between Dilma Rousseff (PT) and Aecio Neves (PSDB) considering the limit of the margin of error. Actually, these polls fired up a possible game-changing for the opposition over the government as some of the polls did capture any impact ... [Read more...]

What are the chances of Dilma tomorrow?

October 25, 2014 | Daniel Marcelino

Although polling data are the most common source in an electoral campaign, there are also models that use prediction markets data (trade contracts flow) as the source of information about who is going to win the election. What is the best way of predicting an election is up to debate, ... [Read more...]

Simple Probs

October 24, 2014 | Daniel Marcelino

Somebody said me that it'd be really nice to see a posting with simple simulations for the runoff this weekend. Answering such a call, this is the best I could come up with. The following is a highly simplified simulation that does not account for time trends nor for house ... [Read more...]

A bit more fragmented

October 6, 2014 | Daniel Marcelino

Tweet This year election renders an even more fragmented legislative. The way political scientists measure this is by applying an algorithm to calculate the Effective Number of Parties, which is a measure that helps to go beyond the simple number of parties. A widely accepted algorithm was proposed by M. ... [Read more...]

Got a ticket for the runoff?

October 1, 2014 | Daniel Marcelino

This is one of the very last posting before the election next Sunday. So far, the only certainty is the runoff ticket of the incumbent candidate, Dilma Rousseff (PT). The runner up candidates, the environmentalist Marina Silva (PSB) and the Social Democrat Aecio Neves are walking to a neck-and-neck dispute ... [Read more...]

A majority victory is not that impossible

September 29, 2014 | Daniel Marcelino

By this time next week, we'll already know the true vote intentions of Brazilians towards the candidates running for president. Not long time ago a runoff was taken as grant, but last polls have been converging on the feeling that Brazilians are about to reward the Workers' Party's government another ... [Read more...]
1 2

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)