This commit is contained in:
TerenceLiu98 2021-07-11 13:17:13 +08:00
parent a0054f11e4
commit cd7cb25f00
4 changed files with 19 additions and 2 deletions

View File

@ -1,7 +1,7 @@
import sys
import os
__version__ = "0.1.9a"
__version__ = "0.1.9b"
__author__ = "Terence Lau"

View File

@ -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"]):

View File

@ -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

View File

@ -2,7 +2,7 @@ from setuptools import setup, find_packages
import os
setup(
name = "CEDApy",
version = "0.1.9a",
version = "0.1.9b",
keywords = "quantitative economic data",
long_description = open(
os.path.join(