Skip to content

Commit

Permalink
Improved structure
Browse files Browse the repository at this point in the history
-added directory for data
-updated the overview of protocols
  • Loading branch information
JoachimGoedhart committed Oct 25, 2022
1 parent c9bad18 commit f5a24e1
Show file tree
Hide file tree
Showing 37 changed files with 138 additions and 40 deletions.
Binary file modified .DS_Store
Binary file not shown.
29 changes: 28 additions & 1 deletion .Rproj.user/shared/notebooks/paths
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
/Users/joachimgoedhart/.bash_profile="37AFE5E3"
/Users/joachimgoedhart/.tcshrc="EC8A189E"
/Users/joachimgoedhart/.zshrc="9DA4BB78"
/Users/joachimgoedhart/Desktop/TimeLine-test.html="085816EB"
/Users/joachimgoedhart/Desktop/test-time.html="0E754777"
/Users/joachimgoedhart/Desktop/tidytuesday_minimal_example.Rmd="DD039EE3"
/Users/joachimgoedhart/Downloads/Upload/app.R="A891C7D0"
/Users/joachimgoedhart/Downloads/hello(1).qmd="E7056D1F"
/Users/joachimgoedhart/Downloads/hello.qmd="F62B7B40"
/Users/joachimgoedhart/surfdrive/Bookdown-project/DataViz-protocols/.Rhistory="22E3F88A"
/Users/joachimgoedhart/surfdrive/Bookdown-project/DataViz-protocols/.gitignore="476F9C7E"
/Users/joachimgoedhart/surfdrive/Bookdown-project/DataViz-protocols/01-getting-started.Rmd="7443EEB0"
/Users/joachimgoedhart/surfdrive/Bookdown-project/DataViz-protocols/02-read-and-reshape.Rmd="1CE9F3F6"
/Users/joachimgoedhart/surfdrive/Bookdown-project/DataViz-protocols/03-plotting-the-data.Rmd="9E302B83"
/Users/joachimgoedhart/surfdrive/Bookdown-project/DataViz-protocols/04-complete-protocols.Rmd="D288C438"
/Users/joachimgoedhart/surfdrive/Bookdown-project/DataViz-protocols/05-Q_and_A.Rmd="0C7CFD35"
/Users/joachimgoedhart/surfdrive/Bookdown-project/DataViz-protocols/Protocols/FlipBook_Protocol_3.Rmd="DE5C7C25"
/Users/joachimgoedhart/surfdrive/Bookdown-project/DataViz-protocols/Protocols/Overview_of_protocol_output.R="B92A818C"
/Users/joachimgoedhart/surfdrive/Bookdown-project/DataViz-protocols/Protocols/Readme.md="2DFCDD01"
/Users/joachimgoedhart/surfdrive/Bookdown-project/DataViz-protocols/Protocols/protocol_1.R="375423E2"
/Users/joachimgoedhart/surfdrive/Bookdown-project/DataViz-protocols/Protocols/protocol_1.Rmd="9105BCD9"
/Users/joachimgoedhart/surfdrive/Bookdown-project/DataViz-protocols/Protocols/protocol_10.Rmd="FD13E331"
/Users/joachimgoedhart/surfdrive/Bookdown-project/DataViz-protocols/Protocols/protocol_11.Rmd="17584B13"
/Users/joachimgoedhart/surfdrive/Bookdown-project/DataViz-protocols/Protocols/protocol_12.Rmd="233C5A29"
/Users/joachimgoedhart/surfdrive/Bookdown-project/DataViz-protocols/Protocols/protocol_2.Rmd="FFD80FED"
/Users/joachimgoedhart/surfdrive/Bookdown-project/DataViz-protocols/Protocols/protocol_3.Rmd="C0BDFDF7"
/Users/joachimgoedhart/surfdrive/Bookdown-project/DataViz-protocols/Protocols/protocol_4.R="A51D40F5"
/Users/joachimgoedhart/surfdrive/Bookdown-project/DataViz-protocols/Protocols/protocol_4.Rmd="D1EB2369"
/Users/joachimgoedhart/surfdrive/Bookdown-project/DataViz-protocols/Protocols/protocol_5.Rmd="BA9DE4A2"
/Users/joachimgoedhart/surfdrive/Bookdown-project/DataViz-protocols/Protocols/protocol_6.Rmd="18F95A81"
Expand All @@ -35,11 +41,32 @@
/Users/joachimgoedhart/surfdrive/Bookdown-project/DataViz-protocols/preamble.tex="78F1FC63"
/Users/joachimgoedhart/surfdrive/Bookdown-project/DataViz-protocols/style.css="92FED882"
/Users/joachimgoedhart/surfdrive/Bookdown-project/Protocols-in-progress/Conversions.txt="A9DCF86C"
/Users/joachimgoedhart/surfdrive/Bookdown-project/Protocols-in-progress/EC-FPs.csv="8662EB97"
/Users/joachimgoedhart/surfdrive/Bookdown-project/Protocols-in-progress/EC_FPs_Cranfill.csv="FDAB563B"
/Users/joachimgoedhart/surfdrive/Bookdown-project/Protocols-in-progress/Fitting-exp.Rmd="0DC1B273"
/Users/joachimgoedhart/surfdrive/Bookdown-project/Protocols-in-progress/Pi-chart.Rmd="912EA351"
/Users/joachimgoedhart/surfdrive/Bookdown-project/Protocols-in-progress/Protocol_17_Animated_plots-ECIS.Rmd="A2B4589D"
/Users/joachimgoedhart/surfdrive/Bookdown-project/Protocols-in-progress/Protocol_18_Animated_plots-with_GIF.Rmd="E566FB86"
/Users/joachimgoedhart/surfdrive/Bookdown-project/Protocols-in-progress/Protocol_19_Plot_Ratiometric-data.R="5B481DDF"
/Users/joachimgoedhart/surfdrive/Bookdown-project/Protocols-in-progress/bar_dot_swarm.Rmd="46CF760C"
/Users/joachimgoedhart/surfdrive/Bookdown-project/Protocols-in-progress/protocol_12.Rmd="2DA33543"
/Users/joachimgoedhart/surfdrive/Bookdown-project/Protocols-in-progress/protocol-20_Fitting-exp.Rmd="026D29EF"
/Users/joachimgoedhart/surfdrive/Bookdown-project/Protocols-in-progress/protocol_13.Rmd="EB8281B5"
/Users/joachimgoedhart/surfdrive/Bookdown-project/Protocols-in-progress/protocol_14.Rmd="466AF742"
/Users/joachimgoedhart/surfdrive/Bookdown-project/Protocols-in-progress/protocol_15.Rmd="C2BE434F"
/Users/joachimgoedhart/surfdrive/Bookdown-project/Protocols-in-progress/protocol_16.Rmd="8541AA09"
/Users/joachimgoedhart/surfdrive/Bookdown-project/Protocols-in-progress/protocol_19_Plot_ratio.Rmd="8913928B"
/Users/joachimgoedhart/surfdrive/Bookdown-project/Protocols-in-progress/protocol_20.Rmd="F7B79CEA"
/Users/joachimgoedhart/surfdrive/Eike Mahlandt/Opto-Plots/Animated_plots-ECIS-zoom.Rmd="048042FC"
/Users/joachimgoedhart/surfdrive/Eike Mahlandt/Opto-Plots/Animated_plots-area_animatedboxes.Rmd="C1A27801"
/Users/joachimgoedhart/surfdrive/Eike Mahlandt/Opto-Plots/Animated_plots-area_staticboxes.Rmd="5A836299"
/Users/joachimgoedhart/surfdrive/Eike Mahlandt/Opto-Plots/Animated_plots.Rmd="F5CFB84C"
/Users/joachimgoedhart/surfdrive/Flipbooks/Flipbook_protocol_1.Rmd="D3BAAD09"
/Users/joachimgoedhart/surfdrive/Flipbooks/Flipbook_protocol_3.Rmd="8B38D5B3"
/Users/joachimgoedhart/surfdrive/Python/Notebooks_Image_analysis/README.md="09185D1D"
/Users/joachimgoedhart/surfdrive/Shiny-project/DataTool/app.R="2E808BC9"
/Users/joachimgoedhart/surfdrive/Shiny-project/Glucose_Insulin_model/app.R="DEB4C945"
/Users/joachimgoedhart/surfdrive/Shiny-project/NutriKinetics/app.R="C94C898F"
/Users/joachimgoedhart/surfdrive/Shiny-project/PlotsOfPhasors/app.R="28DAFF65"
/Users/joachimgoedhart/surfdrive/Shiny-project/VolcaNoseR/app.R="42A09032"
/Users/joachimgoedhart/surfdrive/blogs/FocalPlane/60 Yrs of GFP/Timeline-GFP.R="0C18D165"
/Users/joachimgoedhart/surfdrive/blogs/FocalPlane/60 Yrs of GFP/Timeline-GFP_inverted.R="867EF7F8"
2 changes: 1 addition & 1 deletion 04-complete-protocols.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ knitr::opts_chunk$set(comment = NA, warning=FALSE)

# Complete protocols {#complete-protocols}

This chapter showcases several *complete* protocols for different kinds of data visualizations. Each protocol starts with the raw data and ends with a publication quality plot. The data is available from Github, just follow [this link](https://github.com/JoachimGoedhart/DataViz-protocols/tree/main/Protocols). In the same folder you can find the R markdown files for each protocol. To reproduce the data visualizations you can either take the data and follow the instructions in the chapter. Alternatively you can download the R markdown file (and the data) and run it step by step. The R markdown files can also be used as a starting point to apply the same visualization to your own data.
This chapter showcases several *complete* protocols for different kinds of data visualizations. Each protocol starts with the raw data and ends with a publication quality plot. The data is available from Github in the '/data' folder on [this page](https://github.com/JoachimGoedhart/DataViz-protocols/tree/main/Protocols). The github page holds a separate Rmarkdown file for each protocol. To reproduce the data visualizations you can either take the data and follow the instructions in the chapter. Alternatively you can download the Rmarkdown file (and the data) and run it step by step. The Rmarkdown files can also be used as a starting point to apply the same visualization to your own data.

An overview of the data visualizations that are generated by the protocols:

Expand Down
24 changes: 24 additions & 0 deletions Plotting all shapes.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
library(tidyverse)

x <- rep(0:15, 8)
y <- rep(0:7, each=16)
shape <- 1:128

df_shapes <- data.frame(x=x, y=y, shape=shape)

ggplot(df_shapes, aes(x,y))+geom_label(aes(label=shape))


df_label <- df_shapes %>% filter(!shape %in% c(26:32))

ggplot(data=(df_shapes), aes(x,y)) +
geom_point(shape = as.factor(shape), size=4, fill="blue") +
scale_shape_manual(values = c(1:128)) +
geom_label(data=df_label, aes(x=x,y=y,label=shape), nudge_y = -0.4, size=2, label.size = .2) +
theme_minimal() +
theme(legend.position = "none",
axis.title = element_blank(),
axis.text = element_blank()) +
theme(panel.grid = element_blank()) +
scale_y_reverse() +
NULL
21 changes: 21 additions & 0 deletions Plotting_all_point_shapes.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
library(tidyverse)

x <- rep(0:15, 8)
y <- rep(0:7, each=16)
shape <- 0:127

df_shapes <- data.frame(x=x, y=y, shape=shape) %>%
filter(!shape %in% c(26:31)) #Shapes 26-31 are not defined, so we'll remove those

ggplot(data=df_shapes, aes(x,y)) +
geom_point(aes(shape = as.factor(shape)), size=4, fill="blue") +
scale_shape_manual(values = df_shapes$shape) +
geom_label(aes(label=shape), nudge_y = -0.4, size=2, label.size = .2) +
theme_minimal() +
theme(legend.position = "none",
axis.title = element_blank(),
axis.text = element_blank(),
panel.grid = element_blank()) +
scale_y_reverse() +
NULL

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion Protocols/protocol_1.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The data was downloaded in CSV format (by clicking on the button in the lower ri
We read the data from the CSV by using the `read_csv()` function. This function is part of the tidy verse and loads the data as a tibble. It also guesses type of data for each column. To hide that information, we use `show_col_types = FALSE` here.

```{r }
df_raw <- read_csv("FPbase_Spectra_4FPs.csv", show_col_types = FALSE)
df_raw <- read_csv("data/FPbase_Spectra_4FPs.csv", show_col_types = FALSE)
```

Let's briefly look at what we have loaded:
Expand Down
2 changes: 1 addition & 1 deletion Protocols/protocol_10.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ After clicking on 'Publish' a link is generated that can be read as a csv, and a
```{r}
# df_sheet <- read.csv("https://docs.google.com/spreadsheets/d/e/2PACX-1vSc-nI1-s_u-XkNXEn_u2l6wkBafxJMHQ_Cd3kStrnToh7kawqjQU3y2l_1riLigKRkIqlNOqPrgkdW/pub?output=csv", na.strings = "")
df_sheet <- read.csv("20220421_Resultaat-metingen.csv", na.strings = "")
df_sheet <- read.csv("data/20220421_Resultaat-metingen.csv", na.strings = "")
head(df_sheet)
```
Expand Down
2 changes: 1 addition & 1 deletion Protocols/protocol_11.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ After clicking on 'Publish' a link is generated that can be read as a csv. Any e
```{r}
# df_sheet <- read.csv("https://docs.google.com/spreadsheets/d/e/2PACX-1vSc-nI1-s_u-XkNXEn_u2l6wkBafxJMHQ_Cd3kStrnToh7kawqjQU3y2l_1riLigKRkIqlNOqPrgkdW/pub?output=csv", na.strings = "")
df_sheet <- read.csv("20220421_Resultaat-metingen.csv", na.strings = "")
df_sheet <- read.csv("data/20220421_Resultaat-metingen.csv", na.strings = "")
head(df_sheet)
```

Expand Down
2 changes: 1 addition & 1 deletion Protocols/protocol_2.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Confidence_level <- 0.95
The data is stored in an excel sheet and we read it, skipping the first 6 lines which contain comments:

```{r }
df_raw <- readxl::read_excel('figure5.xlsx', skip=6)
df_raw <- readxl::read_excel('data/figure5.xlsx', skip=6)
```

Let's look at the data:
Expand Down
2 changes: 1 addition & 1 deletion Protocols/protocol_3.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ library(tidyverse)
The data comes from an excel file:

```{r }
df_raw <- readxl::read_excel("Data_Arts_Circularity.xlsx")
df_raw <- readxl::read_excel("data/Data_Arts_Circularity.xlsx")
head(df_raw)
```

Expand Down
4 changes: 2 additions & 2 deletions Protocols/protocol_4.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ library(tidyverse)
The measured data is read from an excel sheet. Note that this is the raw data that is stored by the software that operates the plate reader:

```{r }
df_raw <- readxl::read_excel("DualLuc_example_data.xlsx", sheet = "Results")
df_raw <- readxl::read_excel("data/DualLuc_example_data.xlsx", sheet = "Results")
```

The experimental conditions for each well are stored in a separate CSV file, generated by the experimentalist that did the experiment:

```{r }
df_design <- read.csv("Tidy_design.csv")
df_design <- read.csv("data/Tidy_design.csv")
head(df_design)
```
You can see that the design file is tidy. In contrast the excel file with data is far from tidy. In the excel sheet, two 'rectangles' of cells define the data for the firefly & renilla reads.
Expand Down
2 changes: 1 addition & 1 deletion Protocols/protocol_6.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ A CSV file with the data is loaded. Since the file is a couple of Megabytes, we

```{r }
library(data.table)
df_S1P <- data.table::fread("ERK_repsonse_to_S1P.csv")
df_S1P <- data.table::fread("data/ERK_repsonse_to_S1P.csv")
head(df_S1P)
```

Expand Down
2 changes: 1 addition & 1 deletion Protocols/protocol_7.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ output: html_document

```{r }
require(tidyverse)
df1 <- read.csv("Rac_S1P.csv")
df1 <- read.csv("data/Rac_S1P.csv")
head(df1)
```

Expand Down
3 changes: 1 addition & 2 deletions Protocols/protocol_8.Rmd
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

---
author: "Joachim Goedhart"
date: "`r Sys.Date()`"
Expand All @@ -18,7 +17,7 @@ library(tidyverse)
A good example of data wrangling related to 96-wells data is given in [protocol 4](#protocol-4). Here we start from the tidy data that was the result of data tiyding in the section [Data in 96-wells format](#Data-in-96-wells-format):

```{r }
df_8 <- read.csv("df_tidy_wells.csv")
df_8 <- read.csv("data/df_tidy_wells.csv")
head(df_8)
```

Expand Down
6 changes: 3 additions & 3 deletions Protocols/protocol_9.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ library(tidyverse)
Read the data:

```{r }
df_DRC <- read.csv("DRC_Histamine.csv", stringsAsFactors = TRUE)
df_DRC <- read.csv("data/DRC_Histamine.csv", stringsAsFactors = TRUE)
head(df_DRC)
```

Expand Down Expand Up @@ -117,13 +117,13 @@ To plot the fitted data, we use `augment()` function that is part of the `{broom
```{r }
library(broom)
p + geom_line(data = augment(fit), aes(x=Concentration,y=.fitted), color="black", size=1)
p + geom_line(data = augment(fit), aes(x=Concentration, y=.fitted), color="black", size=1)
```

Instead of `geom_lin()` for plotting the fit, we can also use `geom_smooth()`:

```{r}
p <- p + geom_smooth(data = augment(fit), aes(x=Concentration,y=.fitted), color="black", size=1)
p <- p + geom_smooth(data = augment(fit), aes(x=Concentration, y=.fitted), color="black", size=1)
p
```

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<meta name="author" content="Joachim Goedhart" />


<meta name="date" content="2022-09-22" />
<meta name="date" content="2022-10-25" />

<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="apple-mobile-web-app-capable" content="yes" />
Expand Down
Binary file modified docs/DataViz-protocols_files/figure-html/unnamed-chunk-83-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/Protocols/overview_of_protocols.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit f5a24e1

Please sign in to comment.