Skip to content

Commit

Permalink
Update README badges and site nav (facebook#2261)
Browse files Browse the repository at this point in the history
  • Loading branch information
tcuongd authored Sep 5, 2022
1 parent 062e9a1 commit 271268a
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 38 deletions.
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
# Prophet: Automatic Forecasting Procedure

![Build](https://github.com/facebook/prophet/workflows/Build/badge.svg)
[![Pypi_Version](https://img.shields.io/pypi/v/prophet.svg)](https://pypi.python.org/pypi/prophet)

[![PyPI Version](https://img.shields.io/pypi/v/prophet.svg)](https://pypi.python.org/pypi/prophet)
[![PyPI Downloads Monthly](https://pepy.tech/badge/prophet/month)](https://pepy.tech/project/prophet)
[![PyPI Downloads All](https://pepy.tech/badge/prophet)](https://pepy.tech/project/prophet)

[![CRAN Version](https://www.r-pkg.org/badges/version/prophet)](https://CRAN.R-project.org/package=prophet)
[![CRAN Downloads Monthly](https://cranlogs.r-pkg.org/badges/prophet?color=brightgreen)](https://cran.r-project.org/package=prophet)
[![CRAN Downloads All](https://cranlogs.r-pkg.org/badges/grand-total/prophet?color=brightgreen)](https://cranlogs.r-pkg.org/badges/grand-total/prophet)

[![Conda_Version](https://anaconda.org/conda-forge/prophet/badges/version.svg)](https://anaconda.org/conda-forge/prophet/)
[![CRAN status](https://www.r-pkg.org/badges/version/prophet)](https://CRAN.R-project.org/package=prophet)

Prophet is a procedure for forecasting time series data based on an additive model where non-linear trends are fit with yearly, weekly, and daily seasonality, plus holiday effects. It works best with time series that have strong seasonal effects and several seasons of historical data. Prophet is robust to missing data and shifts in the trend, and typically handles outliers well.

Expand Down
1 change: 1 addition & 0 deletions docs/_data/nav_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- id: outliers
- id: non-daily_data
- id: diagnostics
- id: handling_shocks
- id: additional_topics
- id: contributing

Expand Down
26 changes: 4 additions & 22 deletions docs/_docs/handling_shocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,12 @@ docid: "handling_shocks"
title: "Handling Shocks"
permalink: /docs/handling_shocks.html
subsections:
- title: Case Study - Pedestrian Activity
id: case-study---pedestrian-activity
- title: Default model without any adjustments
id: default-model-without-any-adjustments
- title: Treating COVID-19 lockdowns as a one-off holidays
id: treating-covid-19-lockdowns-as-a-one-off-holidays
- title: Sense checking the trend
id: sense-checking-the-trend
- title: Changes in seasonality between pre- and post-COVID
id: changes-in-seasonality-between-pre--and-post-covid
- title: Further reading
id: further-reading
---

As a result of the lockdowns caused by the COVID-19 pandemic, many time series experienced "shocks" during 2020, e.g. spikes in media consumption (Netflix, YouTube), e-commerce transactions (Amazon, eBay), whilst attendance to in-person events declined dramatically.
Expand All @@ -41,7 +35,7 @@ In this page we'll explore some strategies for capturing these effects using Pro

<a id="case-study---pedestrian-activity"> </a>

### Case Study - Pedestrian Activity
#### Case Study - Pedestrian Activity



Expand All @@ -54,7 +48,7 @@ The aggregated dataset can be found in the examples folder [here](https://github

```python
# Python
df = pd.read_csv('../examples/example_pedestrians_covid.csv')
df = pd.read_csv('https://raw.githubusercontent.com/facebook/prophet/main/examples/example_pedestrians_covid.csv')
```
```python
# Python
Expand All @@ -79,7 +73,7 @@ There are also shorter periods of strict lockdown that lead to sudden tips in th

<a id="default-model-without-any-adjustments"> </a>

### Default model without any adjustments
#### Default model without any adjustments



Expand All @@ -93,9 +87,6 @@ m = m.fit(df)
future = m.make_future_dataframe(periods=366)
forecast = m.predict(future)
```
02:53:41 - cmdstanpy - INFO - Chain [1] start processing
02:53:41 - cmdstanpy - INFO - Chain [1] done processing


```python
# Python
Expand Down Expand Up @@ -227,9 +218,6 @@ m2 = m2.fit(df)
future2 = m2.make_future_dataframe(periods=366)
forecast2 = m2.predict(future2)
```
02:53:44 - cmdstanpy - INFO - Chain [1] start processing
02:53:45 - cmdstanpy - INFO - Chain [1] done processing


```python
# Python
Expand Down Expand Up @@ -311,9 +299,6 @@ m3 = Prophet(holidays=lockdowns, changepoints=m3_changepoints, changepoint_prior
m3 = m3.fit(df)
forecast3 = m3.predict(future2)
```
02:53:49 - cmdstanpy - INFO - Chain [1] start processing
02:53:52 - cmdstanpy - INFO - Chain [1] done processing


```python
# Python
Expand Down Expand Up @@ -380,9 +365,6 @@ m4.add_seasonality(
# Python
m4 = m4.fit(df2)
```
02:53:55 - cmdstanpy - INFO - Chain [1] start processing
02:53:56 - cmdstanpy - INFO - Chain [1] done processing


We also need to create the `pre_covid` and `post_covid` flags in the future dataframe. This is so that Prophet can apply the correct weekly seasonality parameters to each future date.

Expand Down Expand Up @@ -420,7 +402,7 @@ Interestingly, the model with conditional seasonalities suggests that, post-COVI

<a id="further-reading"> </a>

### Further reading
#### Further reading



Expand Down
33 changes: 19 additions & 14 deletions notebooks/handling_shocks.ipynb

Large diffs are not rendered by default.

0 comments on commit 271268a

Please sign in to comment.