Reader small image

You're reading from  Forecasting Time Series Data with Facebook Prophet

Product typeBook
Published inMar 2021
Reading LevelBeginner
PublisherPackt
ISBN-139781800568532
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Greg Rafferty
Greg Rafferty
author image
Greg Rafferty

Greg Rafferty is a data scientist in San Francisco, California. With over a decade of experience, he has worked with many of the top firms in tech, including Google, Facebook, and IBM. Greg has been an instructor in business analytics on Coursera and has led face-to-face workshops with industry professionals in data science and analytics. With both an MBA and a degree in engineering, he is able to work across the spectrum of data science and communicate with both technical experts and non-technical consumers of data alike.
Read more about Greg Rafferty

Right arrow

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

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Forecasting Time Series Data with Facebook Prophet
Published in: Mar 2021Publisher: PacktISBN-13: 9781800568532

Author (1)

author image
Greg Rafferty

Greg Rafferty is a data scientist in San Francisco, California. With over a decade of experience, he has worked with many of the top firms in tech, including Google, Facebook, and IBM. Greg has been an instructor in business analytics on Coursera and has led face-to-face workshops with industry professionals in data science and analytics. With both an MBA and a degree in engineering, he is able to work across the spectrum of data science and communicate with both technical experts and non-technical consumers of data alike.
Read more about Greg Rafferty