appliedepi.bsky.social @appliedepi.bsky.social · 11/06/2026📢 Use R for public health - Enroll now! Synchronous courses with 1-to-1 tutoring by applied epidemiologists 😲. Intro & advanced (GIS, time series, Shiny, Quarto, statistics), in English and Spanish, options for all time zones. appliedepi.org/training/pub... 000
appliedepi.bsky.social @appliedepi.bsky.social · 12/03/2026🗣️ Applied Epi is hiring! Seeking R users in public health to support epidemiologists globally in English and French, Spanish, or Portuguese, as: 🔵 Instructors: Lead online R courses 🟡 Technicians: 1-on-1 online R mentorship Apply by April 5th: 🔗 appliedepi.org/about/join.h... #PublicHealth #Epi 022
Reposted by @appliedepi.bsky.socialappliedepi.bsky.social @appliedepi.bsky.social · 31/10/2025🌍 Join the Board of Applied Epi! We’re seeking new Board Members passionate about global health & Epidemiology. Help guide a nonprofit that trains 1000s worldwide in data-driven public health response. ⏰ ~2 hrs/month | Apply by 31 Dec 2025 🔗 tinyurl.com/4yp5fu93 012
appliedepi.bsky.social @appliedepi.bsky.social · 31/10/2025🌍 Join the Board of Applied Epi! We’re seeking new Board Members passionate about global health & Epidemiology. Help guide a nonprofit that trains 1000s worldwide in data-driven public health response. ⏰ ~2 hrs/month | Apply by 31 Dec 2025 🔗 tinyurl.com/4yp5fu93 012
appliedepi.bsky.social @appliedepi.bsky.social · 14/07/2025We're hiring! Applied Epi is looking for a capable epidemiologist for a full-time 1-year remote contractor position. Take a look at our website for more details on the role and how to apply: appliedepi.org/about/join.h... Application deadline: July 31, 2025.lnkd.injoin – Applied Epi 000
appliedepi.bsky.social @appliedepi.bsky.social · 10/06/2025🚨 Rare opportunity! Our advanced R courses start end of July: 📈 Time series & outbreak detection in R 📊 Intro to Stats in R 🗺️ Intro to GIS in R 🖥️ Shiny in R 📝 Advanced R Markdown Plus: Lots of Intro to R courses running all summer! 🌞 Taught live by experienced epidemiologists. 🌍 🔗 appliedepi.org 041
appliedepi.bsky.social @appliedepi.bsky.social · 13/03/2025“I’ve taken several R trainings - this is the BEST!” 📢 New courses posted! Intro to R for public health 🗓️ 40 hours part-time, synchronous, with unlimited 1-on-1 coaching and options for ALL time zones. ✏️ Register: appliedepi.org/training/pub... 013
appliedepi.bsky.social @appliedepi.bsky.social · 03/02/2025📢 Last week to apply for the Applied Epi scholarships! Transition your team to R with free or discounted courses and services. Why apply? ✔️ Full or partial scholarships ✔️ Focused on strengthening public health capacity 🗓️ Apply by Feb 10, 2025! 🌐 appliedepi.org/training/scholarships-ae 013
appliedepi.bsky.social @appliedepi.bsky.social · 27/01/2025📢 Ready to move your team to R? Applied Epi’s scholarships are OPEN! ✅ Funding available for teams in LMICs ✅ Even teams of 1 can apply with leadership support ✅ Deadline: Feb 10, 2025 Why team applications? Collaboration ensures a smooth transition to R! Apply today: 🌐 appliedepi.orgappliedepi.orgApplied Epi 032
appliedepi.bsky.social @appliedepi.bsky.social · 21/01/2025🚨 Applications are NOW OPEN for Applied Epi’s 2025 scholarships! 🚨 💡 For teams in low- & middle-income countries working in epidemiology, this is your chance to access funding for courses and support services that help transition to R. 🗓️ Deadline: Feb 10, 2025 🌐 Apply here: appliedepi.org 054
appliedepi.bsky.social @appliedepi.bsky.social · 17/01/2025🎉 R scholarship applications open on January 20! If your team (government or nonprofit) works in applied epidemiology in a low- or middle-income country, you could get access to our Intro to R course and Support Desk! Details: appliedepi.org/training/sch... #Rstats #epitwitter 077
appliedepi.bsky.social @appliedepi.bsky.social · 24/12/2024The main takeaways are: 1) Ggplot customization possibilities are pretty endless. 2) Merry Christmas and happy holidays to you all! 🎄🎄🎄 010
appliedepi.bsky.social @appliedepi.bsky.social · 24/12/2024That code shows other cool things too, like how we added in a new font ("Grand Hotel") for the ggplot title. We used the {showtext} package for this: font_add_google() loads the font from Google Fonts, and showtext_auto() ensures R applies the font to the plot. 110
appliedepi.bsky.social @appliedepi.bsky.social · 24/12/2024Repeatedly rerunning the code is quite fun 110
appliedepi.bsky.social @appliedepi.bsky.social · 24/12/2024And how did we get Santa's coordinates? Since he didn't share his location, we created a function (get_random_night_coords()) to randomly generate coordinates of a location with a current local time between 11pm and 3am, assuming those are his working hours! Close enough! 120
appliedepi.bsky.social @appliedepi.bsky.social · 24/12/2024Both of these figures are created with ggplot2, and use a saved PNG file of Santa. geom_image() from {ggimage} places the image at specified coordinates, reading from the file path. Here's the ggplot code for the second figure: 120
appliedepi.bsky.social @appliedepi.bsky.social · 24/12/2024🎄 Merry Christmas Eve, everyone! 🎄 To wrap up this advent calendar, here’s our final tip: Did you know you can use your own images in ggplot? Check out this festive example with a cartoon of Santa —on his (surprisingly inefficient?) route tonight! 🎅✨ #DataViz #RStats 130
appliedepi.bsky.social @appliedepi.bsky.social · 23/12/2024coalesce() is from the {dplyr} package. It returns the first non-missing value from a set of columns, based on the order you specify. It’s not just for dates, but for any use-case where you need to pick one value from across columns! 000
appliedepi.bsky.social @appliedepi.bsky.social · 23/12/2024Today's post is for anyone with bdays this time of the year. We see you! This includes our Exec Director, an expert in "combo Xmas/bday" presents! Happy birthday Neale! 🎂 On that note, ever work with multiple date columns but need to pick one? Use coalesce() to easily prioritize a value! #Rstats 1192
appliedepi.bsky.social @appliedepi.bsky.social · 22/12/2024Can you recommend any other holiday or Christmas-related R packages? We'd love to know! 000
appliedepi.bsky.social @appliedepi.bsky.social · 22/12/2024Here's the code if you like the "minimalist" aesthetic. That said, it does show the versality of ggplot! 110
appliedepi.bsky.social @appliedepi.bsky.social · 22/12/2024P.s. Before finding the {christmas} package I was ready to make this the main event for this post: 100
appliedepi.bsky.social @appliedepi.bsky.social · 22/12/2024🎄Day 22: An R Christmas Tree 🎄 There's still time to write your Christmas cards! And what better captures the yuletide spirit than...R... Seriously though, check out the {christmas} package by Jose Barrera-Gomez.. Stunning! 110
appliedepi.bsky.social @appliedepi.bsky.social · 22/12/2024And finally, if you want the function code pasted above, you can get it from the Applied Epi Community: community.appliedepi.org/t/custom-ggp... Enjoy! #RStats #Datavizcommunity.appliedepi.orgCustom ggplot functions!Hi all! I’m pasting in some example code to create a custom ggplot function. This example creates different epicurves using the Ebola linelist from Applied Epi’s introcourse. It allows you to defin... 030
appliedepi.bsky.social @appliedepi.bsky.social · 22/12/2024You can make the function more complex, but don't overdo it - too many arguments could become hard to understand and edit! It's all about balance and the best solution for your problem🤓 Learn more here: epirhandbook.com/en/new_pages... ggplot2.tidyverse.org/reference/ti...ggplot2.tidyverse.orgTidy eval helpers — tidyevalThis page lists the tidy eval tools reexported in this package from rlang. To learn about using tidy eval in scripts and packages at a high level, see the dplyr programming vignette and the ggplot2 in... 131
appliedepi.bsky.social @appliedepi.bsky.social · 22/12/2024Want to further customize colours? 🎨 The example above uses the same colour palette for each plot, with scale_fill_brewer(). For custom colours, you can also define a palette inside scale_fill_manual() - or as a separate object that you refer to (as discussed yesterday). 210
appliedepi.bsky.social @appliedepi.bsky.social · 22/12/2024 Why the squiggly brackets {{x}}? 🤔 They're for tidy evaluation! {{ }} allows ggplot() to recognize the inputs for "xvalue" and "fillvalue" as column names from your data. Without them, your function won’t know how to evaluate these column names properly! 101
appliedepi.bsky.social @appliedepi.bsky.social · 22/12/2024The code defines a function for an epicurve with geom_histogram(), taking three inputs: 1️⃣dataset object name ("data"), 2️⃣column name for the x axis ("xvalue"), 3️⃣column name for the fill colour ("fillvalue"). So you can easily make epicurves with different breakdowns or date types! 100
appliedepi.bsky.social @appliedepi.bsky.social · 22/12/2024See how short and readable the code for producing three epicurves becomes 🤩. The function approach allows you to control data-related formatting (e.g. in the scale_* functions) AND non-data formatting (in theme()). 110
appliedepi.bsky.social @appliedepi.bsky.social · 22/12/2024🎄Day 21: Ggplot efficiency part 3🎄 Need many plots with the same style/formatting but slightly different inputs? 💡Create a custom ggplot function! Define your plot upfront in the function, with all the long formatting code. Then run the function for each new plot with different inputs. 211011
appliedepi.bsky.social @appliedepi.bsky.social · 21/12/2024This means: 1️⃣ Plots are easier to interpret (e.g. specific values always the same colours) 2️⃣ The actual ggplot code is shorter 3️⃣ You only need to edit the palette(s) in one location. *chef's kiss* Part 3 tomorrow! #Dataviz #Ggplot #Epi 000
appliedepi.bsky.social @appliedepi.bsky.social · 21/12/2024🎄Day 20: Ggplot efficiency: part 2 🎄 Visualizing the same variables in different ways (e.g. sex by time/place)? 💡Tip: Easily standardize colour palettes by defining them once at the start of your code. Then reuse the palettes within scale_fill_manual() or scale_color_manual() across plots. 130
appliedepi.bsky.social @appliedepi.bsky.social · 20/12/2024Don't understand what this post is talking about but want to? You can start here: epirhandbook.com/en/new_pages... Happy plotting! #RStudio #Datavizepirhandbook.com30 ggplot basics – The Epidemiologist R Handbook 010
appliedepi.bsky.social @appliedepi.bsky.social · 20/12/2024Caveat: This may not always be the best solution for your ggplot standardization needs. For example, it only modifies the style of non-data elements, and may be confusing when you need more than one plot style. We'll cover other scenarios in part 2 tomorrow... stay tuned 🤩 110
appliedepi.bsky.social @appliedepi.bsky.social · 20/12/2024If you want to reset, you can define theme_set() as theme_gray(), which is the default ggplot theme. Or, restart your R session. 110
appliedepi.bsky.social @appliedepi.bsky.social · 20/12/2024🎄Day 19: Ggplot efficiency: part 1🎄 Do you need a consistent plot style for a document? Try theme_set()🎨 Define the look of fonts, grid lines, backgrounds, axis text etc once inside theme_set(). This will apply to all subsequent ggplots in your R session. No need for long theme() code per plot! 1100
appliedepi.bsky.social @appliedepi.bsky.social · 18/12/2024See more here! www.rdocumentation.org/packages/pra... #Rstudio 😍rdocumentation.orgpraise function - RDocumentationBuild friendly R packages that praise their users if they have done something good, or they just need it to feel better.<p></p><p>Randomized praise based on a template </p> 000
appliedepi.bsky.social @appliedepi.bsky.social · 18/12/2024🎄Day 18 🎄 Having a rough day? The {praise} package is there for you. Go on, give praise() a whirl.... ♥️ 1204
appliedepi.bsky.social @appliedepi.bsky.social · 17/12/2024Find heaps of other tips and shortcuts here: docs.posit.co/ide/user/ide... Enjoy feeling like an R whiz! 🤓docs.posit.coKeyboard Shortcuts – RStudio User Guide 030
appliedepi.bsky.social @appliedepi.bsky.social · 17/12/2024And finally, here's a neat way to copy code to just above or below the original. Highlight code and then press: 🪟 Shift + Alt + Up/Down (Windows) 🍎 Option + Command + Up/Down (Mac) 120
appliedepi.bsky.social @appliedepi.bsky.social · 17/12/2024Or try moving code up and down your script easily. Do this by highlighting code and then: 🪟 Alt + Up/Down (Windows) 🍎 Option + Up/Down (Mac) 130
appliedepi.bsky.social @appliedepi.bsky.social · 17/12/2024Do this with by pressing: 🪟Ctrl + Alt (Windows) 🍎Ctrl + Option (Mac) Then click or use Up/Down arrows to place cursors and edit simultaneously! 231
appliedepi.bsky.social @appliedepi.bsky.social · 17/12/2024🎄Day 17: RStudio magic🎄 Want to be in multiple places at once over the holidays? We can't help you with that. But - we can show you how to type in multiple places at once in RStudio! 😮 Useful when you need to make the same edit across your code but Find + Replace isn't suitable. 1101
appliedepi.bsky.social @appliedepi.bsky.social · 15/12/2024So there you have it. It might seem arbitrary, but this can be a real issue when cleaning strings in a linelist! Things that look the same might not be the same, but there will be a solution! 💪 000
appliedepi.bsky.social @appliedepi.bsky.social · 15/12/2024To make "ñ" and "ñ" equal in R, you can normalize their Unicode forms using the {stringi} package, with the stri_trans_nfc() function. 100
appliedepi.bsky.social @appliedepi.bsky.social · 15/12/2024R handles characters using Unicode, where each character is represented by a unique identifier in the format U+XXXX (X is a hexadecimal value). Some letters can be encoded in multiple ways. E.g "ñ" can be represented by: 1️⃣A single identifier: U+00F1 or 2️⃣A combination: U+006E ("n") + U+0303 ("~") 100
appliedepi.bsky.social @appliedepi.bsky.social · 15/12/2024🎄Day 15: Quiz answers!🎄 I have possibly learned to not post R quizzes on a Saturday. Regardless! Here is why the two "ñ" characters were not the same: their underlying encoding was actually different! 130
appliedepi.bsky.social @appliedepi.bsky.social · 15/12/2024🎄Day 14: Quiz!🎄 Why do these two seemingly identical characters not equal each other in R? 050
appliedepi.bsky.social @appliedepi.bsky.social · 13/12/2024🎄 Day 13: Sound alerts in R! 🎄 Ever find yourself waiting for code to finish running, only to forget and miss when it’s done? Try {beepr}! 🔔Add beep() to the end of your code, and it will ping when done 🎺Prefer a celebratory trumpet sound? Add beep("fanfare") instead! Enjoy! 042