<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Working with FB Prophet
begin with Quick Start example from FB page
Lok at time series of daily page views fro the Wikipedia page for Peyton Manning. The csv is available here
Step1:  Fit the model by instantiating a new Prophet object. Any settings required for the forecasting procedure are passed to this object upon construction. You then can call this object's fit method and pass in the historical dataframe. Fitting should take 1-5 seconds.
Step2:  Predictions are then made on a dataframe with a column ds containing the dates for which a prediction is to be made. You can get a suitable dataframe that extends into the future a specified number of days using the helper method Prophet.make_future_dataframe. By default it will also include the dates from the history, so we will see the model fit as well.
Step3:  The predict method will assign each row in future a predicted value which it names yhat. If you pass in historical dates, it will provide an in-sample fit. The forecast object here is a new dataframe that includes a column yhat with the forecast, as well as columns for components and uncertainty intervals.
Step4:  You can plot the forecast by calling the Prophet.plot method and passing in your forecast dataframe
Step5:  If you want to see the forecast components, you can use the Prophet.plot_components method. By default you’ll see the trend, yearly seasonality, and weekly seasonality of the time series. 
If you include holidays, you’ll see those here, too.
<ASSISTANT_TASK:>
Python Code:
peyton_dataset_url = 'https://github.com/facebookincubator/prophet/blob/master/examples/example_wp_peyton_manning.csv'
peyton_filename = '../datasets/example_wp_peyton_manning.csv'
import pandas as pd
import numpy as np
from fbprophet import Prophet
# NB: this didn't work as of 8/22/17
#import io
#import requests
#s=requests.get(peyton_dataset_url).content
#df=pd.read_csv(io.StringIO(s.decode('utf-8')))#df = pd.read_csv(peyton_dataset_url)
df = pd.read_csv(peyton_filename)
# transform to log scale
df['y']=np.log(df['y'])
df.head()
Explanation: Working with FB Prophet
begin with Quick Start example from FB page
Lok at time series of daily page views fro the Wikipedia page for Peyton Manning. The csv is available here
End of explanation
m = Prophet()
m.fit(df);
Explanation: Fit the model by instantiating a new Prophet object. Any settings required for the forecasting procedure are passed to this object upon construction. You then can call this object's fit method and pass in the historical dataframe. Fitting should take 1-5 seconds.
End of explanation
future = m.make_future_dataframe(periods=365)
future.tail()
Explanation: Predictions are then made on a dataframe with a column ds containing the dates for which a prediction is to be made. You can get a suitable dataframe that extends into the future a specified number of days using the helper method Prophet.make_future_dataframe. By default it will also include the dates from the history, so we will see the model fit as well.
End of explanation
forecast = m.predict(future)
forecast[['ds','yhat','yhat_lower','yhat_upper']].tail()
Explanation: The predict method will assign each row in future a predicted value which it names yhat. If you pass in historical dates, it will provide an in-sample fit. The forecast object here is a new dataframe that includes a column yhat with the forecast, as well as columns for components and uncertainty intervals.
End of explanation
m.plot(forecast)
Explanation: You can plot the forecast by calling the Prophet.plot method and passing in your forecast dataframe
End of explanation
m.plot_components(forecast)
Explanation: If you want to see the forecast components, you can use the Prophet.plot_components method. By default you’ll see the trend, yearly seasonality, and weekly seasonality of the time series. 
If you include holidays, you’ll see those here, too.
End of explanation
<END_TASK>