Bad Stock Photos of My Job? Data Science on Pexels

I couldn’t miss the fun Twitter hashtag #BadStockPhotosOfMyJob thanks to a tweet by Julia Silge and another one by Colin Fay. The latter inspired me to actually go and look for what makes a data science photo… What characterizes “data science” stock photos? Where to find information related to stock photos? In two previous blog posts of mine I used Pexels, a website providing CC0 pictures which is quite nice. My goal was to obtain the titles and the tags of stock photos of “data science”: for instance if you look at this picture, its tags are “business”, “contemporary”, “computer”, etc. Pexels tags are very useful metadata, saving me the effort to use machine learning methods to analyse images. Responsible webscraping When researching this post I discovered that Pexels has an API, documented here but this API does not get…
Original Post: Bad Stock Photos of My Job? Data Science on Pexels

Galentine’s day cards

Remember the nascent series of blog posts about Parks and recreation? Well, we’re still at one post, but don’t worry, here is a new one, and I’m sure the series will eventually be a real one. I’m looking at you, my R-Ladies friends. That said, today is not a day for passive agressive hints, because I’ve decided it’s Galentine’s day and I’ll show you how to craft cards for your R-Ladies friends from your R prompt! Galentine’s day is a celebration Leslie Knope throws every year for her female friends, showering them with love and gifts. Since she’s very talented, she can even write them poems, but in the R version of Galentine’s day, we’ll make do with simple cards featuring Lesliesque compliments. Indeed, Leslie Knope is also known for her creative complimenting of her best friend Ann. I’ve decided…
Original Post: Galentine’s day cards

Rainbowing a set of pictures

I’ve now down a few collages from R using magick: the faces of #rstats Twitter, We R-Ladies with Lucy D’Agostino McGowan, and a holiday card for R-Ladies. The faces of #rstats Twitter and holiday card collages were arranged at random, while the We R-Ladies one was a mosaic forming the R-Ladies logo. I got the idea to up my collage skills by trying to learn how to arrange pics by their main colour, like a rainbow. The verb rainbow doesn’t exist, and “rainbowing” doesn’t mean ordering by colour, but I didn’t let this stop me. It was the occasion to grab some useful knowledge about colours, not useless for someone who did not even know about Pantone’s Colors of the Year a few weeks ago… This post has nothing to do with Kesha’s new album. However, you can listen to…
Original Post: Rainbowing a set of pictures

Cheer up, Black Metal Cats! Bubblegum Puppies

Do you know the Black Metal Cats Twitter account? As explained in this great introduction, it “combines kitties with heavy metal lyrics”. I know the account because I follow Scott Chamberlain who retweets them a lot, which I enjoy as far as one can enjoy such a dark mood. Speaking of which, I decided to try and transform Black Metal Cat tweets into something more positive… The Bubblegum Puppies were born! It won’t come as a surprise for the loyal readers of this blog that I just had to use rtweet. I kept only original standalone tweets and removed the picture link from the tweet. black_tweets <- rtweet::get_timeline(“evilbmcats”) black_tweets <- dplyr::filter(black_tweets, is.na(reply_to_user_id), !is_retweet, !is_quote) black_tweets <- dplyr::select(black_tweets, text, created_at, status_id) black_tweets <- dplyr::mutate(black_tweets, text = stringr::str_replace(text, “https.*”, “”)) readr::write_csv(black_tweets, path = “data/2018-01-03-bubblegumpuppies_cats.csv”) Now that the dark material is ready, let’s…
Original Post: Cheer up, Black Metal Cats! Bubblegum Puppies

Are #python users more likely to get into Slytherin?

This post requires some familiarity with the Harry Potter books but I’m committed to making this blog friendly to everyone, even Muggles/Nomajes. Have you seen Mark Sellors’ blog post series about writing command line utilities in R? It’s a great one but I was a bit puzzled by his using randomness to assign houses in his sorting hat example (he added a new method based on name digest-ing in the meantime). This is a really cool #rstats tutorial… but since when does the sorting hat assign a random Hogwarts house?! 🧙♀️🎩🎲➡️🏠🤔 https://t.co/Ff8CHR6jb9 — Maëlle Salmon 🐟 (@ma_salmon) 19 de desembre de 2017 This prompted a reply by David Hood who later came up with R code to assign you to a Hogwarts house based on your Twitter activity! It should be possible to assign House on the basis of Twitter…
Original Post: Are #python users more likely to get into Slytherin?

My #Best9of2017 tweets

You’ve probably seen people posting their #Best9of2017, primarily on Instagram I’d say. I’m not an Instagram user, although I do have an account to spy on my younger sister and cousins, so I don’t even have 9 Instagram posts in total but I do love the collage people get to show off… So what about my best 9 tweets of 2017? I first wanted to use rtweet::get_timeline but it only returned me tweets from July, even when using include_rts = FALSE, so I downloaded my analytics files from the Twitter website, one per trimester. my_files <- c(“tweet_activity_metrics_ma_salmon_20170101_20170402_en.csv”, “tweet_activity_metrics_ma_salmon_20170402_20170702_en.csv”, “tweet_activity_metrics_ma_salmon_20170702_20171001_en.csv”, “tweet_activity_metrics_ma_salmon_20171001_20171231_en.csv”) paths <- paste0(“data/”, my_files) # read them all at once my_tweets <- purrr::map_df(paths, readr::read_csv) # just in case I got some data ranges wrong my_tweets <- unique(my_tweets) # get the top 9! my_tweets <- dplyr::arrange(my_tweets, – likes) my_tweets <- janitor::clean_names(my_tweets)…
Original Post: My #Best9of2017 tweets

Where have you been? Getting my Github activity

On my pretty and up-to-date CV, one of the first things one sees is my Github username, linking to my Github profile. What does a potential employer look at there? Hopefully not my non informative commit messages… My imitating a red Ampelmann, my being part of several organizations, my pinned repositories described with emojis… But how would they know where&how I’ve mostly been active without too much effort? A considerable part of my Github work happens in organizations: I’m a co-editor at rOpenSci onboarding of packages, I contribute content to the R Weekly newsletter, etc. Although my profile shows the organizations I belong to, one would need to dig into them for a while before seeing how much or how little I’ve done. Which is fine most of the time but less so when trying to profile myself for jobs,…
Original Post: Where have you been? Getting my Github activity

Possum magic: mapping an Australian children’s book

Our brand-new baby received a fantastic picture book as a gift: Possum magic, a classic for Aussie kids. Thanks, Miles! In that book, Hush the possum and her Grandma Poss encounter different Australian animals and travel across well eat their way through the country. It is an adorable story with great illustrations! Reading it will make you feel like travelling to Australia, for instance to useR! 2018, except you shouldn’t because it is a very scary country: Rough night with 👶. ☕ was a good start but it was the balcony 🐍 capture and release that really 💓 — Miles McBain (@MilesMcBain) 25 d’agost de 2017 However, you can travel and learn geography without leaving the comfort of a snake-free home… by mapping Hush’s adventures! Which is what I decided to do. We shall prepare data for the maps in…
Original Post: Possum magic: mapping an Australian children’s book

How to develop good R packages (for open science)

I was invited to an exciting ecology & R hackathon in my capacity as a co-editor for rOpenSci onboarding system of packages. It also worked well geographically since this hackathon was to take place in Ghent (Belgium) which is not too far away from my new city, Nancy (France). The idea was to have me talk about my “top tips on how to design and develop high-quality, user-friendly R software” in the context of open science, and then be a facilitator at the hackathon. The talk topic sounded a bit daunting but as soon as I started preparing the talk I got all excited gathering resources – and as you may imagine since I was asked to talk about my tips I did not need to try & be 100% exhaustive. I was not starting from scratch obviously: we at…
Original Post: How to develop good R packages (for open science)

Names of b…..s badder than Taylor Swift, a class in women’s studies?

[1] “Rachel Carson, Marie Curie, Ruth Bader Ginsberg, Madeleine Albright, Diane Fossey, Helen Keller, Gloria Steinem, Madonna, Aretha Franklin, Margot Lee Shetterly, Malala Yousafzai, and a whole lot more., Rosa Parks. Harriet Tubman. Anne Frank. Malala Yousafazi, Susan B. Anthony, Sally Ride, Marie Curie. Margaret Thatcher, Indira Ghandi, Golda Meier., …it’s not bitch. It’s woman.nnMarie CuriennRosa ParksnnEleanor RooseveltnnHedy LamarnnSapphonnAbagail AdamsnnFlorence NightingalennSally RidennMargaret Chase SmithnnAnne FranknnMargaret Thatcher nnSandra Day O’ConnornnOprahnnLilithnnMarilyn MonroennDita Von Teese, Ruby Bridges, Barbara Jordan, Marie Curie, Rosa Parks, Ida B Wells, Susan B Anthony, Harriet Tubman, …, Lorde. Etc., I mean, off hand, Marie Curie was denied access to University because she was a woman, educated herself, served as a surgeon in WW1 and became the only person ever to earn two Nobel prizes, Emmeline Pankhurst, Amelia Earhart, Florence Nightingale, Rosa Parks, Joan of Arc, Marie Curie,…

Original Post: Names of b…..s badder than Taylor Swift, a class in women’s studies?