File:JapaneseResidentialRePrice.svg

From Wikiversity
Jump to navigation Jump to search

Original file(SVG file, nominally 768 × 432 pixels, file size: 80 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: Residential real estate prices for Japan, 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:
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.

Plotting code

from matplotlib import pyplot as plt
import datetime
plotPrices = True
# Data source: https://fred.stlouisfed.org/series/QJPN628BIS
# Residential Property Prices for Japan, Index 2010=100, Quarterly, Not Seasonally Adjusted
inputData = [
  "1955-01-01:2.2115",
  "1955-04-01:2.2785",
  "1955-07-01:2.3462",
  "1955-10-01:2.4327",
  "1956-01-01:2.5192",
  "1956-04-01:2.6635",
  "1956-07-01:2.8077",
  "1956-10-01:2.9952",
  "1957-01-01:3.1827",
  "1957-04-01:3.3500",
  "1957-07-01:3.5192",
  "1957-10-01:3.7163",
  "1958-01-01:3.9135",
  "1958-04-01:4.1477",
  "1958-07-01:4.3846",
  "1958-10-01:4.6154",
  "1959-01-01:4.8462",
  "1959-04-01:5.1330",
  "1959-07-01:5.4231",
  "1959-10-01:5.6923",
  "1960-01-01:5.9615",
  "1960-04-01:6.4087",
  "1960-07-01:6.8558",
  "1960-10-01:7.5337",
  "1961-01-01:8.2115",
  "1961-04-01:8.8570",
  "1961-07-01:9.5096",
  "1961-10-01:9.9471",
  "1962-01-01:10.3846",
  "1962-04-01:10.8149",
  "1962-07-01:11.2500",
  "1962-10-01:11.6346",
  "1963-01-01:12.0192",
  "1963-04-01:12.4017",
  "1963-07-01:12.7885",
  "1963-10-01:13.2212",
  "1964-01-01:13.6539",
  "1964-04-01:14.1346",
  "1964-07-01:14.6154",
  "1964-10-01:15.1442",
  "1965-01-01:15.6731",
  "1965-04-01:15.8643",
  "1965-07-01:16.0577",
  "1965-10-01:16.3462",
  "1966-01-01:16.6346",
  "1966-04-01:16.9693",
  "1966-07-01:17.3077",
  "1966-10-01:17.7885",
  "1967-01-01:18.2692",
  "1967-04-01:18.9864",
  "1967-07-01:19.7115",
  "1967-10-01:20.5289",
  "1968-01-01:21.3462",
  "1968-04-01:22.2596",
  "1968-07-01:23.1731",
  "1968-10-01:24.3269",
  "1969-01-01:25.4808",
  "1969-04-01:26.9151",
  "1969-07-01:28.3654",
  "1969-10-01:29.8077",
  "1970-01-01:31.2500",
  "1970-04-01:32.6844",
  "1970-07-01:34.1346",
  "1970-10-01:35.4808",
  "1971-01-01:36.8269",
  "1971-04-01:38.1657",
  "1971-07-01:39.5192",
  "1971-10-01:40.8173",
  "1972-01-01:42.1154",
  "1972-04-01:43.9904",
  "1972-07-01:45.8654",
  "1972-10-01:50.0962",
  "1973-01-01:54.3269",
  "1973-04-01:58.7734",
  "1973-07-01:63.2693",
  "1973-10-01:65.9135",
  "1974-01-01:68.5577",
  "1974-04-01:69.1315",
  "1974-07-01:69.7116",
  "1974-10-01:67.6923",
  "1975-01-01:65.6731",
  "1975-04-01:65.8643",
  "1975-07-01:66.0577",
  "1975-10-01:66.3462",
  "1976-01-01:66.6346",
  "1976-04-01:67.2116",
  "1976-07-01:67.7885",
  "1976-10-01:68.5096",
  "1977-01-01:69.2308",
  "1977-04-01:69.9958",
  "1977-07-01:70.7693",
  "1977-10-01:71.6346",
  "1978-01-01:72.5000",
  "1978-04-01:73.6953",
  "1978-07-01:74.9039",
  "1978-10-01:76.4423",
  "1979-01-01:77.9808",
  "1979-04-01:80.1801",
  "1979-07-01:82.4039",
  "1979-10-01:85.1443",
  "1980-01-01:87.8847",
  "1980-04-01:90.7693",
  "1980-07-01:93.6539",
  "1980-10-01:96.1539",
  "1981-01-01:98.6539",
  "1981-04-01:100.9966",
  "1981-07-01:103.3654",
  "1981-10-01:105.4808",
  "1982-01-01:107.5962",
  "1982-04-01:109.3174",
  "1982-07-01:111.0577",
  "1982-10-01:112.4520",
  "1983-01-01:113.8462",
  "1983-04-01:114.9459",
  "1983-07-01:116.0577",
  "1983-10-01:117.0193",
  "1984-01-01:117.9808",
  "1984-04-01:118.7981",
  "1984-07-01:119.6154",
  "1984-10-01:120.4327",
  "1985-01-01:121.2500",
  "1985-04-01:121.8716",
  "1985-07-01:122.5000",
  "1985-10-01:123.1731",
  "1986-01-01:123.8462",
  "1986-04-01:124.7068",
  "1986-07-01:125.5770",
  "1986-10-01:127.5001",
  "1987-01-01:129.4231",
  "1987-04-01:133.3915",
  "1987-07-01:137.4039",
  "1987-10-01:138.7981",
  "1988-01-01:140.1924",
  "1988-04-01:141.6347",
  "1988-07-01:143.0770",
  "1988-10-01:145.4328",
  "1989-01-01:147.7885",
  "1989-04-01:151.2787",
  "1989-07-01:154.8078",
  "1989-10-01:160.7693",
  "1990-01-01:166.7308",
  "1990-04-01:172.5160",
  "1990-07-01:178.3655",
  "1990-10-01:180.5770",
  "1991-01-01:182.7885",
  "1991-04-01:182.5495",
  "1991-07-01:182.3078",
  "1991-10-01:180.2885",
  "1992-01-01:178.2693",
  "1992-04-01:176.0578",
  "1992-07-01:173.8462",
  "1992-10-01:171.6347",
  "1993-01-01:169.4231",
  "1993-04-01:167.9888",
  "1993-07-01:166.5385",
  "1993-10-01:165.4808",
  "1994-01-01:164.4231",
  "1994-04-01:163.7538",
  "1994-07-01:163.0770",
  "1994-10-01:162.5001",
  "1995-01-01:161.9231",
  "1995-04-01:161.3016",
  "1995-07-01:160.6731",
  "1995-10-01:159.8558",
  "1996-01-01:159.0385",
  "1996-04-01:158.3174",
  "1996-07-01:157.5962",
  "1996-10-01:157.1154",
  "1997-01-01:156.6347",
  "1997-04-01:156.2044",
  "1997-07-01:155.7693",
  "1997-10-01:155.1924",
  "1998-01-01:154.6154",
  "1998-04-01:153.8505",
  "1998-07-01:153.0770",
  "1998-10-01:151.7789",
  "1999-01-01:150.4808",
  "1999-04-01:149.2377",
  "1999-07-01:147.9808",
  "1999-10-01:146.5385",
  "2000-01-01:145.0962",
  "2000-04-01:143.6539",
  "2000-07-01:142.2116",
  "2000-10-01:140.6731",
  "2001-01-01:139.1347",
  "2001-04-01:137.5091",
  "2001-07-01:135.8654",
  "2001-10-01:134.0385",
  "2002-01-01:132.2116",
  "2002-04-01:130.3948",
  "2002-07-01:128.5577",
  "2002-10-01:126.4904",
  "2003-01-01:124.4231",
  "2003-04-01:122.3672",
  "2003-07-01:120.2885",
  "2003-10-01:118.3654",
  "2004-01-01:116.4424",
  "2004-04-01:114.7116",
  "2004-07-01:112.9808",
  "2004-10-01:111.5866",
  "2005-01-01:110.1924",
  "2005-04-01:108.9493",
  "2005-07-01:107.6924",
  "2005-10-01:106.8270",
  "2006-01-01:105.9616",
  "2006-04-01:105.3878",
  "2006-07-01:104.8077",
  "2006-10-01:104.5674",
  "2007-01-01:104.3270",
  "2007-04-01:104.1835",
  "2007-07-01:104.0385",
  "2007-10-01:103.7981",
  "2008-01-01:103.5577",
  "2008-04-01:102.8847",
  "2008-07-01:102.2116",
  "2008-10-01:101.1539",
  "2009-01-01:99.2083",
  "2009-04-01:97.7081",
  "2009-07-01:99.1416",
  "2009-10-01:98.2749",
  "2010-01-01:99.6083",
  "2010-04-01:99.7750",
  "2010-07-01:100.3750",
  "2010-10-01:100.2417",
  "2011-01-01:100.4417",
  "2011-04-01:99.9750",
  "2011-07-01:100.6084",
  "2011-10-01:99.2416",
  "2012-01-01:99.9417",
  "2012-04-01:98.8749",
  "2012-07-01:99.1416",
  "2012-10-01:98.8082",
  "2013-01-01:99.4750",
  "2013-04-01:100.5750",
  "2013-07-01:101.6085",
  "2013-10-01:101.5751",
  "2014-01-01:102.5419",
  "2014-04-01:102.0752",
  "2014-07-01:102.7086",
  "2014-10-01:102.1752",
  "2015-01-01:104.9754",
  "2015-04-01:104.6421",
  "2015-07-01:105.6421",
  "2015-10-01:104.1753",
  "2016-01-01:106.6756",
  "2016-04-01:107.7423",
  "2016-07-01:107.5090",
  "2016-10-01:106.8089",
  "2017-01-01:110.8426",
  "2017-04-01:109.9092",
  "2017-07-01:110.1425",
  "2017-10-01:108.7424",
  "2018-01-01:112.5427",
  "2018-04-01:112.0093",
  "2018-07-01:112.1093",
  "2018-10-01:111.4760",
  "2019-01-01:115.1429",
  "2019-04-01:114.1762",
  "2019-07-01:113.5095",
  "2019-10-01:112.5427",
  "2020-01-01:114.6429",
  "2020-04-01:113.3761",
  "2020-07-01:113.3761",
  "2020-10-01:114.3095",
  "2021-01-01:118.4765",
  "2021-04-01:119.5766",
  "2021-07-01:122.6102",
  "2021-10-01:122.1102",
  "2022-01-01:129.2108",
  "2022-04-01:130.5775",
  "2022-07-01:132.2444",
  "2022-10-01:131.3109",
  "2023-01-01:135.3446",
  "2023-04-01:134.8112",
  "2023-07-01:135.2113"
]

dates = []
prices = []
for dataRowStr in inputData:
  dataRow = dataRowStr.split(":")
  date = datetime.datetime.strptime(dataRow[0], "%Y-%m-%d").date()
  price = float(dataRow[1])
  dates.append(date)
  prices.append(price)
  
if plotPrices:
  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="Index: 2010=100 points",
           title="Japanese residential real estate prices, index, quarterly step (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) if date.year % 2 == 0 else "")
  plt.xticks(xtickDates, xtickDatesStr, rotation=70)
  plt.plot(dates, prices, color="#6699CC")
  plt.grid(linewidth=0.25, color="#CCCCCC")
  plt.tight_layout()
  plt.savefig("JapaneseResidentialRePrice.svg")

Captions

Residential real estate prices for Japan

Items portrayed in this file

depicts

2 April 2024

image/svg+xml

File history

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

Date/TimeThumbnailDimensionsUserComment
current09:02, 2 April 2024Thumbnail for version as of 09:02, 2 April 2024768 × 432 (80 KB)Dan PolanskyUploaded own work with UploadWizard

The following page uses this file:

Metadata