File:NzGDPdata 720by540.svg

From Vero - Wikipedia
Jump to navigation Jump to search

Original file (SVG file, nominally 768 × 576 pixels, file size: 93 KB)

This file is from Wikimedia Commons and may be used by other projects. The description on its file description page there is shown below.

Summary

Description
English: New Zealand gross domestic product and net international debt from 2000
Date
Source Own work
Author Mrfebruary
SVG development
InfoField
 The SVG code is valid.
 This coat of arms was created with R.
 This SVG coat of arms uses the path text method.
Source code
InfoField

R code

# manually download "Series GDP(E) Nominal Actual Total Annual-Mar" from https://infoshare.stats.govt.nz/SearchPage.aspx and save it to the working directory
# read in data
sneam <- read.csv("SNE439802_20250620_045827_11.csv", skip = 2)
# delete non-data rows from row 55 down
sneam <- sneam[1:54,]
# assign names
names(sneam) <- c("Year","GDP")
# change  format to numeric
sneam[["GDP"]] <- as.numeric(sneam[["GDP"]])
# change GDP from millions to billions
sneam[["GDP"]] <- sneam[["GDP"]]/10^3
# create new dataframe
# create  dataframe of date and GDP value
sneamdf <- data.frame(Date=seq(as.Date("1972/03/31"), by = "year", length.out = 54), GDP= sneam[["GDP"]]) 

# create svg format chart 
svg(filename="StatsSNE-GDPE-1972-2025-gdp-720by540.svg", width = 8, height = 6, pointsize = 14, onefile = FALSE, family = "sans", bg = "white", antialias = c("default", "none", "gray", "subpixel"))
plot(sneamdf,ylim=c(0,430),xlim=c(820,19813),tck=0.01,axes=T,ann=T, las=1,col="red",lwd=1,type='l',lty=1,xlab ="",ylab="")
grid(col="darkgray",lwd=1)
lines(sneamdf,col="red")
points(sneamdf,pch=19,cex=0.75,col="red")
axis(side=4, tck=0.01, las=0,tick=TRUE,labels = FALSE)
mtext(side=1,cex=0.8,line=-1.1,"Data: Stats NZ Series GDP(E) Nominal Actual Total Annual-Mar https://infoshare.stats.govt.nz")
mtext(side=3,cex=1.3, line=-2.2,expression(paste("New Zealand Gross Domestic Product 1972 to 2025"))  )
mtext(side=2,cex=1, line=-1.3,"Nominal billion $NZD")
mtext(side=4,cex=0.75, line=0.05,R.version.string)
dev.off()

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This 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.

Captions

New Zealand gross domestic product and net international debt

Items portrayed in this file

depicts

15 January 2024

image/svg+xml

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current05:20, 21 June 2025Thumbnail for version as of 05:20, 21 June 2025768 × 576 (93 KB)wikimediacommons>Mrfebruaryupdate

The following page uses this file: