V0.1.9b0
This commit is contained in:
parent
a0054f11e4
commit
cd7cb25f00
|
@ -1,7 +1,7 @@
|
|||
import sys
|
||||
import os
|
||||
|
||||
__version__ = "0.1.9a"
|
||||
__version__ = "0.1.9b"
|
||||
__author__ = "Terence Lau"
|
||||
|
||||
|
||||
|
|
|
@ -872,6 +872,11 @@ def Consumer_Opinion_Survey():
|
|||
description = "Consumer opinion surveys, Monthly, Seasonally Adjusted"
|
||||
return df, name_list, description
|
||||
|
||||
def EU_EPU_Monthly():
|
||||
df = pd.read_excel("https://www.policyuncertainty.com/media/Europe_Policy_Uncertainty_Data.xlsx")[:-1]
|
||||
df['Date']=pd.to_datetime(df['Year'].apply(str).str.cat(df['Month'].apply(int).apply(str),sep='-'), format='%Y-%m')
|
||||
df = df[["Date", "European_News_Index", "Germany_News_Index", "Italy_News_Index", "UK_News_Index", "France_News_Index"]]
|
||||
return df
|
||||
|
||||
class ecb_data(object):
|
||||
def __init__(self, url=url["ecb"]):
|
||||
|
|
|
@ -1092,4 +1092,16 @@ def Leading_Indicators_OECD(startdate = "1950-01", enddate = "2021-05"):
|
|||
df = pd.merge_asof(df_cli, df_bci, on = "Date")
|
||||
df = pd.merge_asof(df, df_cci, on = "Date")
|
||||
|
||||
return df
|
||||
|
||||
def US_EPU_Monthly():
|
||||
df = pd.read_excel("https://www.policyuncertainty.com/media/US_Policy_Uncertainty_Data.xlsx")[:-1]
|
||||
df['Date']=pd.to_datetime(df['Year'].apply(str).str.cat(df['Month'].apply(int).apply(str),sep='-'), format='%Y-%m')
|
||||
df = df[["Date", "US_Three_Component_Index", "US_EPU"]]
|
||||
return df
|
||||
|
||||
def US_EPU_Daily():
|
||||
df = pd.read_csv("https://www.policyuncertainty.com/media/All_Daily_Policy_Data.csv")[:-1]
|
||||
df['Date']=pd.to_datetime(df['year'].apply(str).str.cat(df['month'].apply(str),sep='-').apply(str).str.cat(df['day'].apply(str),sep='-'), format='%Y-%m-%d')
|
||||
df = df.drop(["year", "month", "day"], axis=1)
|
||||
return df
|
Loading…
Reference in New Issue