The Chestnut tree in Geneva¶
Since 1818, the arrival of spring in Geneva has been celebrated by the first bud of a chestnut tree on the Promenade de la Treille. This tradition, holds significant cultural importance for the people of Geneva. The event is widely publicized by the press, and each year's budding date is recorded on a parchment-covered board displayed in the State Council room. The current official chestnut tree, the fourth in the lineage since 1929, stands at the eastern end of the promenade. Some related activities include the annual First Leaf Festival and the nearby 'banc de la Treille', known as the world's longest bench at 120 meters. This celebration of spring, alongside Geneva's other green landmarks like the Horloge fleurie and the Jet d'eau, pays homage to the city's rich botanical heritage dating back to the 18th century.
In this notebook we aim to study the celebrated date of the first bud and the change in its timing throughout the year. The final goal is to see whether climate change hass affected the spring arrival time.
The dataset we have contains the first bud date since 1818 till 2023 observed by the secretary of the Grand Council of Geneva. The data was retirevied from the two follwoing official ressources:
- https://ge.ch/grandconseil/data/divers_publication_pdf/marronnier_officiel.pdf
- https://www.geneve.ch/fr/marronnier-treille
The excel final comipiled version can be accessed here: https://docs.google.com/spreadsheets/d/1rQNY5ZNXF-eE2WVilKrpqYePxPmNpiJpsRR-dAOCzlY/edit?usp=sharing
Data analysis¶
In this section, we will prepare the data for constructing the timeline chart. To do this, we did the following steps:
- Unified months name and turned them to number.
- Checked for null values (none), and corrected mistakes.
- extracted the day of the year.
1 2 3 4 5 | ## importing the required libraries import pandas as pd import numpy as np import matplotlib.pyplot as plt from matplotlib.ticker import (MultipleLocator, AutoMinorLocator) |
1 2 | ## importing the dataset df = pd.read_csv(".\chestnut.csv") |
1 2 | ## having a look at the data df.head() |
| day | month | year | |
|---|---|---|---|
| 0 | 16 | mars | 1818 |
| 1 | 1 | avril | 1819 |
| 2 | 6 | avril | 1820 |
| 3 | 10 | avril | 1821 |
| 4 | 17 | mars | 1822 |
1 2 | ## studying the name of the month df['month'].unique() |
array(['mars', 'avril', 'April', 'March', 'fevrier', 'January', 'jonvier',
'decembre'], dtype=object)
1 2 3 | ## uniforming the name of the months and turning them to numbers replace = {'April': 4, 'March': 3, 'January': 1, 'jonvier': 1, 'avril': 4, 'mars': 3, 'fevrier':2, 'decembre': 12} df['month'] = df['month'].map(replace) |
1 2 | ## looking at the statistics of the data df.describe() |
| day | month | year | |
|---|---|---|---|
| count | 206.000000 | 206.000000 | 206.000000 |
| mean | 15.747573 | 3.155340 | 1949.621359 |
| std | 8.824819 | 0.913394 | 427.195074 |
| min | 1.000000 | 1.000000 | 1818.000000 |
| 25% | 8.000000 | 3.000000 | 1869.250000 |
| 50% | 16.000000 | 3.000000 | 1920.500000 |
| 75% | 23.000000 | 4.000000 | 1971.750000 |
| max | 31.000000 | 12.000000 | 7992.000000 |
1 2 | ## correcting year 1991 df['year'].replace(7992, 1992, inplace=True) |
1 2 | ## checking for data types and null values, all good df.info() |
<class 'pandas.core.frame.DataFrame'> RangeIndex: 206 entries, 0 to 205 Data columns (total 3 columns): # Column Non-Null Count Dtype --- ------ -------------- ----- 0 day 206 non-null int64 1 month 206 non-null int64 2 year 206 non-null int64 dtypes: int64(3) memory usage: 5.0 KB
1 2 3 | ## extracting the day of the year from the information df['date'] = pd.to_datetime(dict(year=df.year, month=df.month, day=df.day)) df['doy'] = df['date'].dt.dayofyear |
Constructing the graph¶
To construct the graph, we needed to do the follwing steps:
- Caluclate the mean of the day of the year over periods of 10 years
- Change the scale to start from 9 december as the zero point
- Plot the line graphs of the day of the year and the 10-year average over the period from 1818 to 2023.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | ## disable warnings import warnings warnings.filterwarnings('ignore') ## change the scale to start from 9 december as the zero point df['doy'] = np.where(df['month']==12, 9, df['doy']+11) ## caluclate the mean of the day of the year over periods of 10 years y_line = df['doy'].rolling(10).mean().shift(-1) ## plotting the line graphs fig, ax = plt.subplots() ## plotting the line graph of the day of the year plt.plot(df['year'], df['doy'], marker='o', color='black', markersize=4, markerfacecolor='red') ## plotting he line graph of the 10 year average plt.plot(df['year'], y_line, color='red') ## setting the limits of the x and y axis plt.xlim(1800, 2050) plt.ylim(0, 140) ## add minor ticks to the x and y axis ax.xaxis.set_minor_locator(MultipleLocator(10)) ax.yaxis.set_minor_locator(MultipleLocator(5)) ## changing the labels of the y axis ticks labels = ['29-déc.', '9-janv.','29-janv.', '18-févr.', '9-mars', '29-mars', '18-avr.', '8-mai'] ax.set_yticklabels(labels) ## adding gridlines plt.grid(which='major', alpha=0.5) plt.grid(which='minor', alpha=0.25) ## adding text to the data plt.text(x = 1805, y = 20, s = "Date d'éclosion", fontsize = 15,fontweight='bold') plt.text(x = 1805, y = 13, s = "marronnier officiel de Genève", fontsize = 8, fontweight='bold') plt.text(x = 1805, y =6, s = "Data: https://ge.ch/grandconseil/data/divers_publication_pdf/marronnier_officiel.pdf", fontsize = 6) |
Text(1805, 6, 'Data: https://ge.ch/grandconseil/data/divers_publication_pdf/marronnier_officiel.pdf')
Conclusions and perspectives:¶
The timing of the horse chestnut tree's budbreak in Geneva exhibits significant variability. In 1816, buds first emerged on April 23rd, while the earliest recorded date was the 29 th of December, 2002. A noticeable trend towards earlier budbreak dates has been evident since 1900, attributed to factors such as global climate change, alterations in the local environment, and increased urban warming. However, in recent years, this trend has shown signs of reversal, although the exact causes remain unclear. Potential factors include changes within the tree itself, shifts in environmental conditions, or alterations in its response to temperature fluctuations. Following the death of the official tree in the summer of 2015, observations have been conducted on a new tree.