Fixing some holiday parsing for R csv file

This commit is contained in:
Ben Letham 2020-02-04 15:23:11 -08:00
parent f640308395
commit 64d54e7748
2 changed files with 1204 additions and 1973 deletions

View file

@ -5908,62 +5908,6 @@ ds,holiday,country,year
2044-11-01,Allerheiligen,BE,2044 2044-11-01,Allerheiligen,BE,2044
2044-11-11,Wapenstilstand,BE,2044 2044-11-11,Wapenstilstand,BE,2044
2044-12-25,Kerstmis,BE,2044 2044-12-25,Kerstmis,BE,2044
1995-05-06,", ",BG,1995
1996-05-06,", ",BG,1996
1997-05-06,", ",BG,1997
1998-05-06,", ",BG,1998
1999-05-06,", ",BG,1999
2000-05-06,", ",BG,2000
2001-05-06,", ",BG,2001
2002-05-06,", ",BG,2002
2003-05-06,", ",BG,2003
2004-05-06,", ",BG,2004
2005-05-01,", ",BG,2005
2005-05-06,", ",BG,2005
2006-05-06,", ",BG,2006
2007-05-06,", ",BG,2007
2008-05-06,", ",BG,2008
2009-05-06,", ",BG,2009
2010-05-06,", ",BG,2010
2011-05-06,", ",BG,2011
2012-05-06,", ",BG,2012
2013-05-06,", ",BG,2013
2014-05-06,", ",BG,2014
2015-05-06,", ",BG,2015
2016-05-01,", ",BG,2016
2016-05-06,", ",BG,2016
2017-05-06,", ",BG,2017
2018-05-06,", ",BG,2018
2019-05-06,", ",BG,2019
2020-05-06,", ",BG,2020
2021-05-01," , ",BG,2021
2021-05-06,", ",BG,2021
2022-05-06,", ",BG,2022
2023-05-06,", ",BG,2023
2024-05-06,", ",BG,2024
2025-05-06,", ",BG,2025
2026-05-06,", ",BG,2026
2027-05-01," , ",BG,2027
2027-05-06,", ",BG,2027
2028-05-06,", ",BG,2028
2029-05-06,", ",BG,2029
2030-05-06,", ",BG,2030
2031-05-06,", ",BG,2031
2032-05-01," , ",BG,2032
2032-05-06,", ",BG,2032
2033-05-06,", ",BG,2033
2034-05-06,", ",BG,2034
2035-05-06,", ",BG,2035
2036-05-06,", ",BG,2036
2037-05-06,", ",BG,2037
2038-05-06,", ",BG,2038
2039-05-06,", ",BG,2039
2040-05-06,", , ",BG,2040
2041-05-06,", ",BG,2041
2042-05-06,", ",BG,2042
2043-05-01," , ",BG,2043
2043-05-06,", ",BG,2043
2044-05-06,", ",BG,2044
1995-01-01,New Year's Day,BR,1995 1995-01-01,New Year's Day,BR,1995
1995-04-21,Tiradentes,BR,1995 1995-04-21,Tiradentes,BR,1995
1995-05-01,Worker's Day,BR,1995 1995-05-01,Worker's Day,BR,1995
@ -6364,145 +6308,6 @@ ds,holiday,country,year
2044-11-02,All Souls' Day,BR,2044 2044-11-02,All Souls' Day,BR,2044
2044-11-15,Republic Proclamation Day,BR,2044 2044-11-15,Republic Proclamation Day,BR,2044
2044-12-25,Christmas,BR,2044 2044-12-25,Christmas,BR,2044
1999-01-07, ( ),BY,1999
1999-07-03, ( ),BY,1999
1999-12-25, ( ),BY,1999
2000-01-07, ( ),BY,2000
2000-05-09," , ",BY,2000
2000-07-03, ( ),BY,2000
2000-12-25, ( ),BY,2000
2001-01-07, ( ),BY,2001
2001-07-03, ( ),BY,2001
2001-12-25, ( ),BY,2001
2002-01-07, ( ),BY,2002
2002-07-03, ( ),BY,2002
2002-12-25, ( ),BY,2002
2003-01-07, ( ),BY,2003
2003-07-03, ( ),BY,2003
2003-12-25, ( ),BY,2003
2004-01-07, ( ),BY,2004
2004-07-03, ( ),BY,2004
2004-12-25, ( ),BY,2004
2005-01-07, ( ),BY,2005
2005-07-03, ( ),BY,2005
2005-12-25, ( ),BY,2005
2006-01-07, ( ),BY,2006
2006-07-03, ( ),BY,2006
2006-12-25, ( ),BY,2006
2007-01-07, ( ),BY,2007
2007-07-03, ( ),BY,2007
2007-12-25, ( ),BY,2007
2008-01-07, ( ),BY,2008
2008-07-03, ( ),BY,2008
2008-12-25, ( ),BY,2008
2009-01-07, ( ),BY,2009
2009-07-03, ( ),BY,2009
2009-12-25, ( ),BY,2009
2010-01-07, ( ),BY,2010
2010-07-03, ( ),BY,2010
2010-12-25, ( ),BY,2010
2011-01-07, ( ),BY,2011
2011-07-03, ( ),BY,2011
2011-12-25, ( ),BY,2011
2012-01-07, ( ),BY,2012
2012-07-03, ( ),BY,2012
2012-12-25, ( ),BY,2012
2013-01-07, ( ),BY,2013
2013-07-03, ( ),BY,2013
2013-12-25, ( ),BY,2013
2014-01-07, ( ),BY,2014
2014-07-03, ( ),BY,2014
2014-12-25, ( ),BY,2014
2015-01-07, ( ),BY,2015
2015-07-03, ( ),BY,2015
2015-12-25, ( ),BY,2015
2016-01-07, ( ),BY,2016
2016-07-03, ( ),BY,2016
2016-12-25, ( ),BY,2016
2017-01-07, ( ),BY,2017
2017-07-03, ( ),BY,2017
2017-12-25, ( ),BY,2017
2018-01-07, ( ),BY,2018
2018-07-03, ( ),BY,2018
2018-12-25, ( ),BY,2018
2019-01-07, ( ),BY,2019
2019-07-03, ( ),BY,2019
2019-12-25, ( ),BY,2019
2020-01-07, ( ),BY,2020
2020-07-03, ( ),BY,2020
2020-12-25, ( ),BY,2020
2021-01-07, ( ),BY,2021
2021-07-03, ( ),BY,2021
2021-12-25, ( ),BY,2021
2022-01-07, ( ),BY,2022
2022-07-03, ( ),BY,2022
2022-12-25, ( ),BY,2022
2023-01-07, ( ),BY,2023
2023-07-03, ( ),BY,2023
2023-12-25, ( ),BY,2023
2024-01-07, ( ),BY,2024
2024-07-03, ( ),BY,2024
2024-12-25, ( ),BY,2024
2025-01-07, ( ),BY,2025
2025-07-03, ( ),BY,2025
2025-12-25, ( ),BY,2025
2026-01-07, ( ),BY,2026
2026-07-03, ( ),BY,2026
2026-12-25, ( ),BY,2026
2027-01-07, ( ),BY,2027
2027-07-03, ( ),BY,2027
2027-12-25, ( ),BY,2027
2028-01-07, ( ),BY,2028
2028-07-03, ( ),BY,2028
2028-12-25, ( ),BY,2028
2029-01-07, ( ),BY,2029
2029-07-03, ( ),BY,2029
2029-12-25, ( ),BY,2029
2030-01-07, ( ),BY,2030
2030-07-03, ( ),BY,2030
2030-12-25, ( ),BY,2030
2031-01-07, ( ),BY,2031
2031-07-03, ( ),BY,2031
2031-12-25, ( ),BY,2031
2032-01-07, ( ),BY,2032
2032-07-03, ( ),BY,2032
2032-12-25, ( ),BY,2032
2033-01-07, ( ),BY,2033
2033-07-03, ( ),BY,2033
2033-12-25, ( ),BY,2033
2034-01-07, ( ),BY,2034
2034-07-03, ( ),BY,2034
2034-12-25, ( ),BY,2034
2035-01-07, ( ),BY,2035
2035-07-03, ( ),BY,2035
2035-12-25, ( ),BY,2035
2036-01-07, ( ),BY,2036
2036-07-03, ( ),BY,2036
2036-12-25, ( ),BY,2036
2037-01-07, ( ),BY,2037
2037-07-03, ( ),BY,2037
2037-12-25, ( ),BY,2037
2038-01-07, ( ),BY,2038
2038-07-03, ( ),BY,2038
2038-12-25, ( ),BY,2038
2039-01-07, ( ),BY,2039
2039-07-03, ( ),BY,2039
2039-12-25, ( ),BY,2039
2040-01-07, ( ),BY,2040
2040-07-03, ( ),BY,2040
2040-12-25, ( ),BY,2040
2041-01-07, ( ),BY,2041
2041-07-03, ( ),BY,2041
2041-12-25, ( ),BY,2041
2042-01-07, ( ),BY,2042
2042-07-03, ( ),BY,2042
2042-12-25, ( ),BY,2042
2043-01-07, ( ),BY,2043
2043-07-03, ( ),BY,2043
2043-12-25, ( ),BY,2043
2044-01-07, ( ),BY,2044
2044-07-03, ( ),BY,2044
2044-12-25, ( ),BY,2044
1995-02-21,Language Martyrs' Day,Bangladesh,1995 1995-02-21,Language Martyrs' Day,Bangladesh,1995
1995-03-17,Mujib's birthday,Bangladesh,1995 1995-03-17,Mujib's birthday,Bangladesh,1995
1995-03-26,Independence Day,Bangladesh,1995 1995-03-26,Independence Day,Bangladesh,1995
@ -6853,145 +6658,6 @@ ds,holiday,country,year
2044-05-01,Labor Day,Bangladesh,2044 2044-05-01,Labor Day,Bangladesh,2044
2044-08-15,National Mourning Day,Bangladesh,2044 2044-08-15,National Mourning Day,Bangladesh,2044
2044-12-16,Victory Day,Bangladesh,2044 2044-12-16,Victory Day,Bangladesh,2044
1999-01-07, ( ),Belarus,1999
1999-07-03, ( ),Belarus,1999
1999-12-25, ( ),Belarus,1999
2000-01-07, ( ),Belarus,2000
2000-05-09," , ",Belarus,2000
2000-07-03, ( ),Belarus,2000
2000-12-25, ( ),Belarus,2000
2001-01-07, ( ),Belarus,2001
2001-07-03, ( ),Belarus,2001
2001-12-25, ( ),Belarus,2001
2002-01-07, ( ),Belarus,2002
2002-07-03, ( ),Belarus,2002
2002-12-25, ( ),Belarus,2002
2003-01-07, ( ),Belarus,2003
2003-07-03, ( ),Belarus,2003
2003-12-25, ( ),Belarus,2003
2004-01-07, ( ),Belarus,2004
2004-07-03, ( ),Belarus,2004
2004-12-25, ( ),Belarus,2004
2005-01-07, ( ),Belarus,2005
2005-07-03, ( ),Belarus,2005
2005-12-25, ( ),Belarus,2005
2006-01-07, ( ),Belarus,2006
2006-07-03, ( ),Belarus,2006
2006-12-25, ( ),Belarus,2006
2007-01-07, ( ),Belarus,2007
2007-07-03, ( ),Belarus,2007
2007-12-25, ( ),Belarus,2007
2008-01-07, ( ),Belarus,2008
2008-07-03, ( ),Belarus,2008
2008-12-25, ( ),Belarus,2008
2009-01-07, ( ),Belarus,2009
2009-07-03, ( ),Belarus,2009
2009-12-25, ( ),Belarus,2009
2010-01-07, ( ),Belarus,2010
2010-07-03, ( ),Belarus,2010
2010-12-25, ( ),Belarus,2010
2011-01-07, ( ),Belarus,2011
2011-07-03, ( ),Belarus,2011
2011-12-25, ( ),Belarus,2011
2012-01-07, ( ),Belarus,2012
2012-07-03, ( ),Belarus,2012
2012-12-25, ( ),Belarus,2012
2013-01-07, ( ),Belarus,2013
2013-07-03, ( ),Belarus,2013
2013-12-25, ( ),Belarus,2013
2014-01-07, ( ),Belarus,2014
2014-07-03, ( ),Belarus,2014
2014-12-25, ( ),Belarus,2014
2015-01-07, ( ),Belarus,2015
2015-07-03, ( ),Belarus,2015
2015-12-25, ( ),Belarus,2015
2016-01-07, ( ),Belarus,2016
2016-07-03, ( ),Belarus,2016
2016-12-25, ( ),Belarus,2016
2017-01-07, ( ),Belarus,2017
2017-07-03, ( ),Belarus,2017
2017-12-25, ( ),Belarus,2017
2018-01-07, ( ),Belarus,2018
2018-07-03, ( ),Belarus,2018
2018-12-25, ( ),Belarus,2018
2019-01-07, ( ),Belarus,2019
2019-07-03, ( ),Belarus,2019
2019-12-25, ( ),Belarus,2019
2020-01-07, ( ),Belarus,2020
2020-07-03, ( ),Belarus,2020
2020-12-25, ( ),Belarus,2020
2021-01-07, ( ),Belarus,2021
2021-07-03, ( ),Belarus,2021
2021-12-25, ( ),Belarus,2021
2022-01-07, ( ),Belarus,2022
2022-07-03, ( ),Belarus,2022
2022-12-25, ( ),Belarus,2022
2023-01-07, ( ),Belarus,2023
2023-07-03, ( ),Belarus,2023
2023-12-25, ( ),Belarus,2023
2024-01-07, ( ),Belarus,2024
2024-07-03, ( ),Belarus,2024
2024-12-25, ( ),Belarus,2024
2025-01-07, ( ),Belarus,2025
2025-07-03, ( ),Belarus,2025
2025-12-25, ( ),Belarus,2025
2026-01-07, ( ),Belarus,2026
2026-07-03, ( ),Belarus,2026
2026-12-25, ( ),Belarus,2026
2027-01-07, ( ),Belarus,2027
2027-07-03, ( ),Belarus,2027
2027-12-25, ( ),Belarus,2027
2028-01-07, ( ),Belarus,2028
2028-07-03, ( ),Belarus,2028
2028-12-25, ( ),Belarus,2028
2029-01-07, ( ),Belarus,2029
2029-07-03, ( ),Belarus,2029
2029-12-25, ( ),Belarus,2029
2030-01-07, ( ),Belarus,2030
2030-07-03, ( ),Belarus,2030
2030-12-25, ( ),Belarus,2030
2031-01-07, ( ),Belarus,2031
2031-07-03, ( ),Belarus,2031
2031-12-25, ( ),Belarus,2031
2032-01-07, ( ),Belarus,2032
2032-07-03, ( ),Belarus,2032
2032-12-25, ( ),Belarus,2032
2033-01-07, ( ),Belarus,2033
2033-07-03, ( ),Belarus,2033
2033-12-25, ( ),Belarus,2033
2034-01-07, ( ),Belarus,2034
2034-07-03, ( ),Belarus,2034
2034-12-25, ( ),Belarus,2034
2035-01-07, ( ),Belarus,2035
2035-07-03, ( ),Belarus,2035
2035-12-25, ( ),Belarus,2035
2036-01-07, ( ),Belarus,2036
2036-07-03, ( ),Belarus,2036
2036-12-25, ( ),Belarus,2036
2037-01-07, ( ),Belarus,2037
2037-07-03, ( ),Belarus,2037
2037-12-25, ( ),Belarus,2037
2038-01-07, ( ),Belarus,2038
2038-07-03, ( ),Belarus,2038
2038-12-25, ( ),Belarus,2038
2039-01-07, ( ),Belarus,2039
2039-07-03, ( ),Belarus,2039
2039-12-25, ( ),Belarus,2039
2040-01-07, ( ),Belarus,2040
2040-07-03, ( ),Belarus,2040
2040-12-25, ( ),Belarus,2040
2041-01-07, ( ),Belarus,2041
2041-07-03, ( ),Belarus,2041
2041-12-25, ( ),Belarus,2041
2042-01-07, ( ),Belarus,2042
2042-07-03, ( ),Belarus,2042
2042-12-25, ( ),Belarus,2042
2043-01-07, ( ),Belarus,2043
2043-07-03, ( ),Belarus,2043
2043-12-25, ( ),Belarus,2043
2044-01-07, ( ),Belarus,2044
2044-07-03, ( ),Belarus,2044
2044-12-25, ( ),Belarus,2044
1995-01-01,Nieuwjaarsdag,Belgium,1995 1995-01-01,Nieuwjaarsdag,Belgium,1995
1995-04-16,Pasen,Belgium,1995 1995-04-16,Pasen,Belgium,1995
1995-04-17,Paasmaandag,Belgium,1995 1995-04-17,Paasmaandag,Belgium,1995
@ -7991,62 +7657,6 @@ ds,holiday,country,year
2044-11-02,All Souls' Day,Brazil,2044 2044-11-02,All Souls' Day,Brazil,2044
2044-11-15,Republic Proclamation Day,Brazil,2044 2044-11-15,Republic Proclamation Day,Brazil,2044
2044-12-25,Christmas,Brazil,2044 2044-12-25,Christmas,Brazil,2044
1995-05-06,", ",Bulgaria,1995
1996-05-06,", ",Bulgaria,1996
1997-05-06,", ",Bulgaria,1997
1998-05-06,", ",Bulgaria,1998
1999-05-06,", ",Bulgaria,1999
2000-05-06,", ",Bulgaria,2000
2001-05-06,", ",Bulgaria,2001
2002-05-06,", ",Bulgaria,2002
2003-05-06,", ",Bulgaria,2003
2004-05-06,", ",Bulgaria,2004
2005-05-01,", ",Bulgaria,2005
2005-05-06,", ",Bulgaria,2005
2006-05-06,", ",Bulgaria,2006
2007-05-06,", ",Bulgaria,2007
2008-05-06,", ",Bulgaria,2008
2009-05-06,", ",Bulgaria,2009
2010-05-06,", ",Bulgaria,2010
2011-05-06,", ",Bulgaria,2011
2012-05-06,", ",Bulgaria,2012
2013-05-06,", ",Bulgaria,2013
2014-05-06,", ",Bulgaria,2014
2015-05-06,", ",Bulgaria,2015
2016-05-01,", ",Bulgaria,2016
2016-05-06,", ",Bulgaria,2016
2017-05-06,", ",Bulgaria,2017
2018-05-06,", ",Bulgaria,2018
2019-05-06,", ",Bulgaria,2019
2020-05-06,", ",Bulgaria,2020
2021-05-01," , ",Bulgaria,2021
2021-05-06,", ",Bulgaria,2021
2022-05-06,", ",Bulgaria,2022
2023-05-06,", ",Bulgaria,2023
2024-05-06,", ",Bulgaria,2024
2025-05-06,", ",Bulgaria,2025
2026-05-06,", ",Bulgaria,2026
2027-05-01," , ",Bulgaria,2027
2027-05-06,", ",Bulgaria,2027
2028-05-06,", ",Bulgaria,2028
2029-05-06,", ",Bulgaria,2029
2030-05-06,", ",Bulgaria,2030
2031-05-06,", ",Bulgaria,2031
2032-05-01," , ",Bulgaria,2032
2032-05-06,", ",Bulgaria,2032
2033-05-06,", ",Bulgaria,2033
2034-05-06,", ",Bulgaria,2034
2035-05-06,", ",Bulgaria,2035
2036-05-06,", ",Bulgaria,2036
2037-05-06,", ",Bulgaria,2037
2038-05-06,", ",Bulgaria,2038
2039-05-06,", ",Bulgaria,2039
2040-05-06,", , ",Bulgaria,2040
2041-05-06,", ",Bulgaria,2041
2042-05-06,", ",Bulgaria,2042
2043-05-01," , ",Bulgaria,2043
2043-05-06,", ",Bulgaria,2043
2044-05-06,", ",Bulgaria,2044
1995-01-01,New Year's Day,CA,1995 1995-01-01,New Year's Day,CA,1995
1995-01-02,New Year's Day (Observed),CA,1995 1995-01-02,New Year's Day (Observed),CA,1995
1995-04-14,Good Friday,CA,1995 1995-04-14,Good Friday,CA,1995
@ -75395,69 +75005,6 @@ ds,holiday,country,year
2044-12-25,Christmas Day,PortugalExt,2044 2044-12-25,Christmas Day,PortugalExt,2044
2044-12-26,26 de Dezembro,PortugalExt,2044 2044-12-26,26 de Dezembro,PortugalExt,2044
2044-12-31,Vespera de Ano novo,PortugalExt,2044 2044-12-31,Vespera de Ano novo,PortugalExt,2044
1995-01-03, (Observed),RS,1995
1997-02-17, (Observed),RS,1997
1998-02-17, (Observed),RS,1998
1999-05-03, (Observed),RS,1999
2000-01-03, (Observed),RS,2000
2000-05-01," , ",RS,2000
2001-11-12, (Observed),RS,2001
2003-02-17, (Observed),RS,2003
2004-02-17, (Observed),RS,2004
2004-05-03, (Observed),RS,2004
2005-01-03, (Observed),RS,2005
2005-05-01,", ",RS,2005
2005-05-02," , ",RS,2005
2005-05-03, (Observed),RS,2005
2006-01-03, (Observed),RS,2006
2007-11-12, (Observed),RS,2007
2009-02-17, (Observed),RS,2009
2010-05-03, (Observed),RS,2010
2011-01-03, (Observed),RS,2011
2011-05-03, (Observed),RS,2011
2012-01-03, (Observed),RS,2012
2012-11-12, (Observed),RS,2012
2014-02-17, (Observed),RS,2014
2015-02-17, (Observed),RS,2015
2016-05-01,", ",RS,2016
2016-05-02," , ",RS,2016
2016-05-03, (Observed),RS,2016
2017-01-03, (Observed),RS,2017
2018-11-12, (Observed),RS,2018
2020-02-17, (Observed),RS,2020
2021-05-01," , ",RS,2021
2021-05-02,", ",RS,2021
2021-05-03," , (Observed)",RS,2021
2022-01-03, (Observed),RS,2022
2022-05-03, (Observed),RS,2022
2023-01-03, (Observed),RS,2023
2025-02-17, (Observed),RS,2025
2026-02-17, (Observed),RS,2026
2027-05-01," , ",RS,2027
2027-05-02,", ",RS,2027
2027-05-03," , (Observed)",RS,2027
2028-01-03, (Observed),RS,2028
2029-11-12, (Observed),RS,2029
2031-02-17, (Observed),RS,2031
2032-02-17, (Observed),RS,2032
2032-05-01," , ",RS,2032
2032-05-02,", ",RS,2032
2032-05-03," , (Observed)",RS,2032
2033-01-03, (Observed),RS,2033
2033-05-03, (Observed),RS,2033
2034-01-03, (Observed),RS,2034
2035-11-12, (Observed),RS,2035
2037-02-17, (Observed),RS,2037
2038-05-03, (Observed),RS,2038
2039-01-03, (Observed),RS,2039
2039-05-03, (Observed),RS,2039
2040-01-03, (Observed),RS,2040
2040-11-12, (Observed),RS,2040
2042-02-17, (Observed),RS,2042
2043-02-17, (Observed),RS,2043
2043-05-01," , ",RS,2043
2043-05-02," , ",RS,2043
2044-05-03, (Observed),RS,2044
1995-01-01,New Year's Day,RU,1995 1995-01-01,New Year's Day,RU,1995
1995-01-07,Orthodox Christmas Day,RU,1995 1995-01-07,Orthodox Christmas Day,RU,1995
1995-02-23,Defender of the Fatherland Day,RU,1995 1995-02-23,Defender of the Fatherland Day,RU,1995
@ -82164,69 +81711,6 @@ ds,holiday,country,year
2044-12-25,Christmas Day,Scotland,2044 2044-12-25,Christmas Day,Scotland,2044
2044-12-26,Boxing Day,Scotland,2044 2044-12-26,Boxing Day,Scotland,2044
2044-12-27,Christmas Day (Observed),Scotland,2044 2044-12-27,Christmas Day (Observed),Scotland,2044
1995-01-03, (Observed),Serbia,1995
1997-02-17, (Observed),Serbia,1997
1998-02-17, (Observed),Serbia,1998
1999-05-03, (Observed),Serbia,1999
2000-01-03, (Observed),Serbia,2000
2000-05-01," , ",Serbia,2000
2001-11-12, (Observed),Serbia,2001
2003-02-17, (Observed),Serbia,2003
2004-02-17, (Observed),Serbia,2004
2004-05-03, (Observed),Serbia,2004
2005-01-03, (Observed),Serbia,2005
2005-05-01,", ",Serbia,2005
2005-05-02," , ",Serbia,2005
2005-05-03, (Observed),Serbia,2005
2006-01-03, (Observed),Serbia,2006
2007-11-12, (Observed),Serbia,2007
2009-02-17, (Observed),Serbia,2009
2010-05-03, (Observed),Serbia,2010
2011-01-03, (Observed),Serbia,2011
2011-05-03, (Observed),Serbia,2011
2012-01-03, (Observed),Serbia,2012
2012-11-12, (Observed),Serbia,2012
2014-02-17, (Observed),Serbia,2014
2015-02-17, (Observed),Serbia,2015
2016-05-01,", ",Serbia,2016
2016-05-02," , ",Serbia,2016
2016-05-03, (Observed),Serbia,2016
2017-01-03, (Observed),Serbia,2017
2018-11-12, (Observed),Serbia,2018
2020-02-17, (Observed),Serbia,2020
2021-05-01," , ",Serbia,2021
2021-05-02,", ",Serbia,2021
2021-05-03," , (Observed)",Serbia,2021
2022-01-03, (Observed),Serbia,2022
2022-05-03, (Observed),Serbia,2022
2023-01-03, (Observed),Serbia,2023
2025-02-17, (Observed),Serbia,2025
2026-02-17, (Observed),Serbia,2026
2027-05-01," , ",Serbia,2027
2027-05-02,", ",Serbia,2027
2027-05-03," , (Observed)",Serbia,2027
2028-01-03, (Observed),Serbia,2028
2029-11-12, (Observed),Serbia,2029
2031-02-17, (Observed),Serbia,2031
2032-02-17, (Observed),Serbia,2032
2032-05-01," , ",Serbia,2032
2032-05-02,", ",Serbia,2032
2032-05-03," , (Observed)",Serbia,2032
2033-01-03, (Observed),Serbia,2033
2033-05-03, (Observed),Serbia,2033
2034-01-03, (Observed),Serbia,2034
2035-11-12, (Observed),Serbia,2035
2037-02-17, (Observed),Serbia,2037
2038-05-03, (Observed),Serbia,2038
2039-01-03, (Observed),Serbia,2039
2039-05-03, (Observed),Serbia,2039
2040-01-03, (Observed),Serbia,2040
2040-11-12, (Observed),Serbia,2040
2042-02-17, (Observed),Serbia,2042
2043-02-17, (Observed),Serbia,2043
2043-05-01," , ",Serbia,2043
2043-05-02," , ",Serbia,2043
2044-05-03, (Observed),Serbia,2044
1995-01-01,New Year's Day [Sunday],Singapore,1995 1995-01-01,New Year's Day [Sunday],Singapore,1995
1995-01-02,Monday following New Year's Day,Singapore,1995 1995-01-02,Monday following New Year's Day,Singapore,1995
1995-01-31,Chinese New Year,Singapore,1995 1995-01-31,Chinese New Year,Singapore,1995
@ -92206,134 +91690,6 @@ ds,holiday,country,year
2044-08-30,Victory Day,Turkey,2044 2044-08-30,Victory Day,Turkey,2044
2044-10-29,Republic Day,Turkey,2044 2044-10-29,Republic Day,Turkey,2044
2044-11-01,Feast of the Sacrifice,Turkey,2044 2044-11-01,Feast of the Sacrifice,Turkey,2044
1995-01-07, (),UA,1995
1995-04-23, (),UA,1995
1996-01-07, (),UA,1996
1996-04-14, (),UA,1996
1997-01-07, (),UA,1997
1997-04-27, (),UA,1997
1998-01-07, (),UA,1998
1998-04-19, (),UA,1998
1999-01-07, (),UA,1999
1999-04-11, (),UA,1999
2000-01-07, (),UA,2000
2000-04-30, (),UA,2000
2001-01-07, (),UA,2001
2001-04-15, (),UA,2001
2002-01-07, (),UA,2002
2002-05-05, (),UA,2002
2003-01-07, (),UA,2003
2003-04-27, (),UA,2003
2004-01-07, (),UA,2004
2004-04-11, (),UA,2004
2005-01-07, (),UA,2005
2005-05-01," , ()",UA,2005
2006-01-07, (),UA,2006
2006-04-23, (),UA,2006
2007-01-07, (),UA,2007
2007-04-08, (),UA,2007
2008-01-07, (),UA,2008
2008-04-27, (),UA,2008
2009-01-07, (),UA,2009
2009-04-19, (),UA,2009
2010-01-07, (),UA,2010
2010-04-04, (),UA,2010
2011-01-07, (),UA,2011
2011-04-24, (),UA,2011
2012-01-07, (),UA,2012
2012-04-15, (),UA,2012
2013-01-07, (),UA,2013
2013-05-05, (),UA,2013
2014-01-07, (),UA,2014
2014-04-20, (),UA,2014
2015-01-07, (),UA,2015
2015-04-12, (),UA,2015
2016-01-07, (),UA,2016
2016-05-01," , ()",UA,2016
2017-01-07, (),UA,2017
2017-04-16, (),UA,2017
2017-12-25, (),UA,2017
2018-01-07, (),UA,2018
2018-04-08, (),UA,2018
2018-12-25, (),UA,2018
2019-01-07, (),UA,2019
2019-04-28, (),UA,2019
2019-12-25, (),UA,2019
2020-01-07, (),UA,2020
2020-04-19, (),UA,2020
2020-12-25, (),UA,2020
2021-01-07, (),UA,2021
2021-05-02, (),UA,2021
2021-12-25, (),UA,2021
2022-01-07, (),UA,2022
2022-04-24, (),UA,2022
2022-12-25, (),UA,2022
2023-01-07, (),UA,2023
2023-04-16, (),UA,2023
2023-12-25, (),UA,2023
2024-01-07, (),UA,2024
2024-05-05, (),UA,2024
2024-12-25, (),UA,2024
2025-01-07, (),UA,2025
2025-04-20, (),UA,2025
2025-12-25, (),UA,2025
2026-01-07, (),UA,2026
2026-04-12, (),UA,2026
2026-12-25, (),UA,2026
2027-01-07, (),UA,2027
2027-05-02, (),UA,2027
2027-12-25, (),UA,2027
2028-01-07, (),UA,2028
2028-04-16, (),UA,2028
2028-12-25, (),UA,2028
2029-01-07, (),UA,2029
2029-04-08, (),UA,2029
2029-12-25, (),UA,2029
2030-01-07, (),UA,2030
2030-04-28, (),UA,2030
2030-12-25, (),UA,2030
2031-01-07, (),UA,2031
2031-04-13, (),UA,2031
2031-12-25, (),UA,2031
2032-01-07, (),UA,2032
2032-05-02, (),UA,2032
2032-12-25, (),UA,2032
2033-01-07, (),UA,2033
2033-04-24, (),UA,2033
2033-12-25, (),UA,2033
2034-01-07, (),UA,2034
2034-04-09, (),UA,2034
2034-12-25, (),UA,2034
2035-01-07, (),UA,2035
2035-04-29, (),UA,2035
2035-12-25, (),UA,2035
2036-01-07, (),UA,2036
2036-04-20, (),UA,2036
2036-12-25, (),UA,2036
2037-01-07, (),UA,2037
2037-04-05, (),UA,2037
2037-12-25, (),UA,2037
2038-01-07, (),UA,2038
2038-04-25, (),UA,2038
2038-12-25, (),UA,2038
2039-01-07, (),UA,2039
2039-04-17, (),UA,2039
2039-12-25, (),UA,2039
2040-01-07, (),UA,2040
2040-05-06, (),UA,2040
2040-12-25, (),UA,2040
2041-01-07, (),UA,2041
2041-04-21, (),UA,2041
2041-12-25, (),UA,2041
2042-01-07, (),UA,2042
2042-04-13, (),UA,2042
2042-12-25, (),UA,2042
2043-01-07, (),UA,2043
2043-05-03, (),UA,2043
2043-12-25, (),UA,2043
2044-01-07, (),UA,2044
2044-04-24, (),UA,2044
2044-12-25, (),UA,2044
1995-01-01,New Year's Day,UK,1995 1995-01-01,New Year's Day,UK,1995
1995-01-02,"New Year Holiday [Scotland], New Year's Day (Observed)",UK,1995 1995-01-02,"New Year Holiday [Scotland], New Year's Day (Observed)",UK,1995
1995-01-03,New Year Holiday [Scotland] (Observed),UK,1995 1995-01-03,New Year Holiday [Scotland] (Observed),UK,1995
@ -93614,134 +92970,6 @@ ds,holiday,country,year
2044-11-24,Thanksgiving,US,2044 2044-11-24,Thanksgiving,US,2044
2044-12-25,Christmas Day,US,2044 2044-12-25,Christmas Day,US,2044
2044-12-26,Christmas Day (Observed),US,2044 2044-12-26,Christmas Day (Observed),US,2044
1995-01-07, (),Ukraine,1995
1995-04-23, (),Ukraine,1995
1996-01-07, (),Ukraine,1996
1996-04-14, (),Ukraine,1996
1997-01-07, (),Ukraine,1997
1997-04-27, (),Ukraine,1997
1998-01-07, (),Ukraine,1998
1998-04-19, (),Ukraine,1998
1999-01-07, (),Ukraine,1999
1999-04-11, (),Ukraine,1999
2000-01-07, (),Ukraine,2000
2000-04-30, (),Ukraine,2000
2001-01-07, (),Ukraine,2001
2001-04-15, (),Ukraine,2001
2002-01-07, (),Ukraine,2002
2002-05-05, (),Ukraine,2002
2003-01-07, (),Ukraine,2003
2003-04-27, (),Ukraine,2003
2004-01-07, (),Ukraine,2004
2004-04-11, (),Ukraine,2004
2005-01-07, (),Ukraine,2005
2005-05-01," , ()",Ukraine,2005
2006-01-07, (),Ukraine,2006
2006-04-23, (),Ukraine,2006
2007-01-07, (),Ukraine,2007
2007-04-08, (),Ukraine,2007
2008-01-07, (),Ukraine,2008
2008-04-27, (),Ukraine,2008
2009-01-07, (),Ukraine,2009
2009-04-19, (),Ukraine,2009
2010-01-07, (),Ukraine,2010
2010-04-04, (),Ukraine,2010
2011-01-07, (),Ukraine,2011
2011-04-24, (),Ukraine,2011
2012-01-07, (),Ukraine,2012
2012-04-15, (),Ukraine,2012
2013-01-07, (),Ukraine,2013
2013-05-05, (),Ukraine,2013
2014-01-07, (),Ukraine,2014
2014-04-20, (),Ukraine,2014
2015-01-07, (),Ukraine,2015
2015-04-12, (),Ukraine,2015
2016-01-07, (),Ukraine,2016
2016-05-01," , ()",Ukraine,2016
2017-01-07, (),Ukraine,2017
2017-04-16, (),Ukraine,2017
2017-12-25, (),Ukraine,2017
2018-01-07, (),Ukraine,2018
2018-04-08, (),Ukraine,2018
2018-12-25, (),Ukraine,2018
2019-01-07, (),Ukraine,2019
2019-04-28, (),Ukraine,2019
2019-12-25, (),Ukraine,2019
2020-01-07, (),Ukraine,2020
2020-04-19, (),Ukraine,2020
2020-12-25, (),Ukraine,2020
2021-01-07, (),Ukraine,2021
2021-05-02, (),Ukraine,2021
2021-12-25, (),Ukraine,2021
2022-01-07, (),Ukraine,2022
2022-04-24, (),Ukraine,2022
2022-12-25, (),Ukraine,2022
2023-01-07, (),Ukraine,2023
2023-04-16, (),Ukraine,2023
2023-12-25, (),Ukraine,2023
2024-01-07, (),Ukraine,2024
2024-05-05, (),Ukraine,2024
2024-12-25, (),Ukraine,2024
2025-01-07, (),Ukraine,2025
2025-04-20, (),Ukraine,2025
2025-12-25, (),Ukraine,2025
2026-01-07, (),Ukraine,2026
2026-04-12, (),Ukraine,2026
2026-12-25, (),Ukraine,2026
2027-01-07, (),Ukraine,2027
2027-05-02, (),Ukraine,2027
2027-12-25, (),Ukraine,2027
2028-01-07, (),Ukraine,2028
2028-04-16, (),Ukraine,2028
2028-12-25, (),Ukraine,2028
2029-01-07, (),Ukraine,2029
2029-04-08, (),Ukraine,2029
2029-12-25, (),Ukraine,2029
2030-01-07, (),Ukraine,2030
2030-04-28, (),Ukraine,2030
2030-12-25, (),Ukraine,2030
2031-01-07, (),Ukraine,2031
2031-04-13, (),Ukraine,2031
2031-12-25, (),Ukraine,2031
2032-01-07, (),Ukraine,2032
2032-05-02, (),Ukraine,2032
2032-12-25, (),Ukraine,2032
2033-01-07, (),Ukraine,2033
2033-04-24, (),Ukraine,2033
2033-12-25, (),Ukraine,2033
2034-01-07, (),Ukraine,2034
2034-04-09, (),Ukraine,2034
2034-12-25, (),Ukraine,2034
2035-01-07, (),Ukraine,2035
2035-04-29, (),Ukraine,2035
2035-12-25, (),Ukraine,2035
2036-01-07, (),Ukraine,2036
2036-04-20, (),Ukraine,2036
2036-12-25, (),Ukraine,2036
2037-01-07, (),Ukraine,2037
2037-04-05, (),Ukraine,2037
2037-12-25, (),Ukraine,2037
2038-01-07, (),Ukraine,2038
2038-04-25, (),Ukraine,2038
2038-12-25, (),Ukraine,2038
2039-01-07, (),Ukraine,2039
2039-04-17, (),Ukraine,2039
2039-12-25, (),Ukraine,2039
2040-01-07, (),Ukraine,2040
2040-05-06, (),Ukraine,2040
2040-12-25, (),Ukraine,2040
2041-01-07, (),Ukraine,2041
2041-04-21, (),Ukraine,2041
2041-12-25, (),Ukraine,2041
2042-01-07, (),Ukraine,2042
2042-04-13, (),Ukraine,2042
2042-12-25, (),Ukraine,2042
2043-01-07, (),Ukraine,2043
2043-05-03, (),Ukraine,2043
2043-12-25, (),Ukraine,2043
2044-01-07, (),Ukraine,2044
2044-04-24, (),Ukraine,2044
2044-12-25, (),Ukraine,2044
1995-01-01,New Year's Day,UnitedKingdom,1995 1995-01-01,New Year's Day,UnitedKingdom,1995
1995-01-02,"New Year Holiday [Scotland], New Year's Day (Observed)",UnitedKingdom,1995 1995-01-02,"New Year Holiday [Scotland], New Year's Day (Observed)",UnitedKingdom,1995
1995-01-03,New Year Holiday [Scotland] (Observed),UnitedKingdom,1995 1995-01-03,New Year Holiday [Scotland] (Observed),UnitedKingdom,1995

Can't render this file because it is too large.

View file

@ -28,9 +28,10 @@ def utf8_to_ascii(text):
unicodedata.normalize('NFD', text) unicodedata.normalize('NFD', text)
.encode('ascii', 'ignore') .encode('ascii', 'ignore')
.decode('ascii') .decode('ascii')
.strip()
) )
# Check if anything converted # Check if anything converted
if sum(1 for x in ascii_text if x != ' ') == 0: if sum(1 for x in ascii_text if x not in [' ', '(', ')', ',']) == 0:
return 'FAILED_TO_PARSE' return 'FAILED_TO_PARSE'
else: else:
return ascii_text return ascii_text
@ -43,9 +44,11 @@ def generate_holidays_file():
years = np.arange(1995, 2045, 1) years = np.arange(1995, 2045, 1)
all_holidays = [] all_holidays = []
# class names in holiday packages which are not countries # class names in holiday packages which are not countries
# Also cut out countries with utf-8 holidays that don't parse to ascii
class_to_exclude = set([ class_to_exclude = set([
'rd', 'date', 'Lunar', 'timedelta', 'Calendar', 'Converter', 'HolidayBase', 'rd', 'date', 'Lunar', 'timedelta', 'Calendar', 'Converter', 'HolidayBase',
'DateNotExist', 'DateNotExist', 'Belarus', 'BY', 'Bulgaria', 'BG', 'Japan', 'JP', 'Serbia',
'RS', 'Ukraine', 'UA',
]) ])
class_list2 = inspect.getmembers(hdays_part2, inspect.isclass) class_list2 = inspect.getmembers(hdays_part2, inspect.isclass)
@ -78,7 +81,7 @@ def generate_holidays_file():
# Convert to ASCII, and drop holidays that fail to convert # Convert to ASCII, and drop holidays that fail to convert
generated_holidays['holiday'] = generated_holidays['holiday'].apply(utf8_to_ascii) generated_holidays['holiday'] = generated_holidays['holiday'].apply(utf8_to_ascii)
generated_holidays = generated_holidays[generated_holidays['holiday'] != 'FAILED_TO_PARSE'] assert 'FAILED_TO_PARSE' not in generated_holidays['holiday'].unique()
generated_holidays.to_csv("../R/data-raw/generated_holidays.csv", index=False) generated_holidays.to_csv("../R/data-raw/generated_holidays.csv", index=False)