Original file (SVG file, nominally 720 × 540 pixels, file size: 117 KB)
![]() | This is a file from the Wikimedia Commons. Information from its description page there is shown below. Commons is a freely licensed media file repository. You can help. |
DescriptionDebt to GDP ratio New Zealand Government timeseriesnotitle 720by540.svg |
English: A time series of gross debt to GDP for the core New Zealand Government 1860 to 2000
|
Date | |
Source | http://archive.stats.govt.nz/~/media/Statistics/browse-categories/economic-indicators/national-accounts/Long-term%20data%20series/D%20Government/table-d4-1.xls |
Author | Mrfebruary |
SVG development InfoField | |
Source code InfoField | R code# obtain data sheet from Statistics NZ
urlrawdata <- c("http://archive.stats.govt.nz/~/media/Statistics/browse-categories/economic-indicators/national-accounts/Long-term%20data%20series/D%20Government/table-d4-1.xls")
filerawdata <-c("table-d4-1.xls")
download.file(urlrawdata, filerawdata)
# load Readxl library
library(readxl)
# List all sheets in an excel spreadsheet
excel_sheets("table-d4-1.xls")
[1] "Data" "Documentation"
# read in debt as % of GDP from column "BW"
debt2gdp <-read_excel("table-d4-1.xls", sheet = "Data", range ="BW31:BW172", col_names = F, skip =30,col_types = c("numeric"))
# convert to time series object
debt2gdptimeseries <-ts(data = debt2gdp, start = 1860, end =2000)
# create svg format chart with 14 pt text font and grid lines via 'grid'
svg(filename="debt2gdptimeseriesnotitle_720by540.svg", width = 8, height = 6, pointsize = 14, onefile = FALSE, family = "sans", bg = "white", antialias = c("default", "none", "gray", "subpixel"))
par(mar=c(2.7,2.7,1,1)+0.1)
plot(debt2gdptimeseries,tck=0.01,ylim=c(0,250),xlim=c(1863,1998),axes=TRUE,ann=TRUE, las=1,col=2,lwd=2,type='l',lty=1)
grid(col="darkgray",lwd=1)
axis(side=4, tck=0.01, las=0,tick=TRUE,labels = FALSE)
mtext(side=1,cex=0.8,line=-1.3,"Data: Statistics NZ, Long-term data series, D4.1 Central government debt, table-d4-1.xls")
mtext(side=3,cex=1.7, line=-3.6,expression(paste("New Zealand Gross Core Government \nDebt 1860 to 2000")) )
mtext(side=2,cex=0.9, line=-1.3,"% of Real GDP (2000)")
mtext(side=4,cex=0.75, line=0.05,R.version.string)
dev.off()
|
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 04:25, 7 March 2019 | ![]() | 720 × 540 (117 KB) | Mrfebruary | add title , thicker line weight |
03:48, 24 February 2019 | ![]() | 720 × 540 (90 KB) | Mrfebruary | User created page with UploadWizard |
This file contains additional information, probably added from the digital camera or scanner used to create or digitize it.
If the file has been modified from its original state, some details may not fully reflect the modified file.
Width | 576pt |
---|---|
Height | 432pt |