File:UkResidentialRePrice.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: 73 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
DescriptionUkResidentialRePrice.svg |
English: Residential real estate prices for the United Kingdom, plotted using 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 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/QGBN628BIS
# Residential Property Prices for United Kingdom, Index 2010=100, Quarterly, Not Seasonally Adjusted
inputData = [
"1968-04-01:2.1750",
"1968-07-01:2.2354",
"1968-10-01:2.2354",
"1969-01-01:2.2354",
"1969-04-01:2.2958",
"1969-07-01:2.2958",
"1969-10-01:2.3562",
"1970-01-01:2.3562",
"1970-04-01:2.3562",
"1970-07-01:2.4770",
"1970-10-01:2.4770",
"1971-01-01:2.5375",
"1971-04-01:2.5979",
"1971-07-01:2.7791",
"1971-10-01:2.9000",
"1972-01-01:3.0812",
"1972-04-01:3.3833",
"1972-07-01:3.8666",
"1972-10-01:4.1687",
"1973-01-01:4.6520",
"1973-04-01:4.8937",
"1973-07-01:5.1958",
"1973-10-01:5.2562",
"1974-01-01:5.3166",
"1974-04-01:5.3166",
"1974-07-01:5.3770",
"1974-10-01:5.4374",
"1975-01-01:5.4978",
"1975-04-01:5.6187",
"1975-07-01:5.7999",
"1975-10-01:5.8603",
"1976-01-01:5.9812",
"1976-04-01:6.1624",
"1976-07-01:6.2832",
"1976-10-01:6.4041",
"1977-01-01:6.4041",
"1977-04-01:6.5249",
"1977-07-01:6.7062",
"1977-10-01:6.9478",
"1978-01-01:7.0686",
"1978-04-01:7.4311",
"1978-07-01:7.9145",
"1978-10-01:8.5186",
"1979-01-01:8.9415",
"1979-04-01:9.6665",
"1979-07-01:10.3915",
"1979-10-01:11.0561",
"1980-01-01:11.5394",
"1980-04-01:11.9623",
"1980-07-01:12.4456",
"1980-10-01:12.5061",
"1981-01-01:12.5061",
"1981-04-01:12.8686",
"1981-07-01:13.0498",
"1981-10-01:12.8081",
"1982-01-01:12.5061",
"1982-04-01:13.0498",
"1982-07-01:13.3519",
"1982-10-01:13.5331",
"1983-01-01:13.9560",
"1983-04-01:14.4394",
"1983-07-01:15.0435",
"1983-10-01:15.1644",
"1984-01-01:15.2852",
"1984-04-01:15.7685",
"1984-07-01:16.3727",
"1984-10-01:16.6143",
"1985-01-01:16.6143",
"1985-04-01:17.2185",
"1985-07-01:17.5810",
"1985-10-01:18.1851",
"1986-01-01:18.5476",
"1986-04-01:19.3935",
"1986-07-01:20.2393",
"1986-10-01:20.8434",
"1987-01-01:21.4476",
"1987-04-01:22.4143",
"1987-07-01:23.5017",
"1987-10-01:24.9517",
"1988-01-01:25.9788",
"1988-04-01:27.5496",
"1988-07-01:31.1745",
"1988-10-01:33.1078",
"1989-01-01:33.8328",
"1989-04-01:35.0411",
"1989-07-01:36.2495",
"1989-10-01:35.5245",
"1990-01-01:34.7995",
"1990-04-01:34.4974",
"1990-07-01:35.1016",
"1990-10-01:34.5578",
"1991-01-01:34.0745",
"1991-04-01:33.9537",
"1991-07-01:34.6182",
"1991-10-01:34.3162",
"1992-01-01:33.7724",
"1992-04-01:32.9266",
"1992-07-01:33.0474",
"1992-10-01:31.7787",
"1993-01-01:31.9599",
"1993-04-01:32.2016",
"1993-07-01:32.8662",
"1993-10-01:32.2620",
"1994-01-01:32.6245",
"1994-04-01:33.0474",
"1994-07-01:33.6516",
"1994-10-01:33.4099",
"1995-01-01:33.1078",
"1995-04-01:33.4703",
"1995-07-01:33.7724",
"1995-10-01:33.2891",
"1996-01-01:33.7724",
"1996-04-01:33.8328",
"1996-07-01:35.1620",
"1996-10-01:35.7661",
"1997-01-01:36.2495",
"1997-04-01:36.9745",
"1997-07-01:38.8473",
"1997-10-01:38.6057",
"1998-01-01:39.5723",
"1998-04-01:41.6869",
"1998-07-01:43.4994",
"1998-10-01:43.2577",
"1999-01-01:43.5598",
"1999-04-01:45.3722",
"1999-07-01:48.0305",
"1999-10-01:49.2993",
"2000-01-01:50.5076",
"2000-04-01:53.2867",
"2000-07-01:54.3138",
"2000-10-01:55.8846",
"2001-01-01:55.6429",
"2001-04-01:57.6366",
"2001-07-01:59.6908",
"2001-10-01:58.4825",
"2002-01-01:60.4158",
"2002-04-01:65.3699",
"2002-07-01:69.7802",
"2002-10-01:73.2239",
"2003-01-01:74.5531",
"2003-04-01:76.8489",
"2003-07-01:78.9634",
"2003-10-01:80.5946",
"2004-01-01:81.3196",
"2004-04-01:86.0925",
"2004-07-01:89.8987",
"2004-10-01:90.5028",
"2005-01-01:88.6402",
"2005-04-01:91.2143",
"2005-07-01:93.4527",
"2005-10-01:93.5646",
"2006-01-01:94.2362",
"2006-04-01:97.8176",
"2006-07-01:100.8394",
"2006-10-01:102.7420",
"2007-01-01:104.1970",
"2007-04-01:108.2261",
"2007-07-01:111.2479",
"2007-10-01:111.1360",
"2008-01-01:108.1142",
"2008-04-01:107.4426",
"2008-07-01:103.1897",
"2008-10-01:96.3626",
"2009-01-01:91.4382",
"2009-04-01:92.6693",
"2009-07-01:96.2507",
"2009-10-01:98.1533",
"2010-01-01:98.4891",
"2010-04-01:100.2798",
"2010-07-01:101.7348",
"2010-10-01:99.4964",
"2011-01-01:97.7057",
"2011-04-01:98.4891",
"2011-07-01:99.6083",
"2011-10-01:98.2652",
"2012-01-01:97.2580",
"2012-04-01:99.0487",
"2012-07-01:100.1679",
"2012-10-01:99.2725",
"2013-01-01:98.6010",
"2013-04-01:100.6156",
"2013-07-01:103.0778",
"2013-10-01:103.6374",
"2014-01-01:104.9804",
"2014-04-01:108.7857",
"2014-07-01:112.2552",
"2014-10-01:112.4790",
"2015-01-01:112.1433",
"2015-04-01:114.4936",
"2015-07-01:118.2988",
"2015-10-01:119.7538",
"2016-01-01:121.0968",
"2016-04-01:123.6710",
"2016-07-01:126.2451",
"2016-10-01:126.1332",
"2017-01-01:126.4689",
"2017-04-01:129.2669",
"2017-07-01:132.1768",
"2017-10-01:132.0649",
"2018-01-01:131.8411",
"2018-04-01:133.2960",
"2018-07-01:135.8702",
"2018-10-01:135.1987",
"2019-01-01:133.6318",
"2019-04-01:134.6391",
"2019-07-01:136.8774",
"2019-10-01:136.3179",
"2020-01-01:135.9821",
"2020-04-01:136.3179",
"2020-07-01:140.3470",
"2020-10-01:144.3760",
"2021-01-01:147.2860",
"2021-04-01:150.0839",
"2021-07-01:153.1058",
"2021-10-01:156.2395",
"2022-01-01:160.2686",
"2022-04-01:164.4096",
"2022-07-01:170.3414",
"2022-10-01:170.4533",
"2023-01-01:166.0884",
"2023-04-01:165.5288",
"2023-07-01:168.9983",
"2023-10-01:167.5434"]
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="U.K. 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("UkResidentialRePrice.svg")
Items portrayed in this file
depicts
some value
2 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 | 08:55, 2 April 2024 | 768 × 432 (73 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:UkResidentialRePrice.svg"