-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathResources.qmd
More file actions
357 lines (195 loc) · 13.1 KB
/
Resources.qmd
File metadata and controls
357 lines (195 loc) · 13.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
---
title: "Resources"
title-block-banner: true
title-block-banner-color: lightsteelblue1
author: "Pablo-Leon"
date: "`r Sys.Date()`"
format:
html:
toc: true
html-math-method: katex
code-fold: true
editor: source
---
```{r markdown custom style, include=FALSE}
knitr::opts_chunk$set(echo = TRUE, warning = FALSE, message = FALSE,
dpi = 180, fig.width = 8, fig.height = 5)
library(tidyverse)
```
## Index
- R and R Eco-system resources
- R tips
- Python tips
- NHS R and Python communities of practice
- R and Python online books
## R
R is an open-source programming language that is widely used among statisticians and data scientists in the NHS. R has a large number of built-in functions and packages for statistical analysis and data visualisation. Along with tools such as Python1, R can be used to develop so-called reproducible analytical pipelines (RAP).
- The R Project for Statistical Computing <https://www.r-project.org/>
## POSIT
Posit is the Company who developed RStudio IDE among other products, previously called RStudio. All your data products have a home on Posit Connect, Deploy R & Python content easily and securely, automate code execution and deliver insights to stakeholders that need them
- Posit website: <https://posit.co/>
### POSIT learning resources
Learning materials from POSIT about R, Python and Quarto
- Blogs: <https://posit.co/blog/>
- Cheat sheets: <https://posit.co/resources/cheatsheets/>
- Videos: <https://posit.co/resources/videos/>
## QUARTO
An Open-source scientific and technical publishing system, available for R, Python and Julia.
- Quarto website: <https://quarto.org>
Get started with Quarto
- Install Quarto: <https://quarto.org/docs/get-started/>
Authoring Quarto documents
Quarto tutorial – Authoring: <https://quarto.org/docs/get-started/authoring/rstudio.html>
- Include formatted title blocks at the start of the article: <https://quarto.org/docs/authoring/title-blocks.html>
- Quarto themes:
Lumen: <https://bootswatch.com/lumen/>
Journal: <https://bootswatch.com/journal/>
Cosmo: <https://bootswatch.com/cosmo/>
Sandstone: <https://bootswatch.com/sandstone/>
Spacelab: <https://bootswatch.com/spacelab/>
Slate:<https://bootswatch.com/slate/>
- Update Quarto documents header date date automatically: <https://bookdown.org/yihui/rmarkdown-cookbook/update-date.html>
### Creating websites using Quarto
- A couple of resources on how to build a Quarto website:
- Creating it: Creating a Quarto website - YouTube: <https://www.youtube.com/watch?v=_bglTCjgcqY>
- Publishing it to GitHub: Publishing a Quarto website through GitHub pages - YouTube: <https://www.youtube.com/watch?v=uimdXPZc40I>
- Changing a Quarto website’s output directory: <https://www.youtube.com/watch?v=ZkcY9YQ3iLY>
## RStudio
RStudio IDE to run R, developed by RStudio now POSIT
- RStudio IDE: <https://posit.co/products/open-source/rstudio/>
## Python
Python main website
- Python: <https://www.python.org/>
Python coding topics and data structures
- Dictionaries: <https://python.land/things-you-didnt-know-about-python-dictionaries>
## NHS R and Python communities of practise
## NHS-R Community
Together we aim to promote the use of R in the NHS: <https://nhsrcommunity.com/>
Wider NHS-R community pages and resources, includes links to a number of recorded sessions and training, all based on NHS datasets
### NHS-R Events
1. Conferences
- Upcoming conferences: <https://nhsrcommunity.com/events/#event_type-conferences>
- Show Past Events: <https://nhsrcommunity.com/past-events/>
- **NHS-R Community Conference 2022**: <https://nhsrcommunity.com/events/nhs-r-community-conference-2022/>
2. Group Discussions
- Group Discussions: <https://nhsrcommunity.com/events/#event_type-group-discussion>
3. Group Discussions/workshops
- Webinars: <https://nhsrcommunity.com/events/#event_type-group-discussionworkshops>
4. Webinars
- Webinars: <https://nhsrcommunity.com/events/#event_type-webinars>
4. Workshops
- Workshops: <https://nhsrcommunity.com/events/#event_type-workshops>
4.1 Upcoming workshops
- NHS-R Workshop: Introduction to R and RStudio – 11th May 2023: <https://nhsrcommunity.com/events/nhs-r-workshop-introduction-to-r-and-r-studio-11th-may-2023/>
- NHS-R Workshop: Forecasting Using R – Advanced Methods – May 2023: <https://nhsrcommunity.com/events/nhs-r-workshop-forecasting-using-r-advanced-methods-may-2023/>
## NHSE-R
Welcome to the NHS England R community documentation site
The NHS England R Community is not intended to replace any other R user groups - there’s a fantastic national NHS-R Community and lots of local sharing of R work, we want to use this site to signpost to other resources for those specifically using R within NHS England.
- NHSE-R: <https://nhsengland.github.io/nhs-r-reporting>
- NHS England R Community Future NHS: <https://future.nhs.uk/NHSERcommunity>
- Reproducible Analytical Pipelines (RAP): <https://nhsengland.github.io/nhs-r-reporting/tutorials/rap.html>
## NHSD- RAP Community of Practice
RAP Community of practice: <https://nhsdigital.github.io/rap-community-of-practice/>
- Basic Python data analysis operations: <https://nhsdigital.github.io/rap-community-of-practice/training_resources/python/basic-python-data-analysis-operations/>
## NHS-Python
Python community to promote the use of Python in the NHS.They organize forums, tutorials and coding sessions:
- The Python Community for Healthcare: <https://nhs-pycom.net/>
## Code editors
- Pycharm: <https://www.jetbrains.com/pycharm/download/#section=windows>
- RStudio: <https://posit.co/download/rstudio-desktop/>
- VStudio code: <https://code.visualstudio.com/>
- How To Run Selected Lines In VS Code (Visual Studio Code) – YouTube: <https://www.youtube.com/watch?v=VXJChVF28jw>
## Python tips
- Python Beginners Guide: <https://wiki.python.org/moin/BeginnersGuide/Programmers>
- The Python Tutorial: <https://docs.python.org/3/tutorial/index.html>
- The 30 Best Python Libraries and Packages for Beginners: <https://www.ubuntupit.com/best-python-libraries-and-packages-for-beginners/>
- What is os.listdir() in python?: <https://www.educative.io/answers/what-is-oslistdir-in-python>
- Get unique values from a column in Pandas DataFrame – GeeksforGeeks: <https://www.geeksforgeeks.org/get-unique-values-from-a-column-in-pandas-dataframe/>
- Python String format(): <https://www.programiz.com/python-programming/methods/string/format>
- Python - Determine the type of an object? - Stack Overflow: <https://stackoverflow.com/questions/2225038/determine-the-type-of-an-object>
- Get / check the type of an object in Python: type(), isinstance(): <https://note.nkmk.me/en/python-type-isinstance/>
- Create pandas dataframe from lists using zip – GeeksforGeeks: <https://www.geeksforgeeks.org/create-pandas-dataframe-from-lists-using-zip/?ref=rp>
- Unit Testing for Data Scientists. Using Pytest to improve the stability: <https://towardsdatascience.com/unit-testing-for-data-scientists-dc5e0cd397fb>
- The Python Tutorial: <https://docs.python.org/3/tutorial/index.html#tutorial-index>
## R tips
- R Colors: <https://www.r-bloggers.com/2012/10/palettes-in-r/>
- R colors resource: <https://r-charts.com/colors/>
- R colors chart: <https://rstudio-pubs-static.s3.amazonaws.com/3486_79191ad32cf74955b4502b8530aad627.html>
- R chart annotations: <https://ggplot2-book.org/annotations.html>
- R Camcoder package: <https://github.com/thebioengineer/camcorder>
- Camcoder package in CRAN: <https://cran.r-project.org/web/packages/camcorder/index.html>
- Create design process animations: <https://cran.r-project.org/web/packages/camcorder/vignettes/camcorder_record.html>
- HTML widgets – useful for Shiny and Markdown reports: <https://www.htmlwidgets.org/>
- Crosstalk to join some widgets together: <https://rstudio.github.io/crosstalk/using.html>
- R Graph Gallery: <https://r-graph-gallery.com/>
- Interactive maps in R using Leaflet: <https://rstudio.github.io/leaflet/>
- Interactive maps in R using Leaflet: <https://rstudio.github.io/leaflet/colors.html>
- Basic intro to main axis and legend titles: <http://www.sthda.com/english/wiki/ggplot2-title-main-axis-and-legend-titles>
- Setting up the R environment: <https://ohdsi.github.io/Hades/rSetup.html>
- How to do fuzzy matching in R: <https://stylizeddata.com/how-to-do-fuzzy-matching-in-r/>
- How to Recode Factor and Character Variables in R: <https://stylizeddata.com/how-to-recode-factor-and-character-variables-in-r/>
- Designing aesthetic and publication ready tables in R: <https://github.com/kcuilla/fourth_down_go_rates>
- How to Recode Factor and Character Variables in R: <https://stylizeddata.com/how-to-recode-factor-and-character-variables-in-r/>
- Driving a web browser with RSelenium: <https://www.computerworld.com/article/2971265/how-to-drive-a-web-browser-with-r-and-rselenium.html>
## R Tidyverse universe
This section contains set of packages that follow Tidyverse data science principles.
### tidyverse
The tidyverse is an opinionated collection of R packages designed for data science. All packages share an underlying design philosophy, grammar, and data structures.
The goal of tidyr is to help you create tidy data. Tidy data is data where:
1. Every column is variable.
2. Every row is an observation.
3. Every cell is a single value.
- Tidyverse main website: <https://www.tidyverse.org/>
Core Tidyverse packages:
- ggplot2: <https://ggplot2.tidyverse.org/>
- dplyr: <https://dplyr.tidyverse.org/>
- tidyr: <https://tidyr.tidyverse.org/>
- readr: <https://readr.tidyverse.org/>
- purrr: <https://purrr.tidyverse.org/>
- tibble: <https://tibble.tidyverse.org/>
- stringr: <https://stringr.tidyverse.org/>
- forcats: <https://forcats.tidyverse.org/>
### Related Tidyverse packages
#### dbplyr
dbplyr is the database backend for dplyr. It allows you to use remote database tables as if they are in-memory data frames by automatically converting dplyr code into SQL.
- DBPLYR <https://dbplyr.tidyverse.org/>
Using function 'show_query()' after a set of DPLYR verbs, allows you to generate the SQL that is sent tot he database when you request the data.
#### tidyselect
Tools like starts_with() or contains() are called selection helpers. These tools inspect the variable names currently available for selection with peek_vars(). The variable names are registered automatically by eval_select() for the duration of the evaluation:
These selection helpers match variables according to a given pattern
starts_with() : Starts with an exact prefix.
ends_with() : Ends with an exact suffix.
contains() : Contains a literal string.
matches() : Matches a regular expression.
num_range() : Matches a numerical range like x01, x02, x03.
Tidyselect website: <https://www.tidyverse.org/blog/2022/10/tidyselect-1-2-0/>
## Maps in R using ggplot2 and OSM
- An introduction to plotting maps in R using ggplot2 An introduction to plotting maps in R using ggplot2 can be found on this online book:
<https://ggplot2-book.org/maps.html>
- OpenStreetMap (OSM)
Package details: <https://cran.r-project.org/web/packages/osmdata/vignettes/osmdata.html>
- OpenStreepMap. OSM is a global open access mapping project, which is free and open under the ODbL licence (OpenStreetMap contributors 2017:
<https://www.openstreetmap.org/#map=6/54.910/-3.432>
## Online R and Python books
- An introduction to R - Alex Douglas, Deon Roos, Francesca Mancini, Ana Couto & David Lusseau: <https://intro2r.com/>
- Welcome to R for Data Science - Hadley Wickham, Garrett Grolemund: <https://r4ds.had.co.nz/>
- Think Python -How to Think Like a Computer Scientist - Alllen B. Downey: <https://greenteapress.com/thinkpython2/html/index.html>
- Ggplot2 Elegant Graphics for Data Analysis - Hadley Wickham, Danielle Navarro, and Thomas Lin Pedersen: <https://ggplot2-book.org/index.html>
- Ggplot2 Elegant Graphics for Data Analysis - Specific chapter about plotting maps in R: <https://ggplot2-book.org/maps.html>
- Geocomputation with R: <https://bookdown.org/robinlovelace/geocompr/spatial-class.html>
- Chapter 16. Geospatial- The Big book of r: <https://www.bigbookofr.com/geospatial.html>
## Statistics
### Probability distributions
Probability distributions in R: <https://poissonisfish.com/2016/12/04/probability-distributions-in-r/>
Bayesian models in R:
<https://www.r-bloggers.com/2019/05/bayesian-models-in-r-2/>
## Tables in R
Set of R packages to build beautiful Data Tables in R
- gt (Easily Create Presentation-Ready Display Tables): <https://gt.rstudio.com/>
- formattable (produce data structures with formatting rules): <https://renkun-ken.github.io/formattable/>
- kableExtra (Extend kable tables functionality): <https://cran.r-project.org/web/packages/kableExtra/vignettes/awesome_table_in_html.html>
- db (Interesting DT Package introduction from Yihui Xie website: <https://rstudio.github.io/DT/>
- flextable (Framework for creating tables for reporting and publications): <https://ardata-fr.github.io/flextable-book/>
- reactablefmtr (formatting tables using the reactable R library.): <https://kcuilla.github.io/reactablefmtr/index.html>
### POSIT Community Table Gallery
POSIT Community Table Gallery: <https://community.rstudio.com/c/table-gallery/64>