Blog Archives

The butterfly curve

October 7, 2015
By
The butterfly curve

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 and λ for a user input variable. I used ggplot to create a plot of the butterfly … Read More...

Read more »

Isn’t sad that all that matters in an election is the candidate’s height?

September 15, 2015
By
Isn’t sad that all that matters in an election is the candidate’s height?

I came across the claim in the US press suggesting that the taller the candidate, the better his/her chances for success in presidential elections. After a little search, I found this Wikipedia entry, and even some academic research on the issue, mainly relating this phenomenon to some sort of evolutionary instinctual preference. At least in

Read more »

Argentine general election, 2015

August 7, 2015
By
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 are important for

Read more »

Ternary plots in politics

August 4, 2015
By
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

Read more »

I loved this %>% crosstable

July 28, 2015
By

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_cargo =='SENADOR') %>%

Read more »

The Greek thing II

July 4, 2015
By
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-minute trend, … Read More...

Read more »

The Greek thing

July 4, 2015
By
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. … Read More...

Read more »

Network analysis with igraph

June 23, 2015
By
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 … Read More...

Read more »

LDA on Ferguson Grand Jury I

December 9, 2014
By
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 … Read More...

Read more »

Study of a plot

December 3, 2014
By
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 … Read More...

Read more »

Sponsors

Mango solutions



RStudio homepage



Zero Inflated Models and Generalized Linear Mixed Models with R

Quantide: statistical consulting and training



http://www.eoda.de







ODSC

ODSC

CRC R books series











Contact us if you wish to help support R-bloggers, and place your banner here.

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)