How has COVID-19 impacted the housing market?¶

by Samuel(Lang) Shao¶

Question that I will address by using data science:¶

How has COVID-19 impacted the housing market?¶

This question is important because COVID is a crisis we are currently going through. Housing market is a market that matters to every citizens from every countries and it's one of the most important constituent part of whole econimic system.

News from Bankrate about Covid and Housing Market

As we can see nowadays, covid is impacting everybody's life, not just health but also econ system of the world. For example, in China, the house market been crashed by covid totally. By having this question and collecting data about this topic, I think we can learn more about the relationship between covid and the world we live in deeply.

Data and statistic of China'housing price before and after covid (*The covid had explosive growth at the end of 2021)

Data from:¶

Housing Data: Fred Reserve Economic Data¶

This is a reliable database website founded by thousands of authorized data scientists which famous with its professional and credible datasets. The datas it has are gathered outside sources, like the US Census Bureau...¶

COVID-19 Data: Statista¶

Provided by Northeastern Library database. The datas it has are also gathers data from outside sources like WHO...¶

Data links:¶

Data of China_covid

Data of Japan_covid

Data of US_covid

Data of China_housing price

Data of Japan_housing price

Data of US_housing price

In [22]:
import pandas as pd

china_covid = pd.read_csv('China_covid.csv',skiprows=213)   
us_covid = pd.read_csv('US_covid.csv',skiprows=213) 
japan_covid = pd.read_csv('Japan_covid.csv',skiprows=4) 

china_house = pd.read_csv('China_housing_indexed.csv') 
us_house = pd.read_csv('US_housing_indexed.csv') 
japn_house = pd.read_csv('Japan_housing_indexed.csv') 

How these covid confirmed data help?¶

By using those datasets of dates&confirmed cases of covid from different countries , we can see the relationship between them and the housing market data. By comapring, we can figure out if covid really impact the market or not, then seek for further thoughts and solutions. And by having more countries for reference, our conclusion will be more accurate and persuasive.¶

We'll use these datas to create graphs for visualizing our data, makes it easier to understand and build matrixs(?) to see the accuracy of our result.¶

In [25]:
china_cov_data = pd.DataFrame(china_covid)
china_cov_data.drop(['Unnamed: 0', 'Unnamed: 4','Deaths'], axis=1, inplace=True)
china_cov_data.columns.values[0] = "Dates"
print(china_cov_data)
            Dates  Confirmed
0    Jan 20, 2020        278
1    Jan 21, 2020        326
2    Jan 22, 2020        547
3    Jan 23, 2020        639
4    Jan 24, 2020        916
..            ...        ...
864   Jun 2, 2022  2,094,100
865   Jun 3, 2022  2,094,300
866   Jun 4, 2022  2,094,300
867   Jun 5, 2022  2,104,600
868   Jun 6, 2022  2,104,800

[869 rows x 2 columns]
In [26]:
us_cov_data = pd.DataFrame(us_covid)
us_cov_data.drop(['Unnamed: 0', 'Unnamed: 3','Unnamed: 4'], axis=1, inplace=True)
us_cov_data.columns.values[0] = "Dates"
us_cov_data.columns.values[1] = "Confirmed"
print(us_cov_data)
        Dates   Confirmed
0     1/20/20           1
1     1/21/20           1
2     1/22/20           1
3     1/23/20           1
4     1/24/20           1
..        ...         ...
979  10/12/22  95,434,094
980  10/14/22  95,529,714
981  10/16/22  95,636,402
982  10/18/22  95,653,603
983  10/20/22  95,726,462

[984 rows x 2 columns]
In [27]:
japan_cov_data = pd.DataFrame(japan_covid)
japan_cov_data.drop(['Unnamed: 0', 'Unnamed: 3','Unnamed: 4'], axis=1, inplace=True)
japan_cov_data.columns.values[0] = "Dates"
japan_cov_data.columns.values[1] = "Confirmed"
print(japan_cov_data)
          Dates  Confirmed
0    Feb 10 '20         26
1    Feb 12 '20         28
2    Feb 17 '20         59
3    Feb 21 '20         93
4    Feb 25 '20        156
..          ...        ...
736  Mar 12 '22  5,665,636
737  Mar 13 '22  5,720,394
738  Mar 14 '22  5,772,396
739  Mar 15 '22  5,808,242
740  Mar 16 '22  5,855,240

[741 rows x 2 columns]

How these housing price index data help?¶

By using those datasets of housing prices from different countries, we can see the relationship between it and covid. By comapring, we can figure out if covid really impact the market or not, then seek for further thoughts and solutions. And by having more countries for reference, our conclusion will be more accurate and persuasive.¶

We'll use these datas to create graphs for visualizing our data, makes it easier to understand and build matrixs(?) to see the accuracy of our result.¶

In [30]:
china_hous_data = pd.DataFrame(china_house)
print(china_hous_data)
          DATE  QCNR628BIS
0   2005-04-01     87.9389
1   2005-07-01     89.5385
2   2005-10-01     89.7531
3   2006-01-01     88.5259
4   2006-04-01     90.6989
..         ...         ...
63  2021-01-01    110.5650
64  2021-04-01    112.6115
65  2021-07-01    112.9903
66  2021-10-01    111.0794
67  2022-01-01    109.3374

[68 rows x 2 columns]
In [32]:
us_hous_data = pd.DataFrame(us_house)
print(us_hous_data)
           DATE  QUSR628BIS
0    1970-01-01     60.8237
1    1970-04-01     60.2667
2    1970-07-01     60.5358
3    1970-10-01     60.4802
4    1971-01-01     61.6646
..          ...         ...
205  2021-04-01    149.4852
206  2021-07-01    153.7293
207  2021-10-01    157.7780
208  2022-01-01    161.9757
209  2022-04-01    162.6433

[210 rows x 2 columns]
In [31]:
us_hous_data = pd.DataFrame(us_house)
print(us_hous_data)
           DATE  QUSR628BIS
0    1970-01-01     60.8237
1    1970-04-01     60.2667
2    1970-07-01     60.5358
3    1970-10-01     60.4802
4    1971-01-01     61.6646
..          ...         ...
205  2021-04-01    149.4852
206  2021-07-01    153.7293
207  2021-10-01    157.7780
208  2022-01-01    161.9757
209  2022-04-01    162.6433

[210 rows x 2 columns]