Eric Leung

@erictleung
164 Followers
234 Following
176 Posts

data scientist, wikipedia + library evangelist, open-source tinkerer #RStats #Python #DataViz

former work in biomedical informatics and the human microbiome, now doing marketing measurement and experimentation for a media company

other interests: #Education, #Baduk + #Weiqi, #Wikipedia, #Emacs, #Math, #FountainPens

here as an experiment for more ways to connect, reflect, and share my learnings.

Websitehttps://erictleung.com
Wikipediahttps://en.wikipedia.org/wiki/User:Erictleung
GitHubhttps://github.com/erictleung
LocationNew York, NY
i made a gif of how the cherry blossoms at the brooklyn botanic garden are doing. the past couple of days have been exciting!
fun to see that wikipedia has some fun holiday versions of their logo https://commons.wikimedia.org/wiki/Wikipedia
Wikipedia - Wikimedia Commons

even being out of academia for a bit, I find myself going back to some articles I had on my to-read list.

one of them was this one on shifting from a hypothesis-driven way of science to focusing on the question.

"A Critique of the Hypothesis, and a Defense of the Question, as a Framework for Experimentation" (2010)

#Science #Hypothesis #Questions #Academia

https://doi.org/10.1373/clinchem.2010.144477

#TIL a handy #RStats and ggplot2 function that would've come in handy years ago is this scales::cut_short_scale() function.

```
+ scale_y_continuous(labels = label_number(scale_cut = cut_short_scale()))
```

Using it in labels, you can automatically abbreviate large numbers with K, M, or even B. I did this manually with a fixed scaling factor of like 1000 or something. So dealing with millions always messed up my plots.

Image source: https://scales.r-lib.org/reference/label_number.html

Label numbers in decimal format (e.g. 0.12, 1,234) — label_number

Use label_number() force decimal display of numbers (i.e. don't use scientific notation). label_comma() is a special case that inserts a comma every three digits.