Presenting the Pipe

It’s a baffling thing at first. And then, once you get the hang of it, you can’t seem to imagine doing anything in another way. The %>% in R is just darn nifty. So what’s the deal with the pipe? In the process of working with your data, you are going to have a series of steps you perform to get to the final product. For example, you might start out with a .

March 15, 2022

Weather data with R

Last week I read a paper: “Weathering cash flow shocks” by Brown et al. (2021) which cleverly used unexpected severe winter weather as a setting to examine shocks to firm cash flow and the effect these cash flow shocks have on utilizing and increasing credit lines. The authors scrape decades worth of publicly available weather station data from across the United States to identify abnormal snow cover in counties where firm headquarters are located.

March 7, 2022

Statistics Sweden with R - Fun with Statistikmyndigheten

I recently discovered the R package pxweb which facilitates access to public statistical data in Sweden. As with many officially-run sites providing public data, navigating menus and manually downloading files can be cumbersome, much better to gain access with an API where you can download data directly and start using it. However, just mentioning the word “API” may scare away a few folks, so coming across packages like pxweb is always a refreshing discovery.

March 6, 2022