Are you parallelizing your raster operations? You should!

If you plan to do anything with the raster package you should definitely consider parallelize all your processes, especially if you are working with very large image files. I couldn’t find any blog post describing how to parallelize with the raster package (it is well documented in the package documentation, though). So here my notes.

Thursday, 17 January 2019

2018 Italian general election: Details on my simulation

This article describes the simulation behind the app that you find here

This simulation of the results for the 2018 general election is based on the results from the last two national elections (the Italian parliament election in 2013 and the European Parliament election 2014) and national polls conducted until 16 February 2018. The simulation is based on one assumption, which is reasonable but not necessarily realistic: the relative territorial strength of parties is stable. From this assumption derives that if the national support for a party (as measured by national voting intention polls) varies, it varies consistently and proportionally everywhere. A rising tide lifts all boats and vice versa. The assumption has some empirical justification. If we compare the difference from the national support (in percentage) for each district in 2013 and 2014 we see a significant correlation, especially in the major parties.

Votes to party in the 2018 Chamber districts


Tuesday, 27 February 2018

NDVI, risk assessment and developing countries

The Normalized Difference Vegetation Index (NDVI) estimates the greenness of plants covering the surface of the Earth by measuring the light reflected by the vegetation into space. The main idea behind the NDVI is that visible and near-infrared light is absorbed in different proportions by healthy and unhealthy plants: a green plant will reflect 50% of the near infrared-light it receives and only 8% of the visible light while an unhealthy plant will reflect respectively 40% and 30%. NDVI can then be used to quantitatively compare vegetation conditions across time and space (and indeed is quite widely used, a Google Scholar search on NDVI produced 60,500 hits).


Thursday, 14 February 2013


Twitter: frbailo




  • How to create your personal CRAN-like repository on R-universe
    This post is part of a series of technotes about r-universe, a new umbrella project by rOpenSci under which we experiment with various ideas for improving publication and discovery of research software in R. As the project evolves, we will post update... The post How to create your personal CRAN-like repository on R-universe first appeared […]
  • Working with Notion API from R
    When searching for a solution where I could store some flat files as a database, Notion came up. The nice thing about it is that it offers an API to most of its functionality. At the time of this writing this is still in beta, but hopefully it will bec... The post Working with Notion […]
  • rbind in r-Combine Vectors, Matrix or Data Frames by Rows
    rbind in r, In this article, will describe the uses and applications of rbind(), rbind.fill() and bind_rows() functions in R programming. rbind() in R... The post rbind in r-Combine Vectors, Matrix or Data Frames by Rows appeared first on finnstats. The post rbind in r-Combine Vectors, Matrix or Data Frames by Rows first appeared on […]
  • Class imbalance and classification metrics with aircraft wildlife strikes
    This is the latest in my series of screencasts demonstrating how to use the tidymodels packages, from just starting out to tuning more complex models with many hyperparameters. I recently participated in SLICED, a competitive data science prediction... The post Class imbalance and classification metrics with aircraft wildlife strikes first appeared on R-bloggers.
  • Which Religious Groups Have the Most Sex?
    There has been plenty of discussion about declining fertility rates and patterns of marriage among people in the United States following the news that the US birth rate declined to its lowest since the Great Depression. There are a lot of debates a... The post Which Religious Groups Have the Most Sex? first appeared on […]

RSS Simply Statistics

  • Streamline - tidy data as a service
    Tldr: We started a company called Streamline Data Science that offers tidy data as a service. We are looking for customers, partnerships and employees as we scale up after closing our funding round! Most of my career, I have worked in the muck of data cleaning. In the world of genomics, a lot of […]
  • The Four Jobs of the Data Scientist
    In 2019 I wrote a post about The Tentpoles of Data Science that tried to distill the key skills of the data scientist. In the post I wrote: When I ask myself the question “What is data science?” I tend to think of the following five components. Data science is (1) the application of design […]
  • Palantir Shows Its Cards
    File this under long-term followup, but just about four years ago I wrote about Palantir, the previously secretive but now soon to be public data science company, and how its valuation was a commentary on the value of data science more generally. Well, just recently Palantir filed to go public and therefore submitted a registration […]

RSS Statistical Modeling, Causal Inference, and Social Science

  • Pittsburgh by Frank Santoro
    Last year we discussed a silly study, and that lead us to this interesting blog by Chris Gavaler, which pointed me to a recent picture storybook, Pittsburgh, by Frank Santoro. The book was excellent. I don’t have any insights to share here; I just wanted to thank Santoro for writing the book and Gavaler for […]
  • Meta-meta-science studies
    August Wartin asks: Are you are familiar with any (economic) literature that attempts to model academia or the labor market for researchers (or similar), incorporating stuff like e.g. publication bias, researcher degrees of freedom, the garden of forking paths etcetera (and that perhaps also discusses possible proposals/mechanisms to mitigate these problems)? And perhaps you might […]
  • She’s thinking of buying a house, but it has a high radon measurement. What should she do?
    Someone wrote in with a question: My Mom, who has health issues, is about to close on a new house in **, NJ. We just saw that ** generally is listed as an area with high radon. If the house has a radon measurement over 4 and the seller puts vents to bring it into […]