File:M1Czk.svg
From Wikiversity
Jump to navigation
Jump to search
Size of this PNG preview of this SVG file: 768 × 432 pixels. Other resolutions: 320 × 180 pixels | 640 × 360 pixels | 1,024 × 576 pixels | 1,280 × 720 pixels | 2,560 × 1,440 pixels.
Original file (SVG file, nominally 768 × 432 pixels, file size: 56 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
DescriptionM1Czk.svg |
English: M1 for Czech koruna, plotted using the Python code from Plotting code section. |
Date | |
Source | Own work |
Author | Dan Polansky |
Licensing
I, the copyright holder of this work, hereby publish it under the following license:
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.
http://creativecommons.org/publicdomain/zero/1.0/deed.enCC0Creative Commons Zero, Public Domain Dedicationfalsefalse |
Plotting code
from matplotlib import pyplot as plt
import datetime
plotVolumes = True
plot5YRates = True
# Data source: https://fred.stlouisfed.org/series/MANMM101CZM189S
# Monetary Aggregates and Their Components: Narrow Money and Components: M1 and Components: M1 for Czech Republic
inputData = [
"1992-01-01:299900586309",
"1993-01-01:327992471007",
"1994-01-01:397930617923",
"1995-01-01:460389204558",
"1996-01-01:505141168003",
"1997-01-01:510735204451",
"1998-01-01:462456969714",
"1999-01-01:474918190185",
"2000-01-01:560543555662",
"2001-01-01:627108580315",
"2002-01-01:729226581281",
"2003-01-01:829713932183",
"2004-01-01:955249065459",
"2005-01-01:1035270929067",
"2006-01-01:1189629719818",
"2007-01-01:1354505088788",
"2008-01-01:1554279670013",
"2009-01-01:1663630375906",
"2010-01-01:1764267842161",
"2011-01-01:2021736629542",
"2012-01-01:2159948978182",
"2013-01-01:2343007587057",
"2014-01-01:2513052291257",
"2015-01-01:2777038135916",
"2016-01-01:3120552567448",
"2017-01-01:3509883450694",
"2018-01-01:3788613657730"]
dates = []
volumes = []
calcRates = []
for dataRowStr in inputData:
dataRow = dataRowStr.split(":")
date = datetime.datetime.strptime(dataRow[0], "%Y-%m-%d").date()
volume = float(dataRow[1])
dates.append(date)
volumes.append(volume)
if len(volumes) > 5:
calcRates.append((float(volumes[-1]) / volumes[-1 - 5]) ** (1/5.0))
else:
calcRates.append(float("nan"))
if plotVolumes:
fig, biax = plt.subplots()
figSize = fig.get_size_inches()
fig.set_size_inches(figSize[0] * 4/3, figSize[1])
biax.set(xlabel="Date (Label on 1 January)", ylabel="M1 (Czech Koruna)",
title="Czech Koruna M1 (per stlouisfed.org)")
xtickDates, xtickDatesStr = [], []
for idx, date in enumerate(dates):
if date.month == 1 and date.day == 1:
xtickDates.append(date)
xtickDatesStr.append(str(date.year))
plt.xticks(xtickDates, xtickDatesStr, rotation=70)
plt.plot(dates, volumes, color="#6699CC")
plt.grid(linewidth=0.25, color="#CCCCCC")
plt.tight_layout()
plt.savefig("M1Czk.svg")
if plot5YRates:
# Plot 5Y average annual rate of change
fig, biax = plt.subplots()
figSize = fig.get_size_inches()
fig.set_size_inches(figSize[0] * 4/3, figSize[1])
title="Czech Koruna M1\n5-year average of annual rate of change (base data per stlouisfed.org)"
biax.set(xlabel="Date (label on 1 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, 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("M1Czk5YAvgChangeRate.svg")
This media file is uncategorized.
Please help improve this media file by adding it to one or more categories, so it may be associated with related media files (how?), and so that it can be more easily found.
Please notify the uploader with {{subst:Please link images|File:M1Czk.svg}} ~~~~ |
Items portrayed in this file
depicts
some value
10 April 2024
image/svg+xml
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 15:00, 10 April 2024 | 768 × 432 (56 KB) | Dan Polansky | Uploaded own work with UploadWizard |
File usage
The following page uses this file:
Metadata
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 | 614.4pt |
---|---|
Height | 345.6pt |
Retrieved from "https://en.wikiversity.org/wiki/File:M1Czk.svg"