File:EuroCircVolumeChangeRate.svg

From Wikiversity
Jump to navigation Jump to search

Original file(SVG file, nominally 864 × 432 pixels, file size: 62 KB)

This is a file from the Wikimedia Commons. The description on its description page there is shown below.

Commons is a freely licensed media file repository. You can help.

Summary

Description
English: Plotted using the following Python code:
from matplotlib import pyplot as plt
import datetime
# data from https://www.statista.com/statistics/442970/currency-in-circulation-euro-area/
statistaData=[
  "Jan 2022:1477903",
  "Jan 2021:1373282",
  "Jan 2020:1224145",
  "Jan 2019:1162364",
  "Jan 2018:1108037",
  "Jan 2017:1075639",
  "Jan 2016:1037669",
  "Jan 2015:979089",
  "Jan 2014:908272",
  "Jan 2013:856975",
  "Jan 2012:842958",
  "Jan 2011:796249",
  "Jan 2010:757084",
  "Jan 2009:712199",
  "Jan 2008:623127",
  "Jan 2007:575640",
  "Jan 2006:520777",
  "Jan 2005:459893",
  "Jan 2004:389117",
  "Jan 2003:312120",
  "Jan 2002:246680",
  "Jan 2001:336070",
  "Jan 2000:333840",
  "Jan 1999:314331",
  "Jan 1998:311449"]
statistaData.reverse()
dates = []
volumes = []
alternativeVolumes = []
calcRatesRaw = []
calcRates = []
initVolume = 311449
alternativeVolume = initVolume
rate = 1.065
for dataRowStr in statistaData:
  dataRow = dataRowStr.split(":")
  date = datetime.datetime.strptime("1 " + dataRow[0], "%d %b %Y").date()
  volume = int(dataRow[1])
  dates.append(date)
  volumes.append(volume)
  alternativeVolumes.append(alternativeVolume)
  alternativeVolume *= rate
  if len(volumes) > 1:
    calcRatesRaw.append(float(volumes[-1]) / volumes[-1 - 1])
  else:
    calcRatesRaw.append(float("nan"))
  if len(volumes) > 5:
    calcRates.append((float(volumes[-1]) / volumes[-1 - 5]) ** (1/5.0))
  else:
    calcRates.append(float("nan"))
fig, biax = plt.subplots()
figSize = fig.get_size_inches()#_
fig.set_size_inches(figSize[0] * 3/2, figSize[1])#:
biax.set(xlabel="Date", ylabel="Volume (million euros)", title="Euro volume (per Statista.com)\n"
         "2nd value: 6.5% annual growth curve")
plt.plot(dates, volumes, color="#6699CC")
plt.plot(dates, alternativeVolumes, color="#CC9933")
plt.ylim(0, 1600000)
plt.grid(linewidth=0.25, color="#DDDDDD")
plt.savefig("EuroVolume.svg")

# Plot annual rate of change
fig, biax = plt.subplots()
figSize = fig.get_size_inches()
fig.set_size_inches(figSize[0] * 3/2, figSize[1])
title="Euro circulation volume\nAnnual rate of change (base data per Statista.com)"
biax.set(xlabel="Date (January)", ylabel="Rate of change", title=title)
xtickDates = []
xtickDatesStr = []
for idx, date in enumerate(dates):
  xtickDates.append(date)
  xtickDatesStr.append(str(date.year))
plt.xticks(xtickDates, xtickDatesStr, rotation=70)
plt.axhline(1, color='#BBBBBB', linewidth=0.75)
plt.plot(dates, calcRatesRaw, color="#6699CC")
plt.grid(linewidth=0.25, color="#DDDDDD")
plt.yticks([1 + x * 0.05 for x in range(-6, 6)])
values = biax.get_yticks()
biax.set_yticklabels(['{:,.0%}'.format(x - 1) for x in values])
plt.tight_layout()
plt.savefig("EuroCircVolumeChangeRate.svg")

# Plot 5Y average annual rate of change
fig, biax = plt.subplots()
figSize = fig.get_size_inches()
fig.set_size_inches(figSize[0] * 3/2, figSize[1])
title="Euro circulation volume\n5-year average of annual rate of change (base data per Statista.com)"
biax.set(xlabel="Date (Jan)", ylabel="Rate of change", title=title)
xtickDates = []
xtickDatesStr = []
for idx, date in enumerate(dates):
  xtickDates.append(date)
  xtickDatesStr.append(str(date.year))
plt.xticks(xtickDates, xtickDatesStr, rotation=70)
plt.axhline(1, color='#BBBBBB', linewidth=0.75)
plt.plot(dates, calcRates, color="#6699CC")
plt.grid(linewidth=0.25, color="#DDDDDD")
values = biax.get_yticks()
biax.set_yticklabels(['{:,.1%}'.format(x - 1) for x in values])
plt.tight_layout()
plt.savefig("EuroCircVolume5YAvgChangeRate.svg")
Date
Source Own work
Author Dan Polansky

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution
This file is licensed under the Creative Commons Attribution 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.

Captions

Euro circulation volume change rate

Items portrayed in this file

depicts

26 March 2024

File history

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

Date/TimeThumbnailDimensionsUserComment
current12:23, 26 March 2024Thumbnail for version as of 12:23, 26 March 2024864 × 432 (62 KB)Dan PolanskyUpdate
11:20, 26 March 2024Thumbnail for version as of 11:20, 26 March 2024864 × 432 (62 KB)Dan PolanskyUploaded own work with UploadWizard

The following page uses this file:

Metadata