# Foot Traffic Wuerzburg: Retail Forecasting 2.0 — Data

来源：https://www.kaggle.com/competitions/foot-traffic-wuerzburg-retail-forecasting-2-0/data

采集时间：2026-10-19T19:00:02Z

**Jupyter Notebook for Quickstart:** Part of the uploads is also the file `quickstart_demo.ipynb` which includes–like the name suggests–a quick start guide to load the data, do descriptive analytics and run+evaluate your first models.

---

In this competition, your goal is to forecast **hourly customer counts for Company A** and **hourly sales across three product categories for Company B**, both located in the city center of Würzburg, Germany. The data is structured as a time series and spans multiple sources including transactions, foot traffic, weather, holidays, and event data.

Each observation of company sales or customers refers to a full hour — for example, an entry timestamped at 8:00 corresponds to the interval **8:00–8:59**.
⚠️ **Note:** This time alignment differs from the foot traffic and weather data — see below for details.

---

## Datasets Overview

```python
train.csv, test.csv
  │
  ├── Company metadata
  │     ├─ 1_companyA_info.csv
  │     ├─ 1_companyB_info.csv
  │     ├─ 1_companyA_openingHours.csv
  │     └─ 1_companyB_openingHours.csv
  │
  ├── Pedestrians & Weather
  │     ├─ 2_pedestrians_weather_train.csv
  │     ├─ 2_pedestrians_weather_val_test.csv
  │     ├─ 2_pedestrians_val_test_forecasts.csv
  │     └─ 2_pedestrians_counter_locations.csv
  │
  └── Events & Holidays
        ├─ 3_bavarian_public_holidays_daily.csv
        ├─ 3_bavarian_school_holidays_daily.csv
        ├─ 3_lectures_daily.csv
        ├─ 3_events_daily.csv
        └─ 3_events_detailed.csv
```

---

### 🎯 **Training and Test Data**

* `train.csv`: Historical training data with targets for all companies and categories.
* `test.csv`: Contains the **public leaderboard (validation)** and **private leaderboard (final test)** periods. You must submit predictions for each row.
* `sample_submission.csv`: Shows the exact required submission format.
  ⚠️ **Your submission you upload to kaggle must match this format exactly** — otherwise it cannot be scored.

#### Format Details:

* All target values (customer counts and category-level sales) are stored in a **single column** named `target`.
* Each row includes a `category` field, which identifies the type of target:

  * `customers` – hourly customer count for Company A
  * `revenue_a`, `revenue_b`, `revenue_c` – hourly sales for each product category of Company B
* The `id` column is a concatenation of:

  * `company` + `date` + `hour` + `category`
    (e.g., `companyA_2024-09-12_08_customers`)

📏 **Note:** The target values in both the training and test sets have been **normalized to the range \[0, 1]** for anonymization purposes. No information is provided to reverse this normalization — predictions should also be submitted in this normalized format.

📏 **Note 2:** For Company B, the revenues can in rare cases be negative. This corresponds to refunds on previously brought products.

---

### 🕒 **Company Metadata and Opening Hours**

* `1_companyA_info.csv`, `1_companyB_info.csv`: Gives the closest foot traffic measurement station to the store.
* `1_companyA_openingHours.csv`, `1_companyB_openingHours.csv`: Info about the opening hours of each company for every weekday.
  🔒 **Predictions are only required when the company is open.**

📏 Note: The opening hours provided here are the current opening hours of each store. It is entirely possible that the opening hours differed during certain periods within the training time frame. Overall, however, the opening hours provided should sufficiently reflect the historical opening hours.

---

### 🚶‍♀️ **Foot Traffic Data (Auxiliary)**

To support your forecasts, you are provided with pedestrian foot traffic data from three central streets:
**Schoenbornstrasse** (green), **Kaiserstrasse** (red), and **Spiegelstrasse** (blue).

* `2_pedestrians_val_test_forecasts.csv`: **Forecasted foot traffic** for the validation and test periods.
  ⚠️ **Actual pedestrian counts are not provided** for these periods.
  These forecasts were generated by the **best model from the prior [Foot Traffic Würzburg](https://www.kaggle.com/competitions/foot-traffic-wue/)** competition.

For training, you are provided with:

* `2_pedestrians_weather_train.csv`: Actual foot traffic counts and **weather data**
* `2_pedestrians_weather_val_test.csv`: Actual **weather data** for validation and test periods

#### Foot Traffic Variables:

* `n_pedestrians`: total count
* `n_pedestrians_towards`: walking **towards** the city center
* `n_pedestrians_away`: walking **away** from the city center

📍 The file `2_pedestrians_counter_locations.csv` contains the locations of the three counters. In the company info mentioned earlier, it is also indicated which counter is **closest to each company**.

#### ⏰ Time Alignment Warning:

* For pedestrian and weather data, an entry at hour **8** refers to the interval **7:30–8:29**.
* For the targets (sales and customer counts), hour **8** refers to **8:00–8:59**.
  ⚠️ Be careful when merging data across sources!

---

### 🌤️🗓️ **Contextual Features (Events, Holidays, Lectures)**

Additional calendar-based variables are provided to help explain short-term spikes and drops in customer activity and sales:

* `3_bavarian_public_holidays_daily.csv`: Public holidays in Bavaria
* `3_bavarian_school_holidays_daily.csv`: School vacation days
* `3_lectures_daily.csv`: Lecture days and term breaks at the local university
* `3_events_daily.csv`: Binary flags for days with known events
* `3_events_detailed.csv`: Rich metadata on local events (e.g., type, start/end time)

These features are date-aligned and can be used to identify periods of unusually high or low foot traffic and sales behavior.
