forked from caviddhen/mymadrat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.Rhistory
107 lines (107 loc) · 2.79 KB
/
.Rhistory
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
library(mymadrat)
a <- readSource(type="WDI")
library(mymadrat)
a <- readSource(type="WDI")
library(mymadrat)
library(madrat)
a <- readSource(type="WDI")
downloadSource(type="WDI")
downloadSource(type="WDI_t")
getCalculations("download")
library(mymadrat)
getCalculations("download")
downloadSource(type="WDI_t")
library(wbstats)
downloadSource(type="WDI_t")
downloadSource(type="WDI_t", overwrite=TRUE)
library(mymadrat)
downloadSource(type="WDI_t", overwrite=TRUE)
tmp <- readSource("WDI")
load("C:/PIK/inputdata/sources/WDI/WDI.rda")
View(wdi)
head(wdi)
library(mymadrat)
downloadSource(type="WDI_t", overwrite=TRUE)
tmp <- readSource("WDI")
library(mymadrat)
tmp <- readSource("WDI")
library(mymadrat)
library(mymadrat)
t <- readSource("WDI")
library(mymadrat)
t <- readSource("WDI")
head(wdi)
wdi <- wdi[1:3]
wdi <- as.magpie(wdi, spatial=1, temporal=2, tidy=TRUE)
library(mymadrat)
a <- downloadSource("WDI_t")
getCalculations("download")
a <- downloadSource("WDI", overwrite=T)
library(WDI)
a <- downloadSource("WDI", overwrite=T)
WDI_data <- WDI::WDI_data
WDI_data$series
WDI_data$series[,"indicator"]
library(mymadrat)
wdi
load("C:/PIK/inputdata/sources/WDI_t/WDI.rda")
library(mymadrat)
a <- downloadSource(type="WDI", overwrite=T)
a <- downloadSource(type="WDI_t", overwrite=T)
library(mymadrat)
a <- downloadSource(type="WDI_t", overwrite=T)
library(mymadrat)
rm(list=ls())
library(madrat)
library(mymadrat)
a <- readSource(type="WDI",subtype="SP.POP.TOTL")
a <- readSource(type="WDI_t",subtype="SP.POP.TOTL")
?melt
?select
library(tidyr)
?select
library(dplyr)
?select
load("C:/PIK/inputdata/sources/WDI_t/WDI.rda")
head(wdi)
select(wdi, "iso2c", "year")
?countrycode
library(countrycode)
?countrycode
head(wdi)
wdi$country <- NULL
?as.magpie
wdi <- as.magpie(wdi, spatial=1,temporal=2,tidy=TRUE,replacement =".")
fulldim(wdi)
load("C:/PIK/inputdata/sources/WDI_t/WDI.rda")
head(wdi)
wdi$country <- NULL
gather(wdi, "iso2c", "year")
head(wdi)
gather(wdi,key=c("iso2c", "year"))
(gather(wdi,key=c(iso2c, year))
)
melt(wdi,id.vars = c("iso2c","year"))
library(reshape2)
melt(wdi,id.vars = c("iso2c","year"))
library(mymadrat)
tst <- readSource("WDI_t", subtype="NY.GDP.MKTP.PP.CD")
fulldim(tst)
tmp <- readSource("WDI_t", subtype="SP.POP.TOTL", convert=F)
fulldim(tmp)
getRegions(tmp)
10e6
1e6 - 1000000
getRegions(tmp)<-countrycode(getRegions(tmp),"iso2c","iso3c")
getRegions(tmp)
fulldim(tmp)
?clean_magpie
knit("madrat_exercise.Rmd")
library(knitr)
knit("madrat_exercise.Rmd")
markdownToHTML('My_Analysis.md', 'My_Analysis.html', options=c("use_xhml"))
library(markdown)
markdownToHTML('My_Analysis.md', 'My_Analysis.html', options=c("use_xhml"))
markdownToHTML('madrat_exercise.md', 'madrat_exercise.Rmd', options=c("use_xhml"))
system("pandoc -s madrat_exercise.html -o madrat_exercise.pdf")
prices <- readSource("FAO", "PricesProducerAnnual")