Skip to content

Commit

Permalink
Some viz for the odissei lecture
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelicaMaineri committed Feb 23, 2024
1 parent 96d85bf commit 187c380
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions Scripts/codelibrary_lecture.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
library(tidyverse)

cbsdf = read.csv("Data/odissei-projects-clean_CBS.csv")
lissdf = read.csv("Data/odissei-projects-clean_LISS.csv")


colnames(cbsdf)
colnames(lissdf)


df = full_join(cbsdf, lissdf)
head(df)


ggplot(df, aes(x=programming.language)) +
geom_bar(fill="dodgerblue") +
theme_classic() +
xlab("Programming language")
ggsave("images/prog_lang.jpeg")


# repo
df = df |>
mutate(registry = str_match(code, "https:\\/\\/\\s*(.*?)\\s*\\.") %>% .[,2])
df$registry

df$registry[df$code=='<a href="https://doi.org/10.17605/OSF.IO/ZMH5N">link</a>'] = "osf"
df$registry[df$code=='<a href="https://doi.org/10.5281/zenodo.7443895">link</a>'] = "zenodo"
df$registry[df$code=='<a href="https://doi.org/10.1016/j.lanepe.2023.100749">link</a>'] = "other"
df$registry[df$code=='<a href="https://doi.org/10.7910/DVN/P39QGO">link</a>'] = "dataverse"
df$registry[df$code=='<a href="https://doi.org/10.7910/DVN/VMMMCL">link</a>'] = "dataverse"
df$registry[df$code=='<a href="https://doi.org/10.7910/DVN/5XYHJD">link</a>'] = "dataverse"

ggplot(df, aes(x=registry)) +
geom_bar(fill="lightblue") +
theme_classic() +
xlab("Registry")
ggsave("images/registry.jpeg")
Binary file added images/prog_lang.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/registry.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 187c380

Please sign in to comment.