This is a follow-up post to my previous post on great R functions. I use some of these functions a lot while a few of the functions have been very helpful at least once. 11. dplyr::coalesce() I have been working with data where two columns have the relevant data that needed to be in one […]
Tag: R
Updating the replication material for “Welfare Retrenchments and Government Support”
In 2017, I pushed the replication material for my article, ‘Welfare Retrenchments and Government Support’, to a GitHub repository. I had been working on the article for years and the code was not necessarily up to date. It worked perfectly, gave the exact estimates and was relatively easy to read. Accordingly, everything was good, life […]
Udregn mandater til Folketinget med R
I mange meningsmålinger rapporteres partiernes opbakning ikke udelukkende med andelen af stemmer i procent, men også som mandattal. D’Hondts metode bruges som bekendt fordelingen af kredsmandater ved Folketingsvalg, der sammen med tillægsmandater sikrer en ligelig fordeling mellem stemmer og mandater ved valget. Hvis man gerne vil estimere hvor mange mandater de respektive partier står til […]
Data visualization: a reading list
Here is a collection of books and peer-reviewed articles on data visualization. There is a lot of good material on the philosophy, principles and practices of data visualization. I plan to update the list with additional material in the future (see the current version as a draft). Do reach out if you have any recommendations. […]
Potpourri: Statistics #63 (COVID-19)
– Why outbreaks like coronavirus spread exponentially, and how to “flatten the curve” – Top 15 R resources on Novel COVID-19 Coronavirus – Collection of analyses, packages, visualisations of COVID19 data in R – Coronavirus (Covid-19) Data in the United States – How to Flatten the Curve, a Social Distancing Simulation and Tutorial – Forecasting […]
New resource: awesome-ggplot2
I use ggplot2 every day. It is a great R package and the best tool available to make beautiful data visualisations. The logic of grammar of graphics makes it easy to learn as well as making it possible for you to gradually improve your plots. Luckily, there are a lot of resources available for the […]
Potpourri: Statistics #58
– Mastering R presentations – The Little Handbook of Statistical Practice – Create regular expressions easily – Data Integrity Tests for R – Quantitative Economics with Python – Doing Meta-Analysis in R: A Hands-On Guide – Appreciating R: The Ease of Testing Linear Model Assumptions – Just Quickly: The unexpected use of functions as arguments […]
A Guide to Getting International Statistics into R
In political science, some of the data we use is from international databases such as the World Bank, ILOSTAT, OECD, WHO and Eurostat. One possibility to access data from these sources is to manually download data from their webpages. This is, however, often time-consuming and not an efficient way to obtain data. Luckily, there are […]
Teaching material: Quantitative Politics with R
If you are interested in learning R, I can recommend this resource: Quantitative Politics with R. It is a guide in development (together with Zoltán Fazekas). In the current version, you will find an introduction to the basics of R (e.g. how to import and manipulate data), how to collect political data (primary and secondary […]
Potpourri: Statistics #51
– 2018 in Graphics: Bloomberg, FiveThirtyEight, Reuters, Nathan Yau – Survey Raking: An Illustration – textrecipes 0.0.1 – Topics in Econometrics: Advances in Causality and Foundations of Machine Learning – Learning Statistics with R – EDUC 263: Introduction to Data Management Using R – Practical R for Mass Communication and Journalism: How Do I? … […]