File:Gdp to debt ratio.svg
Original file (SVG file, nominally 1,800 × 1,440 pixels, file size: 377 KB)
Captions
Summary
editDescriptionGdp to debt ratio.svg |
English: Debt-to-GDP ratio for some european countries, data are taken from eurostat data explorer (31 may 2015, Table: gov_10dd_edpt1). It was created after File:Staatsschuldenquote.pdf. Data are updated, countries are reordered such that countries with similar ratio development are located nearby, and colors are changed to reflect sizes better as well as to improve for color blind people. |
Date | |
Source | Own work |
Author | Sigbert |
SVG development InfoField | |
Source code InfoField | R codetrim <- function (x) gsub("^\\s+|\\s+$", "", x)
reorder <- function(d, wts) stats::reorder(d, wts, agglo.FUN = mean)
dist <- function(q) {
nc <- nrow(q)
qm<- as.matrix(q)
d <- matrix(NA, ncol=nc, nrow=nc)
for (i in 1:nc) d[i,] <- apply(abs(sweep(qm, 2, qm[i,])), 1, median, na.rm=T)
rownames(d) <- colnames(d) <- rownames(q)
print(d)
as.dist(d)
}
library("foreign")
library("RColorBrewer")
library("gplots")
library("countrycode")
x <- read.spss("gov_10dd_edpt1.sav", to.data.frame=T)
x$value[x$value==": "] <- NA
quote <- data.frame(COUNTRY=trim(x$GEO), YEAR=as.numeric(as.character(x$TIME)), RATIO=as.numeric(as.character(x$value)))
quote <- reshape(quote, idvar="COUNTRY", timevar="YEAR", direction = "wide")
# 170110: select only entries with two letter country code
ccountry <- as.character(quote$COUNTRY)
scountry <- (nchar(ccountry)==2)
# 170110: replace Greece and United Kingdom
nq <- countrycode(ccountry[scountry], "iso2c", "country.name")
nq[which(ccountry[scountry]=="EL")] <- "Greece"
nq[which(ccountry[scountry]=="UK")] <- "United Kingdom"
quote <- quote[scountry,-1]
rownames(quote) <- nq
colnames(quote) <- as.character(1994+seq(ncol(quote)))
colfun <- rev(brewer.pal(11, "Spectral"))
note <- apply(as.matrix(quote), c(1,2), function(elem) { if (is.na(elem)) return(""); sprintf("%.0f%%", elem) })
svg("gdp_to_debt_ratio.svg", width=20, height=16)
par(cex.main=2)
heatmap.2(as.matrix(quote), scale="none", col=colfun, margins=c(7,14),
Colv=NA, distfun=dist, reorderfun=reorder,
tracecol=NA,
main="Debt-to-GDP ratio for some\neuropean countries", cexRow=2, cexCol=2,
cellnote=note, notecol="black", notecex=1.6,
key.title="Color key", key.ylab="", key.xlab="", key.par=list(mar=c(3,1,2,0)),
keysize=0.5)
dev.off()
|
Licensing
editThis file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication. | |
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
http://creativecommons.org/publicdomain/zero/1.0/deed.enCC0Creative Commons Zero, Public Domain Dedicationfalsefalse |
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 13:37, 26 March 2019 | 1,800 × 1,440 (377 KB) | WissensDürster (talk | contribs) | Updated 2 more years of data from Eurostat, cf. "Government deficit/surplus, debt and associated data (gov_10dd_edpt1)" in https://ec.europa.eu/eurostat/data/database Adjusted size of the heatmap, removed color key, removed dendrogram, removed main title, since color key is self-explanatory and titles can be added in wiki thumbs. | |
17:04, 10 January 2017 | 1,800 × 1,440 (650 KB) | Sigbert (talk | contribs) | New data from Eurostat are used. Note that same number slightly changed to the previous picture; Eurostat continuously updates current and past data. | ||
13:14, 31 May 2015 | 1,800 × 1,440 (366 KB) | Sigbert (talk | contribs) | User created page with UploadWizard |
You cannot overwrite this file.
File usage on Commons
The following page uses this file:
File usage on other wikis
The following other wikis use this file:
- Usage on en.wikipedia.org
- Usage on es.wikipedia.org
- Usage on fa.wikipedia.org
- Usage on he.wikipedia.org
- Usage on vi.wikipedia.org
- Usage on zh.wikipedia.org
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
Width | 1440pt |
---|---|
Height | 1152pt |