Adding default country holidays
Prophet uses the Python holidays
package to populate a default list of holidays by country and, optionally, by state or province. To specify which region to build a holiday list for, Prophet requires the name or ISO code of that country. A complete list of all countries available, with their ISO codes, and also any states or provinces that can be included, can be viewed in the package's README
file here: https://github.com/dr-prodigy/python-holidays#available-countries.
To add the default holidays, Prophet includes an add_country_holidays
method, which simply takes the ISO code for that country. Let's walk through an example using the Divvy dataset again, first adding holidays for the United States, and then including a few additional holidays specific to Illinois, as Divvy is located in Chicago.
We begin just as we have learned to do with our other models in this book, by importing the necessary libraries, loading our data, and instantiating...