This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trust <- read.csv("self-reported-trust-attitudes.csv",header=TRUE) | |
library(dplyr) | |
trust <- trust %>% | |
group_by(Entity) %>% | |
filter(Year == max(Year)) | |
vac <- read.csv("owid-covid-data (1).csv",header=TRUE) | |
vac<-vac %>% | |
dplyr::select(people_vaccinated_per_hundred, location, date) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) | |
library(waffle) | |
people <- c(`Vaccinated `=91,`Vaccinated in ICU`=1, `Unvaccinated`=7, | |
`Unvaccinated in ICU `=1) | |
waffle(people, rows=10, size=0.6, | |
colors=c("#44D2AC", "#E48B8B", "#B67093", | |
"#3A9ABD"), | |
title="Irish Adults", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
df <- | |
readr::read_csv("https://projects.oregonlive.com/weather/pdx_temps.csv") | |
#Jun$Temp <- cut(Jun$tmax, breaks=c(50,104, Inf), labels=c("50","100+")) | |
Jun$Temp <- cut(Jun$tmax, breaks=c(50,60,70,80,90,100, Inf), labels=c("50","60","70","80","90","100+")) | |
hot <- c("#6BBCD1","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#b10026","#FF2A24") | |
#hot <- c("#000000","#FF2A24") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#data from https://datagraver.com/case/kyoto-cherry-blossom-full-flower-dates#google_vignette | |
df <- read.csv(file ="kyoto_dates_cherryblossom2021.csv") | |
library(tidyverse) | |
df<-df %>% drop_na() | |
library(lubridate) | |
df<-df %>% select(Year, Month, Day) %>% | |
mutate(date2 = make_date(Year, Month, Day)) | |
df <- df %>% | |
mutate(dated = yday(date2)) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Count | Company | Percentage of global industrial greenhouse gas emissions | |||||
---|---|---|---|---|---|---|---|
1 | China (Coal) | 14.32% | |||||
2 | Saudi Arabian Oil Company (Aramco) | 4.50% | |||||
3 | Gazprom OAO | 3.91% | |||||
4 | National Iranian Oil Co | 2.28% | |||||
5 | ExxonMobil Corp | 1.98% | |||||
6 | Coal India | 1.87% | |||||
7 | Petroleos Mexicanos (Pemex) | 1.87% | |||||
8 | Russia (Coal) | 1.86% | |||||
9 | Royal Dutch Shell PLC | 1.67% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(lubridate) | |
library(scales) | |
#Data | |
#https://ourworldindata.org/coronavirus/country/united-states?country=~USA | |
#war https://en.wikipedia.org/wiki/List_of_battles_with_most_United_States_military_fatalities | |
df<-read.csv("daily-covid-deaths-7-day.csv", header=TRUE) | |
#Look at US |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The Simon–Ehrlich wager was a 1980 scientific wager between business professor Julian L. Simon and biologist Paul Ehrlich, betting on a mutually agreed-upon measure of resource scarcity over the decade leading up to 1990 | |
https://en.wikipedia.org/wiki/Simon%E2%80%93Ehrlich_wager | |
Roughly it was a bet where Simon thought things would get better as people invented and organised. Eldrich thought we would run out of stuff and overpopulation would result in starvation of hundreds of millions. | |
Simon won the bet as these metals were cheaper ten years later. But I wondered how ofter Simon would be rigth if the bet happened at different times. | |
Ten years later metals would be cheaper 55% of the time in this dataset. | |
Data from https://www.usgs.gov/centers/nmic/historical-statistics-mineral-and-material-commodities-united-states |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(lubridate) | |
library(RCurl) | |
library(reshape2) | |
#URL <- "https://www.metoffice.gov.uk/hadobs/hadcet/cetmaxdly1878on_urbadj4.dat" | |
cet2 <- read.table("cetmaxdly1878on_urbadj4.dat.txt", sep = "", header = FALSE, | |
fill = TRUE)#),na.string = c(-99.99, -99.9, -999)) | |
colnames(cet2) <- c("year","day","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
breaks <- read.csv("breaks.csv", stringsAsFactors=FALSE) | |
breaks<-select (breaks,-c(X,X.1,X.2)) | |
breaks<-na.omit(breaks) | |
names(breaks)[names(breaks) == "X."] <- "Centuries" | |
library(ggplot2) | |
# Basic scatter plot | |
g<-ggplot(breaks, aes(x=Year, y=Centuries)) + | |
geom_point(shape=1) + # Use hollow circles | |
geom_smooth(method=lm) + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
historic<-read.csv("historic.csv", skip=10) | |
library(dplyr) | |
# Drop the columns of the dataframe | |
historic<-select (historic,-c(X.1,X.2,X.3,X.4,X.5,X.6,X.7,X.8,X.9,X.10,X.11)) | |
historic <- rename(historic, number = Level..numbers.of.unemployed.people.) #For renaming dataframe column | |
historic <- rename(historic, rate = Rate....) #For renaming dataframe column | |
#start is nas | |
historic2<-slice(historic, 499:n()) |