R

Global Mortality Rates

Global Mortality Rates The following dataset is from the Tidy Tuesday https://github.com/rfordatascience/tidytuesday/tree/master/data/2018/2018-04-16. library(tidyverse) library(hrbrthemes) # custom dark theme from hrbrpackage global_mort <- read_csv(file = "data/global_mortality.csv", col_names = TRUE) # import dataset into object global_mortcountry<as.factor(globalmortcountry) # Change character to factors global_mortcountrycode<as.factor(globalmortcountry_code) global_mortyear<as.factor(globalmortyear) Graphical Display of mortality rates in Australia from 1990 to 2016 df <- global_mort %>% group_by(country, year) %>% pivot_longer(cols = c(4:35)) dfname<factor(dfname) df %>% filter("Australia" %in% country) %>% #filter("Alcohol disorders (%)" == name) %>% #top_n(-15) %>% ggplot(aes(x = year, y = value, group = name)) + geom_line(aes(color = name), size = 1) + labs(x = "Year", y = "Percentage (%)", title = "Australian Mortality Rates", subtitle = "1990 to 2016") + theme_ft_rc() + theme(axis.

Oceanographic Wave Measuring

This is a simple graphical display of a dataset with wave data from Queensland Australia. library(tidyverse) library(lubridate) library(hrbrthemes) This dataset contains Measured/Calculated wave parameters. Measured and derived wave data from data collected by oceanographic wave measuring buoys anchored at Mooloolaba. Coverage period: 30 months. Acknowledgements This data comes from Queensland Government Data - https://data.qld.gov.au/dataset Date/TimeDate Hs Significant wave height, an average of the highest third of the waves in a record Hmax The maximum wave height in the record Tz The zero upcrossing wave period Tp The peak energy wave period Peak Direction Direction (related to true north) from which the peak period waves are coming from SST Approximation of sea surface temperature waves_df <- read_csv("data/Coastal Data System - Waves (Mooloolaba) 01-2017 to 06 - 2019.

Emotional Impact on Memory Part 2

This is the second part of the expriment on Pattern Separation. This processes the participants hits and misses into the induced negative or neutral group and displays some results. Import Raw CSV files with all IAPS database and images to be used in each task imported into an object. raw_df <- read_csv("data/ret_task.csv" , col_types = cols(CR = col_factor(levels = c("same", "different")) , Emotion = col_factor(levels = c("negative", "neutral")) , Sex = col_factor(levels = c("male", "female")))) raw_dfCorrectAnswer<recode(rawdfCorrectAnswer, a = "l", l = "a") raw_df$Stimulus1.

PCA on US Nutrition

A quick walk through of running a PCA on US nutrition and the use of a couple of different packages in R, to display information graphically. library(tidyverse) library(corrplot) library(cowplot) library(hrbrthemes) Information The following dataset froms from the Nutrient database in the United States This is from the now outdated SR27. It is also created from the full database. The “abbreviated file” in SR28 is more up to date than this data and contains more nutrients than we provide here.

Emotional Impact of Memory Part One

Processing an image database for use in a experiment to induce an emotional state in particpants. Research Protocol library(tidyverse) library(stringr) library(knitr) library(plotly) library(gridExtra) library(inspectdf) library(DT) The following was the code used to prepare images from the IAPS database for a experiment on pattern separation. The participants were seated in front of a PC and went through three tasks: Encoding, retreival and validation.

Global Suicides 1995 to 2015

R Markdown Import dataset suicide_raw <- read_csv("data/master.csv") suicide_df <- suicide_raw %>% select(country , year , "No_of_Suicides" =`suicides_no` , "ave_suicide_100k" = `suicides/100k pop` , sex , age , population , "HDI" = `HDI for year` , "GDP_per_year" = `gdp_for_year (),"GDPpercapita"=gdppercapita()` , generation) # converts to factors suicide_dfsex<factor(suicidedfsex, levels = c("male", "female")) suicide_dfyear<factor(suicidedfyear) suicide_dfgeneration<factor(suicidedfgeneration) suicide_dfcountry<factor(suicidedfcountry) suicide_dfgeneration<factor(suicidedfgeneration, ordered = T, levels = c("G.

OSL Workshop Solomons Paradox

Does reasoning about personal problems improve with psychological distance? STUDY DESCRIPTION Solomon’s paradox describes the tendency for people to reason more wisely about other people’s problems compared to their own. One potential explanation for this paradox is that people tend to view other people’s problems from a more psychologically distant perspective, whereas they view their own problems from a psychologically immersed perspective . For example, imagine two friends, Beth and Zoe, are discussing Zoe’s relationship problems.

Hello R Markdown

R Markdown This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com. You can embed an R code chunk like this: summary(cars) ## speed dist ## Min. : 4.0 Min. : 2.00 ## 1st Qu.:12.0 1st Qu.: 26.00 ## Median :15.0 Median : 36.00 ## Mean :15.4 Mean : 42.98 ## 3rd Qu.