diff --git a/README.md b/README.md index dd4681d3..86f2f3e1 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ Our team processed and analyzed these databases to provide valuable information - selecting_reference_data (Creates visualizations and a dataset of representative citizen observations selected as baselines) - validation_labels (Flags citizen observations dropped during the data cleaning process and gives reasons for dropping them) - visualizations (Creates visualizations of the citizen and reference data) + - year_to_year_transition_times_data_generation (Creates the year_to_year_transition_time dataset) ### data (Contains CSV files of original data and data produced by the Python notebooks in code) - citizen_states_cleaned (Cleaned and reformatted citizen database sorted by states) - india_map (Geographic data used for finding the Inidan state given a set of coordinates) @@ -40,6 +41,7 @@ Our team processed and analyzed these databases to provide valuable information - selected_reference_data (Dataset of representative citizen observations selected as baselines) - species codes (Dataset mapping tree species ids to names) - validation_labels_alldata (Citizen database given by SeasonWatch with citizen observations dropped during the data cleaning process flagged and reasons for dropping them given) + - year_to_year_transition_time (Dataset of max and mean transition time and probability of phenophases) ### dev_code (Contains Python notebooks used in the development process) - jobfiles (Files of jobs submitted to shared cloud computing service) - scc-config (Config for submitting jobs to shared cloud computing service) diff --git a/code/year_to_year_transition_times_data_generation.ipynb b/code/year_to_year_transition_times_data_generation.ipynb new file mode 100644 index 00000000..3410fc2c --- /dev/null +++ b/code/year_to_year_transition_times_data_generation.ipynb @@ -0,0 +1,1432 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "id": "a1f12ee0-1d01-404a-9b28-2b2a4a7d1f87", + "metadata": {}, + "outputs": [], + "source": [ + "import pandas as pd\n", + "import numpy as np\n", + "import matplotlib.pyplot as plt\n", + "import math" + ] + }, + { + "cell_type": "markdown", + "id": "01ded875-7782-42fe-ac05-33d9def0ae30", + "metadata": {}, + "source": [ + "## Finding transition weeks\n", + "\n", + "### What is a transition week?\n", + "Transition weeks are the starting and ending week of a phenophase, for example, the first and last weeks of a tree's 'budding flowers' period. We can think of transition weeks as the first week that the percent of observations observing an attribute (say budding flowers) exceeds some small threshold, such as 10%.\n", + "\n", + "### Our approach\n", + "We compute probability distributions for the start transition week and end transition week, $p_{start}$ and $p_{end}$, which range over all weeks in a year. We do this by normalizing score functions, $s_{start}$ and $s_{end}$, which are computed with respect to the plots of the percentage of observations each week of a species which observe a particular attribute.\n", + "\n", + "### Start transition score function\n", + "$s_{start}(w)$ is large for weeks $w$ which are likely to be a start transition week. Let $y(w)$ be the percentage of observations for a species which observe the attribute in week $w$. Then: \n", + "$$\n", + " s_{start}(w) = w_1 \\left(\\frac{1}{0.1 + \\left|\\max_{w - L \\leq k \\leq w} y(k) - \\min_{w - L \\leq k \\leq w} y(k)\\right|}\\right)^2 + w_2 (\\max\\left(y(w+M) - y(w), 0\\right))\n", + "$$\n", + "a weighted sum over two terms. The first term, which we refer to as stagnation, computes the difference between the maximum and minimum percentages from $L$ weeks before week $w$ through week $w$ and is large when this difference is small. The second term, which we refer to as spike, computes the change in percentage from week $w$ to week $w+M$. This term is large when there is a large increase in percentage from week $w$ to week $w+M$.\n", + "\n", + "### End transition score function\n", + "$s_{end}(w)$ is large for weeks $w$ which are likely to be an end transition week. Let $y(w)$ be the percentage of observations for a species which observe the attribute in week $w$. Then:\n", + "$$\n", + " s_{end}(w) = w_1 \\left(\\frac{1}{0.1 + \\left|\\max_{w \\leq k \\leq w+L} y(k) - \\min_{w \\leq k \\leq w+L} y(k)\\right|}\\right)^2 + w_2 (\\max\\left(y(w-M) - y(w), 0\\right))\n", + "$$\n", + "a weighted sum over two terms. In this case, the stagnation term, computes the difference between the maximum and minimum percentages from week $w$ through week $w+L$ and is large when this difference is small. The second term, which we refer to as spike, computes the change in percentage from week $w-M$ to week $w$. This term is large when there is a large decrease in percentage from week $w-M$ to week $w$.\n", + "\n", + "### Computing the probability distributions\n", + "We compute the distribution $p_{start}$, the probability that a given week is the start transition week, by normalizing the score function $s_{start}$.\n", + "\n", + "$$\n", + " p_{start}(w) = \\frac{s_{start}(w)}{\\sum_{w \\in Y} s_{start}(w)}\n", + "$$\n", + "\n", + "We compute the distribution $p_{end}$, the probability that a given week is the start transition week, by normalizing the score function $s_{end}$.\n", + "$$\n", + " p_{end}(w) = \\frac{s_{end}(w)}{\\sum_{w \\in Y} s_{end}(w)}\n", + "$$\n", + "\n", + "### Computing Means and Standard Deviations\n", + "Means and standard deviations are computed using the same process for $p_{start}$ and $p_{end}$. Let $w_{a}$ be a start week. We compute the mean start transition time $\\mu_{start}$ as follows:\n", + "$$\n", + " \\mu_{start} = \\sum_{w = w_a}^{w_a + 48}w \\cdot p_{start}(w)\n", + "$$\n", + "We compute the standard deviation of $p_{start}$, $\\sigma_{start}$ as follows:\n", + "$$\n", + " \\sigma_{start} = \\sqrt{\\sum_{w = w_a}^{w_a + 48}(w - \\mu_{start})^2 \\cdot p_{start}(w)}\n", + "$$\n", + "In practice, we center our 48 week window over which means and standard deviations are computed around local maxima in the score function. So $w_a$ ends up being 24 weeks before each local maximum.\n", + "\n", + "### Tuning Model Parameters $w_1, w_2, L, M$\n", + "Parameters to tune are $L$ (stagnation window size), $M$ (spike window size), $w_1$ (stagnation weight), and $w_2$ (spike weight). Our best practice currently is to set $w_2=1$, $w_1 = 0.25$, which reduces the amount stagnation factors into the score, ensuring that flat periods at the peaks of the percentage plot do not get high scores. We set $L=5$, which we found to be a reasonable number of weeks to look check back to identify periods of little change in the percentage plot of an attribute for a species. Most significantly, we set $M=15$, which we found to be a reasonable estimate of the number of weeks between the transition week and the peak week of the phenophase." + ] + }, + { + "cell_type": "markdown", + "id": "be4def9d-42f4-4020-ac35-fda5b0899212", + "metadata": {}, + "source": [ + "## Helper functions / data structures" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "7e1468cd-262c-42f7-aae2-9cb4c6e62643", + "metadata": {}, + "outputs": [], + "source": [ + "# load in name_to_id lookup table\n", + "name_to_id_df = pd.read_csv('../data/species codes.csv', encoding='unicode_escape')\n", + "id_to_name_dict = {}\n", + "for _, row in name_to_id_df.iterrows():\n", + " name = \"{}-{}\".format(row['species_primary_common_name'], row['species_scientific_name']).lower().replace(' ', '')\n", + " id_to_name_dict[row['species_id']] = name" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "e8a3bc4c-7adb-452b-bc20-3514ff860263", + "metadata": {}, + "outputs": [], + "source": [ + "'''\n", + "Helper function to get the percent of observations of a species which observe an attribute for each week of a given year\n", + "\n", + "Arguments:\n", + " state_df (pandas.DataFrame) - dataframe of observations for a given state\n", + " year (int) - year to compute percents for\n", + " species_id (int) - id of the species to compute percents for\n", + " attr (string) - attribute code. ex: 'Flowers_bud'\n", + "\n", + "Returns:\n", + " pcts (list) - a python list of percents of observations of a species which observe an attribute each week.\n", + " \n", + "'''\n", + "def get_percent_of_positive_observations_for_each_week(state_df, year, species_id, attr):\n", + " # filter state dataframe to get observations for just the species with id `species_id`\n", + " species_df = state_df[state_df['Species_id'] == species_id]\n", + "\n", + " # filter species_df to only observations in the given year\n", + " species_df = species_df[species_df['Year'] == year]\n", + "\n", + " # filter species_df to only rows where the attribute `attr` is observed to be 0 (none), 1 (some), 2 (many)\n", + " species_df = species_df[species_df[attr] >= 0]\n", + "\n", + " # initialize the array `pcts`\n", + " pcts = []\n", + " for week in range(48):\n", + " species_df_week = species_df[species_df['Week'] == week] # filter species_df to only data for the week\n", + " N = len(species_df_week)\n", + " if N == 0: # if this dataframe is empty, append 0 for percentage for that week\n", + " pcts.append(0)\n", + " #pcts.append(np.nan)\n", + " else:\n", + " species_df_week_observed = species_df_week[species_df_week[attr] > 0] # make dataframe of all observations for species which observe attr that week\n", + " pcts.append(len(species_df_week_observed) / N) # compute percentage of observations of species that week which observe attr, store in array `pcts`\n", + " return pcts # return the array of percents" + ] + }, + { + "cell_type": "markdown", + "id": "56ef05c0-349a-486c-814b-618f49c9dea5", + "metadata": { + "jp-MarkdownHeadingCollapsed": true + }, + "source": [ + "## Score Function" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "83227865-4a90-4b66-9ad5-c05c11da1840", + "metadata": {}, + "outputs": [], + "source": [ + "'''\n", + "Computes scores proportional to the likelihood that a certain week is a transition week for a given attribute\n", + "\n", + "Arguments:\n", + " state_df - dataframe of all observations for a given state. example: all citizen observations with State_name 'Kerala'\n", + " species_id - id of the species, an integer. example: 1161 (id of jackfruit)\n", + " attr - the categorical attribute to get scores for. example: 'Fruits_ripe'\n", + "\n", + "Parameters of Score function:\n", + " L (integer) - size of stagnation window. Stagnation is computed as the difference between the maximum and minimum percentages of observations of the attribute `attr` \n", + " L weeks before (if phenophase_start=True) or after (if phenophase_start=False) the current week\n", + " M (integer) - size of spike window. Spike is computed as the difference in percentage between the week M weeks after (if phenophase_start=True) or before (if phenophase_start=False) the current week, and the current week\n", + " w_1 (float) - weight of the stagnation term in the score function\n", + " w_2 (float) - weight of the spike term in the score function\n", + "\n", + "Configuration Options\n", + " phenophase_start (boolean) - If True, scores are computed for the transition at the start of the phenophase (allowing the distribution of transition times for the start transition week to be reconstructed). \n", + " If False, scores are computed for the transition at the end of the phenophase (allowing the distribution of transition times for the end transition week to be reconstructed).\n", + "'''\n", + "def get_scores(state_df, species_id, attr, L=5, M=15, w_1=0.25, w_2=1, phenophase_start=True):\n", + " # compute percentage of observations of species `species_id` which observe attribute `attr` present for each week of the year, for 2018 through 2024\n", + " pcts = np.array([])\n", + " for year in range(2018, 2024):\n", + " pcts = np.concatenate([pcts, get_percent_of_positive_observations_for_each_week(state_df, year, species_id, attr)], axis = 0)\n", + " weeks = np.arange(48)\n", + " \n", + " # compute scores for start transition week distribution\n", + " if phenophase_start:\n", + "\n", + " # compile arrays of scores, stagnations, and spikes for each week\n", + " scores = []\n", + " stagns = []\n", + " spikes = []\n", + " for week in range(L, len(pcts)-M, 1): # loop through all weeks of percents, except weeks where computing score would overflow through one end of the array `pcts`\n", + " stagn = (1 / (0.1 + np.max(pcts[week-L:week+1]) - np.min(pcts[week-L:week+1])))**2 # compute stagnation term. Note that the 0.1 in denominator of `stagn` makes the 100 the maximum possible value of `stagn`.\n", + " spike = max(0, pcts[week + M] - pcts[week]) # compute spike term\n", + " spikes.append(spike)\n", + " stagns.append(stagn)\n", + " spikes = 100 * (np.array(spikes) - np.min(spikes)) / np.max(spikes) # normalize array of spikes to be between zero and 100\n", + " scores = (w_1 * np.array(stagns) + w_2 * np.array(spikes)) / 2 # take score array to be average of stagnation and spike arrays\n", + "\n", + " # add zeros for padding to end of spikes, stagnations, and scores arrays to have a score for each week of the year\n", + " spikes = np.array([0 for i in range(L)] + list(spikes) + [0 for i in range(M)]) \n", + " stagns = np.array([0 for i in range(L)] + list(stagns) + [0 for i in range(M)])\n", + " scores = np.array([0 for i in range(L)] + list(scores) + [0 for i in range(M)])\n", + "\n", + " # return the score, spike, and stagnation arrays\n", + " return scores, spikes, stagns\n", + "\n", + " # otherwise, compute scores for end transition week distribution\n", + " else:\n", + " # compile arrays of scores, stagnations, and spikes for each week\n", + " scores = []\n", + " stagns = []\n", + " spikes = []\n", + " for week in range(M, len(pcts)-L, 1): # loop through all weeks of percents, except weeks where computing score would overflow through one end of the array `pcts`\n", + " stagn = (1 / (0.1 + max(pcts[week:week+L+1]) - min(pcts[week:week+L+1])))**2 # compute stagnation term. Note that the 0.1 in denominator of `stagn` makes the 100 the maximum possible value of `stagn`\n", + " spike = max(0, pcts[week - M] - pcts[week]) # compute spike term\n", + " spikes.append(spike)\n", + " stagns.append(stagn)\n", + " spikes = 100 * (np.array(spikes) - np.min(spikes)) / np.max(spikes) # normalize array of spikes to be between zero and 100\n", + " scores = (w_1 * np.array(stagns) + w_2 * np.array(spikes)) / 2 # take score array to be average of stagnation and spike arrays\n", + "\n", + " # add zeros for padding to end of spikes, stagnations, and scores arrays to have a score for each week of the year\n", + " spikes = np.array([0 for i in range(L)] + list(spikes) + [0 for i in range(M)])\n", + " stagns = np.array([0 for i in range(L)] + list(stagns) + [0 for i in range(M)])\n", + " scores = np.array([0 for i in range(L)] + list(scores) + [0 for i in range(M)])\n", + "\n", + " # return the score, spike, and stagnation arrays\n", + " return scores, spikes, stagns" + ] + }, + { + "cell_type": "markdown", + "id": "bbbb9217-6535-45f8-ba89-1b8c4ca8def2", + "metadata": {}, + "source": [ + "## Compile and Plot Dataset of Mean Transition Times" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "11a5392f-f926-409f-adbe-77fb381bebbb", + "metadata": {}, + "outputs": [], + "source": [ + "'''\n", + " Given a dataframe for a state, a species_id, and an attribute, compute the mean and standard deviation transition times for each year\n", + " for that attribute. Return a dataframe with the information\n", + "'''\n", + "def get_means_and_stds(state_df, species_id, attr, L=5, M=3, w_1=1, w_2=1, w_3=1, state_name='Kerala'):\n", + " scores_start, spikes_start, stagns_start = get_scores(state_df, species_id, attr, L=L, M=M, w_1=w_1, w_2=w_2,\n", + " phenophase_start=True)\n", + " scores_end, spikes_end, stagns_end = get_scores(state_df, species_id, attr, L=L, M=M, w_1=w_1, w_2=w_2,\n", + " phenophase_start=False)\n", + " start_means = []\n", + " mean_start_probs = []\n", + " end_means = []\n", + " mean_end_probs = []\n", + " max_prob_start_weeks = []\n", + " max_start_probs = []\n", + " max_prob_end_weeks = []\n", + " max_end_probs = []\n", + "\n", + " for i in range(0,len(scores_start), 48):\n", + "\n", + " score_for_year = scores_start[range(i, i+48)].copy() # get scores for year\n", + " \n", + " max_start_score_idx = i+24 + np.argmax(scores_start[i+24:i+48]) # find max score in second half of year, will become 'center' of the start transition week distribution for year\n", + " max_end_score_idx = i + np.argmax(scores_end[i:i+24]) # find max score in first half of year of year, will become 'center' of the end transition week distribution for year\n", + "\n", + " start_range = range(max(0, max_start_score_idx-24), min(len(scores_start), max_start_score_idx+24)) # compute week indices of the scores in the start distribution\n", + " end_range = range(max(0, max_end_score_idx-24), min(len(scores_start), max_end_score_idx+24)) # compute week indices of scores in the ending distribution\n", + " \n", + " start_scores_for_year = scores_start[start_range].copy() # get all scores in window around center of start distribution\n", + " end_scores_for_year = scores_end[end_range].copy() # get all scores in window around center of end distribution\n", + " \n", + " start_probs_for_year = start_scores_for_year / np.sum(start_scores_for_year) # normalize scores in start window to get probabilities\n", + " end_probs_for_year = end_scores_for_year / np.sum(end_scores_for_year) # normalize scores in end window to get probabilities\n", + " \n", + " start_mean = np.dot(start_probs_for_year, start_range) # compute mean of start transition week distribution\n", + " end_mean = np.dot(end_probs_for_year, end_range) # compute mean of ending transition week distribution\n", + " start_means.append(round(start_mean % 48)) # add means to array, taking modulo 48 to convert to a week of the year, and rounding to nearest integer\n", + " end_means.append(round(end_mean % 48)) \n", + "\n", + " mean_start_probs.append((score_for_year / np.sum(start_scores_for_year))[round(start_mean % 48)])\n", + " mean_end_probs.append((score_for_year / np.sum(end_scores_for_year))[round(end_mean % 48)])\n", + " \n", + " max_start_prob = np.max(start_probs_for_year) # compute maximum probability start week\n", + " max_start_probs.append(max_start_prob)\n", + " max_end_prob = np.max(end_probs_for_year) # compute maximum probability end week \n", + " max_end_probs.append(max_end_prob) \n", + "\n", + "\n", + " max_start_week = round(max_start_score_idx % 48) # compute maximum probability start week, round to nearest integer\n", + " max_end_week = round(max_end_score_idx % 48) # compute maximum probability end week, round to nearest integer\n", + " max_prob_start_weeks.append(max_start_week)\n", + " max_prob_end_weeks.append(max_end_week)\n", + "\n", + " \"\"\"\n", + " Colum name | Description\n", + "\n", + " Species name | name of the species \n", + "\n", + " Year | year of observation\n", + "\n", + " Phenophase | plant stage of observation\n", + "\n", + " Phenophase start week | week with maximum probability for initiation\n", + "\n", + " Max Initiation probability | max probability value for initiation\n", + "\n", + " Mean initiation week | week with average probability for initiation\n", + "\n", + " Mean initiation probability | mean probability value of initiation\n", + "\n", + " Phenophase end week | week with maximum probability for end\n", + "\n", + " Max end probability | max probability value for end\n", + "\n", + " Mean end week | week with average probability for end\n", + "\n", + " Mean end probability | mean probability value for end\n", + " \"\"\"\n", + "\n", + " # Create an empty dataframe to store transition times\n", + " transition_time_df = pd.DataFrame(columns=['Species_name', 'Year', 'Phenophase', 'Phenophase_start_week',\n", + " 'Max_Initiation_probability', 'Mean_initiation_week', 'Mean_initiation_probability', 'Phenophase_end_week', 'Max_end_probability', 'Mean_end_week', 'Mean_end_probability'])\n", + "\n", + " # get species and state name\n", + " species_name = state_df[state_df['Species_id'] == species_id].iloc[0]['Species_name']\n", + " \n", + " # add all mean transition times and stds to dataframe and return the filled dataframe\n", + " # one row for each year\n", + " years = list(range(2018, 2024))\n", + " for start_mean_prob, end_mean_prob, start_mean, end_mean, start_prob, end_prob, max_start, max_end, year in zip(mean_start_probs, mean_end_probs, start_means, end_means, max_start_probs, max_end_probs, max_prob_start_weeks, max_prob_end_weeks, years):\n", + " transition_time_df.loc[len(transition_time_df)] = {'Species_name': species_name,'Year': year, 'Phenophase': attr, \n", + " 'Phenophase_start_week': max_start, 'Max_Initiation_probability': start_prob,\n", + " 'Mean_initiation_week': start_mean, 'Mean_initiation_probability': start_mean_prob, \n", + " 'Phenophase_end_week': max_end, 'Max_end_probability': end_prob,\n", + " 'Mean_end_week': end_mean, 'Mean_end_probability': end_mean_prob}\n", + " # print(transition_time_df)\n", + " return transition_time_df" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "8e0c3f0b-7261-4647-8803-c5bfee58deda", + "metadata": {}, + "outputs": [], + "source": [ + "# initialize dictionary which maps species id to a list of all attributes for which we will compute mean transition times for that species id \n", + "transition_dict = {1090: ['Flowers_bud', 'Flowers_open', 'Fruits_unripe', 'Fruits_ripe'],\n", + " 1161: ['Flowers_bud', 'Flowers_male', 'Flowers_Female', 'Fruits_unripe', 'Fruits_ripe']}\n", + "\n", + "# load all kerala observations\n", + "kerala_df = pd.read_csv('../data/citizen_states_cleaned/kerala.csv')\n", + "\n", + "# get a list of all transition dataframes, for each species_id / attr pair in transition_dict\n", + "transition_dfs = []\n", + "transition_time_df_mango_jack = []\n", + "for species_id in list(transition_dict.keys()):\n", + " for attr in transition_dict[species_id]:\n", + " transition_dfs.append(get_means_and_stds(kerala_df, species_id, attr, M=15, L=5, w_1=0.25, w_2=1)) # add transition dataframe for species / attr to the list\n", + "\n", + "# join all dataframes together\n", + "transition_time_df_mango_jack = pd.concat(transition_dfs, ignore_index=True)\n", + "transition_time_df_mango_jack.to_csv(\"../data/year_to_year_transition_time.csv\", index=False)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "82df1381", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
Species_nameYearPhenophasePhenophase_start_weekMax_Initiation_probabilityMean_initiation_weekMean_initiation_probabilityPhenophase_end_weekMax_end_probabilityMean_end_weekMean_end_probability
0Mango (all varieties)-Mangifera indica2018Flowers_bud370.080885320.04279590.078031140.001249
1Mango (all varieties)-Mangifera indica2019Flowers_bud330.083946320.061640110.087274120.001240
2Mango (all varieties)-Mangifera indica2020Flowers_bud330.074016300.06317780.07356780.000944
3Mango (all varieties)-Mangifera indica2021Flowers_bud350.071315370.07019490.06348990.001954
4Mango (all varieties)-Mangifera indica2022Flowers_bud340.064178320.056300110.068561110.003461
5Mango (all varieties)-Mangifera indica2023Flowers_bud270.135528200.01778480.07493290.002084
6Mango (all varieties)-Mangifera indica2018Flowers_open330.078766320.04308690.073493140.001177
7Mango (all varieties)-Mangifera indica2019Flowers_open360.081853340.076870110.084680130.000676
8Mango (all varieties)-Mangifera indica2020Flowers_open330.071209310.05976580.07372990.004183
9Mango (all varieties)-Mangifera indica2021Flowers_open370.066565380.06481970.063056100.001382
10Mango (all varieties)-Mangifera indica2022Flowers_open360.062426330.053500100.065309110.004448
11Mango (all varieties)-Mangifera indica2023Flowers_open270.117441200.05202990.075369100.001952
12Mango (all varieties)-Mangifera indica2018Fruits_unripe470.052219390.028195170.077346170.001203
13Mango (all varieties)-Mangifera indica2019Fruits_unripe360.076008370.047013190.071626200.002506
14Mango (all varieties)-Mangifera indica2020Fruits_unripe330.057263370.053314170.082137150.001287
15Mango (all varieties)-Mangifera indica2021Fruits_unripe460.073978410.055299150.071094170.002096
16Mango (all varieties)-Mangifera indica2022Fruits_unripe370.058415380.044795180.081649180.001720
17Mango (all varieties)-Mangifera indica2023Fruits_unripe320.089417180.015173170.070176170.005408
18Mango (all varieties)-Mangifera indica2018Fruits_ripe470.076606460.023212210.096492230.001517
19Mango (all varieties)-Mangifera indica2019Fruits_ripe470.094701450.068007230.095571240.002291
20Mango (all varieties)-Mangifera indica2020Fruits_ripe440.060988440.060988200.096430220.000306
21Mango (all varieties)-Mangifera indica2021Fruits_ripe460.080569450.071703230.074820230.001344
22Mango (all varieties)-Mangifera indica2022Fruits_ripe450.070768430.052355180.089201210.001908
23Mango (all varieties)-Mangifera indica2023Fruits_ripe290.237421140.020433180.083384200.002801
24Jackfruit-Artocarpus heterophyllus2018Flowers_bud390.093836290.00873670.162487110.066572
25Jackfruit-Artocarpus heterophyllus2019Flowers_bud300.094985310.070626110.080737120.002815
26Jackfruit-Artocarpus heterophyllus2020Flowers_bud320.069781300.06712520.07817570.000516
27Jackfruit-Artocarpus heterophyllus2021Flowers_bud240.088931330.01355390.060094100.001900
28Jackfruit-Artocarpus heterophyllus2022Flowers_bud330.065010330.065010110.081440130.005259
29Jackfruit-Artocarpus heterophyllus2023Flowers_bud280.083798200.01503450.07551780.007393
30Jackfruit-Artocarpus heterophyllus2018Flowers_male390.081075310.03307380.169346120.058593
31Jackfruit-Artocarpus heterophyllus2019Flowers_male300.092313320.072979110.077068120.002162
32Jackfruit-Artocarpus heterophyllus2020Flowers_male310.072172300.06821670.08087980.000526
33Jackfruit-Artocarpus heterophyllus2021Flowers_male240.088873320.00436290.059481100.002164
34Jackfruit-Artocarpus heterophyllus2022Flowers_male330.065127330.065127110.107912120.005845
35Jackfruit-Artocarpus heterophyllus2023Flowers_male270.112685200.05900050.08006580.006755
36Jackfruit-Artocarpus heterophyllus2018Flowers_Female390.083802310.02721870.169025120.052369
37Jackfruit-Artocarpus heterophyllus2019Flowers_Female300.088315310.072415110.077781120.002269
38Jackfruit-Artocarpus heterophyllus2020Flowers_Female320.073765300.06662270.07833180.000514
39Jackfruit-Artocarpus heterophyllus2021Flowers_Female240.092301320.00589590.061022100.002119
40Jackfruit-Artocarpus heterophyllus2022Flowers_Female330.069215330.069215110.087135130.005407
41Jackfruit-Artocarpus heterophyllus2023Flowers_Female260.100049200.02844450.07871980.006328
42Jackfruit-Artocarpus heterophyllus2018Fruits_unripe470.064519430.064160160.078017230.010342
43Jackfruit-Artocarpus heterophyllus2019Fruits_unripe350.082230350.082230200.073110220.002942
44Jackfruit-Artocarpus heterophyllus2020Fruits_unripe330.066633350.061382130.072977140.002507
45Jackfruit-Artocarpus heterophyllus2021Fruits_unripe460.066491400.016771170.070198170.001412
46Jackfruit-Artocarpus heterophyllus2022Fruits_unripe360.065657380.046096180.069877190.006932
47Jackfruit-Artocarpus heterophyllus2023Fruits_unripe320.099631200.008839210.067196190.001269
48Jackfruit-Artocarpus heterophyllus2018Fruits_ripe470.10863330.000000170.092534300.014529
49Jackfruit-Artocarpus heterophyllus2019Fruits_ripe460.073263460.073263230.089464260.002005
50Jackfruit-Artocarpus heterophyllus2020Fruits_ripe450.054720450.054720200.095168230.000681
51Jackfruit-Artocarpus heterophyllus2021Fruits_ripe460.061518460.061518230.079191230.003415
52Jackfruit-Artocarpus heterophyllus2022Fruits_ripe450.068468450.068468230.078928240.001987
53Jackfruit-Artocarpus heterophyllus2023Fruits_ripe320.141372180.057136210.076214220.005497
\n", + "
" + ], + "text/plain": [ + " Species_name Year Phenophase \\\n", + "0 Mango (all varieties)-Mangifera indica 2018 Flowers_bud \n", + "1 Mango (all varieties)-Mangifera indica 2019 Flowers_bud \n", + "2 Mango (all varieties)-Mangifera indica 2020 Flowers_bud \n", + "3 Mango (all varieties)-Mangifera indica 2021 Flowers_bud \n", + "4 Mango (all varieties)-Mangifera indica 2022 Flowers_bud \n", + "5 Mango (all varieties)-Mangifera indica 2023 Flowers_bud \n", + "6 Mango (all varieties)-Mangifera indica 2018 Flowers_open \n", + "7 Mango (all varieties)-Mangifera indica 2019 Flowers_open \n", + "8 Mango (all varieties)-Mangifera indica 2020 Flowers_open \n", + "9 Mango (all varieties)-Mangifera indica 2021 Flowers_open \n", + "10 Mango (all varieties)-Mangifera indica 2022 Flowers_open \n", + "11 Mango (all varieties)-Mangifera indica 2023 Flowers_open \n", + "12 Mango (all varieties)-Mangifera indica 2018 Fruits_unripe \n", + "13 Mango (all varieties)-Mangifera indica 2019 Fruits_unripe \n", + "14 Mango (all varieties)-Mangifera indica 2020 Fruits_unripe \n", + "15 Mango (all varieties)-Mangifera indica 2021 Fruits_unripe \n", + "16 Mango (all varieties)-Mangifera indica 2022 Fruits_unripe \n", + "17 Mango (all varieties)-Mangifera indica 2023 Fruits_unripe \n", + "18 Mango (all varieties)-Mangifera indica 2018 Fruits_ripe \n", + "19 Mango (all varieties)-Mangifera indica 2019 Fruits_ripe \n", + "20 Mango (all varieties)-Mangifera indica 2020 Fruits_ripe \n", + "21 Mango (all varieties)-Mangifera indica 2021 Fruits_ripe \n", + "22 Mango (all varieties)-Mangifera indica 2022 Fruits_ripe \n", + "23 Mango (all varieties)-Mangifera indica 2023 Fruits_ripe \n", + "24 Jackfruit-Artocarpus heterophyllus 2018 Flowers_bud \n", + "25 Jackfruit-Artocarpus heterophyllus 2019 Flowers_bud \n", + "26 Jackfruit-Artocarpus heterophyllus 2020 Flowers_bud \n", + "27 Jackfruit-Artocarpus heterophyllus 2021 Flowers_bud \n", + "28 Jackfruit-Artocarpus heterophyllus 2022 Flowers_bud \n", + "29 Jackfruit-Artocarpus heterophyllus 2023 Flowers_bud \n", + "30 Jackfruit-Artocarpus heterophyllus 2018 Flowers_male \n", + "31 Jackfruit-Artocarpus heterophyllus 2019 Flowers_male \n", + "32 Jackfruit-Artocarpus heterophyllus 2020 Flowers_male \n", + "33 Jackfruit-Artocarpus heterophyllus 2021 Flowers_male \n", + "34 Jackfruit-Artocarpus heterophyllus 2022 Flowers_male \n", + "35 Jackfruit-Artocarpus heterophyllus 2023 Flowers_male \n", + "36 Jackfruit-Artocarpus heterophyllus 2018 Flowers_Female \n", + "37 Jackfruit-Artocarpus heterophyllus 2019 Flowers_Female \n", + "38 Jackfruit-Artocarpus heterophyllus 2020 Flowers_Female \n", + "39 Jackfruit-Artocarpus heterophyllus 2021 Flowers_Female \n", + "40 Jackfruit-Artocarpus heterophyllus 2022 Flowers_Female \n", + "41 Jackfruit-Artocarpus heterophyllus 2023 Flowers_Female \n", + "42 Jackfruit-Artocarpus heterophyllus 2018 Fruits_unripe \n", + "43 Jackfruit-Artocarpus heterophyllus 2019 Fruits_unripe \n", + "44 Jackfruit-Artocarpus heterophyllus 2020 Fruits_unripe \n", + "45 Jackfruit-Artocarpus heterophyllus 2021 Fruits_unripe \n", + "46 Jackfruit-Artocarpus heterophyllus 2022 Fruits_unripe \n", + "47 Jackfruit-Artocarpus heterophyllus 2023 Fruits_unripe \n", + "48 Jackfruit-Artocarpus heterophyllus 2018 Fruits_ripe \n", + "49 Jackfruit-Artocarpus heterophyllus 2019 Fruits_ripe \n", + "50 Jackfruit-Artocarpus heterophyllus 2020 Fruits_ripe \n", + "51 Jackfruit-Artocarpus heterophyllus 2021 Fruits_ripe \n", + "52 Jackfruit-Artocarpus heterophyllus 2022 Fruits_ripe \n", + "53 Jackfruit-Artocarpus heterophyllus 2023 Fruits_ripe \n", + "\n", + " Phenophase_start_week Max_Initiation_probability Mean_initiation_week \\\n", + "0 37 0.080885 32 \n", + "1 33 0.083946 32 \n", + "2 33 0.074016 30 \n", + "3 35 0.071315 37 \n", + "4 34 0.064178 32 \n", + "5 27 0.135528 20 \n", + "6 33 0.078766 32 \n", + "7 36 0.081853 34 \n", + "8 33 0.071209 31 \n", + "9 37 0.066565 38 \n", + "10 36 0.062426 33 \n", + "11 27 0.117441 20 \n", + "12 47 0.052219 39 \n", + "13 36 0.076008 37 \n", + "14 33 0.057263 37 \n", + "15 46 0.073978 41 \n", + "16 37 0.058415 38 \n", + "17 32 0.089417 18 \n", + "18 47 0.076606 46 \n", + "19 47 0.094701 45 \n", + "20 44 0.060988 44 \n", + "21 46 0.080569 45 \n", + "22 45 0.070768 43 \n", + "23 29 0.237421 14 \n", + "24 39 0.093836 29 \n", + "25 30 0.094985 31 \n", + "26 32 0.069781 30 \n", + "27 24 0.088931 33 \n", + "28 33 0.065010 33 \n", + "29 28 0.083798 20 \n", + "30 39 0.081075 31 \n", + "31 30 0.092313 32 \n", + "32 31 0.072172 30 \n", + "33 24 0.088873 32 \n", + "34 33 0.065127 33 \n", + "35 27 0.112685 20 \n", + "36 39 0.083802 31 \n", + "37 30 0.088315 31 \n", + "38 32 0.073765 30 \n", + "39 24 0.092301 32 \n", + "40 33 0.069215 33 \n", + "41 26 0.100049 20 \n", + "42 47 0.064519 43 \n", + "43 35 0.082230 35 \n", + "44 33 0.066633 35 \n", + "45 46 0.066491 40 \n", + "46 36 0.065657 38 \n", + "47 32 0.099631 20 \n", + "48 47 0.108633 3 \n", + "49 46 0.073263 46 \n", + "50 45 0.054720 45 \n", + "51 46 0.061518 46 \n", + "52 45 0.068468 45 \n", + "53 32 0.141372 18 \n", + "\n", + " Mean_initiation_probability Phenophase_end_week Max_end_probability \\\n", + "0 0.042795 9 0.078031 \n", + "1 0.061640 11 0.087274 \n", + "2 0.063177 8 0.073567 \n", + "3 0.070194 9 0.063489 \n", + "4 0.056300 11 0.068561 \n", + "5 0.017784 8 0.074932 \n", + "6 0.043086 9 0.073493 \n", + "7 0.076870 11 0.084680 \n", + "8 0.059765 8 0.073729 \n", + "9 0.064819 7 0.063056 \n", + "10 0.053500 10 0.065309 \n", + "11 0.052029 9 0.075369 \n", + "12 0.028195 17 0.077346 \n", + "13 0.047013 19 0.071626 \n", + "14 0.053314 17 0.082137 \n", + "15 0.055299 15 0.071094 \n", + "16 0.044795 18 0.081649 \n", + "17 0.015173 17 0.070176 \n", + "18 0.023212 21 0.096492 \n", + "19 0.068007 23 0.095571 \n", + "20 0.060988 20 0.096430 \n", + "21 0.071703 23 0.074820 \n", + "22 0.052355 18 0.089201 \n", + "23 0.020433 18 0.083384 \n", + "24 0.008736 7 0.162487 \n", + "25 0.070626 11 0.080737 \n", + "26 0.067125 2 0.078175 \n", + "27 0.013553 9 0.060094 \n", + "28 0.065010 11 0.081440 \n", + "29 0.015034 5 0.075517 \n", + "30 0.033073 8 0.169346 \n", + "31 0.072979 11 0.077068 \n", + "32 0.068216 7 0.080879 \n", + "33 0.004362 9 0.059481 \n", + "34 0.065127 11 0.107912 \n", + "35 0.059000 5 0.080065 \n", + "36 0.027218 7 0.169025 \n", + "37 0.072415 11 0.077781 \n", + "38 0.066622 7 0.078331 \n", + "39 0.005895 9 0.061022 \n", + "40 0.069215 11 0.087135 \n", + "41 0.028444 5 0.078719 \n", + "42 0.064160 16 0.078017 \n", + "43 0.082230 20 0.073110 \n", + "44 0.061382 13 0.072977 \n", + "45 0.016771 17 0.070198 \n", + "46 0.046096 18 0.069877 \n", + "47 0.008839 21 0.067196 \n", + "48 0.000000 17 0.092534 \n", + "49 0.073263 23 0.089464 \n", + "50 0.054720 20 0.095168 \n", + "51 0.061518 23 0.079191 \n", + "52 0.068468 23 0.078928 \n", + "53 0.057136 21 0.076214 \n", + "\n", + " Mean_end_week Mean_end_probability \n", + "0 14 0.001249 \n", + "1 12 0.001240 \n", + "2 8 0.000944 \n", + "3 9 0.001954 \n", + "4 11 0.003461 \n", + "5 9 0.002084 \n", + "6 14 0.001177 \n", + "7 13 0.000676 \n", + "8 9 0.004183 \n", + "9 10 0.001382 \n", + "10 11 0.004448 \n", + "11 10 0.001952 \n", + "12 17 0.001203 \n", + "13 20 0.002506 \n", + "14 15 0.001287 \n", + "15 17 0.002096 \n", + "16 18 0.001720 \n", + "17 17 0.005408 \n", + "18 23 0.001517 \n", + "19 24 0.002291 \n", + "20 22 0.000306 \n", + "21 23 0.001344 \n", + "22 21 0.001908 \n", + "23 20 0.002801 \n", + "24 11 0.066572 \n", + "25 12 0.002815 \n", + "26 7 0.000516 \n", + "27 10 0.001900 \n", + "28 13 0.005259 \n", + "29 8 0.007393 \n", + "30 12 0.058593 \n", + "31 12 0.002162 \n", + "32 8 0.000526 \n", + "33 10 0.002164 \n", + "34 12 0.005845 \n", + "35 8 0.006755 \n", + "36 12 0.052369 \n", + "37 12 0.002269 \n", + "38 8 0.000514 \n", + "39 10 0.002119 \n", + "40 13 0.005407 \n", + "41 8 0.006328 \n", + "42 23 0.010342 \n", + "43 22 0.002942 \n", + "44 14 0.002507 \n", + "45 17 0.001412 \n", + "46 19 0.006932 \n", + "47 19 0.001269 \n", + "48 30 0.014529 \n", + "49 26 0.002005 \n", + "50 23 0.000681 \n", + "51 23 0.003415 \n", + "52 24 0.001987 \n", + "53 22 0.005497 " + ] + }, + "execution_count": 7, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "transition_time_df_mango_jack" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "4620dd2c", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.14" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/data/year_to_year_transition_time.csv b/data/year_to_year_transition_time.csv new file mode 100644 index 00000000..b9491160 --- /dev/null +++ b/data/year_to_year_transition_time.csv @@ -0,0 +1,55 @@ +Species_name,Year,Phenophase,Phenophase_start_week,Max_Initiation_probability,Mean_initiation_week,Mean_initiation_probability,Phenophase_end_week,Max_end_probability,Mean_end_week,Mean_end_probability +Mango (all varieties)-Mangifera indica,2018,Flowers_bud,37,0.08088498718710331,32,0.04279512677238665,9,0.0780307497454301,14,0.001249388346465557 +Mango (all varieties)-Mangifera indica,2019,Flowers_bud,33,0.08394554427554342,32,0.0616403172600257,11,0.08727415888717943,12,0.0012398500555584613 +Mango (all varieties)-Mangifera indica,2020,Flowers_bud,33,0.07401586345218211,30,0.06317690525027471,8,0.07356711778082128,8,0.0009444065021536833 +Mango (all varieties)-Mangifera indica,2021,Flowers_bud,35,0.07131514056957454,37,0.07019396187186756,9,0.06348890609117945,9,0.0019542178416212747 +Mango (all varieties)-Mangifera indica,2022,Flowers_bud,34,0.06417768655721062,32,0.05630048271013594,11,0.06856070879977254,11,0.0034609515796698376 +Mango (all varieties)-Mangifera indica,2023,Flowers_bud,27,0.13552813843287193,20,0.017784069805823175,8,0.07493240559778924,9,0.002083907245465777 +Mango (all varieties)-Mangifera indica,2018,Flowers_open,33,0.07876643236477578,32,0.04308639221408432,9,0.0734933393914526,14,0.0011765732662409399 +Mango (all varieties)-Mangifera indica,2019,Flowers_open,36,0.08185282963055508,34,0.07686961047156436,11,0.08467952347170271,13,0.000676297281430825 +Mango (all varieties)-Mangifera indica,2020,Flowers_open,33,0.07120903991880845,31,0.0597645204469252,8,0.07372938267117495,9,0.004183070587768478 +Mango (all varieties)-Mangifera indica,2021,Flowers_open,37,0.06656479414460388,38,0.06481892110505287,7,0.06305607799266127,10,0.0013823210697390155 +Mango (all varieties)-Mangifera indica,2022,Flowers_open,36,0.062425656097805246,33,0.0534995177871199,10,0.0653086124251583,11,0.0044482987661718 +Mango (all varieties)-Mangifera indica,2023,Flowers_open,27,0.11744112835823181,20,0.052028982197764716,9,0.07536882275529773,10,0.0019516620061376638 +Mango (all varieties)-Mangifera indica,2018,Fruits_unripe,47,0.05221901394662411,39,0.028194703262842236,17,0.0773462504152274,17,0.0012029958572396032 +Mango (all varieties)-Mangifera indica,2019,Fruits_unripe,36,0.07600790482771122,37,0.047013082365926294,19,0.07162604671384254,20,0.002505672118939341 +Mango (all varieties)-Mangifera indica,2020,Fruits_unripe,33,0.05726313004391452,37,0.053313999964292674,17,0.08213675524316402,15,0.0012868761902291124 +Mango (all varieties)-Mangifera indica,2021,Fruits_unripe,46,0.0739783104694762,41,0.0552988856770169,15,0.07109440893081913,17,0.002096028954649008 +Mango (all varieties)-Mangifera indica,2022,Fruits_unripe,37,0.058414820413826944,38,0.04479475802156803,18,0.08164912304323176,18,0.001720307002572356 +Mango (all varieties)-Mangifera indica,2023,Fruits_unripe,32,0.08941715979325761,18,0.015172730738683584,17,0.07017614289579796,17,0.00540821814844667 +Mango (all varieties)-Mangifera indica,2018,Fruits_ripe,47,0.07660588404961818,46,0.02321179044753807,21,0.09649249134111666,23,0.0015171659194132565 +Mango (all varieties)-Mangifera indica,2019,Fruits_ripe,47,0.09470073070537229,45,0.06800699720730438,23,0.09557104751305605,24,0.002290545598590664 +Mango (all varieties)-Mangifera indica,2020,Fruits_ripe,44,0.06098810333263792,44,0.06098810333263792,20,0.09642982520525827,22,0.00030580313993930656 +Mango (all varieties)-Mangifera indica,2021,Fruits_ripe,46,0.08056891347439239,45,0.07170279981807855,23,0.07482019052132093,23,0.001344453649796237 +Mango (all varieties)-Mangifera indica,2022,Fruits_ripe,45,0.07076849640677753,43,0.052354837641447736,18,0.08920087085515255,21,0.0019075891677205218 +Mango (all varieties)-Mangifera indica,2023,Fruits_ripe,29,0.23742054087703007,14,0.020433465385622504,18,0.08338401807892692,20,0.0028012208713271685 +Jackfruit-Artocarpus heterophyllus,2018,Flowers_bud,39,0.09383578905884281,29,0.008735608109954354,7,0.16248723656608202,11,0.06657161196489766 +Jackfruit-Artocarpus heterophyllus,2019,Flowers_bud,30,0.09498529956508991,31,0.07062629300553837,11,0.08073698858473895,12,0.002815123530087029 +Jackfruit-Artocarpus heterophyllus,2020,Flowers_bud,32,0.06978051992067529,30,0.0671245020638795,2,0.07817500403228168,7,0.0005164507784224687 +Jackfruit-Artocarpus heterophyllus,2021,Flowers_bud,24,0.0889307314680285,33,0.013552830375303406,9,0.06009380051637287,10,0.0018998422812614277 +Jackfruit-Artocarpus heterophyllus,2022,Flowers_bud,33,0.06501008154927579,33,0.06501008154927579,11,0.08143983435607806,13,0.0052588226366139905 +Jackfruit-Artocarpus heterophyllus,2023,Flowers_bud,28,0.08379768672613391,20,0.015034360634016869,5,0.07551689115315956,8,0.007392549583211873 +Jackfruit-Artocarpus heterophyllus,2018,Flowers_male,39,0.08107524764807816,31,0.03307315392305186,8,0.16934607506833876,12,0.05859289549298758 +Jackfruit-Artocarpus heterophyllus,2019,Flowers_male,30,0.09231325364179493,32,0.07297890133893886,11,0.07706754477536189,12,0.0021623637729761944 +Jackfruit-Artocarpus heterophyllus,2020,Flowers_male,31,0.07217150368288543,30,0.0682155345726766,7,0.08087911337708477,8,0.0005264535913345083 +Jackfruit-Artocarpus heterophyllus,2021,Flowers_male,24,0.08887312474222814,32,0.004361605149501804,9,0.05948095711860728,10,0.002164311317627619 +Jackfruit-Artocarpus heterophyllus,2022,Flowers_male,33,0.06512718596986401,33,0.06512718596986401,11,0.10791210442074367,12,0.005844568325469138 +Jackfruit-Artocarpus heterophyllus,2023,Flowers_male,27,0.1126853436392434,20,0.058999506034537345,5,0.08006489849416495,8,0.0067554667539375885 +Jackfruit-Artocarpus heterophyllus,2018,Flowers_Female,39,0.08380217045641147,31,0.027218406328789656,7,0.1690251932075283,12,0.052368542747286584 +Jackfruit-Artocarpus heterophyllus,2019,Flowers_Female,30,0.08831526702738607,31,0.07241517299003616,11,0.07778147323666777,12,0.002268859493209862 +Jackfruit-Artocarpus heterophyllus,2020,Flowers_Female,32,0.07376492922780675,30,0.0666218016638476,7,0.07833064245238949,8,0.0005142143010108651 +Jackfruit-Artocarpus heterophyllus,2021,Flowers_Female,24,0.09230108964926594,32,0.005895042855349623,9,0.061021742582791944,10,0.0021189792290767077 +Jackfruit-Artocarpus heterophyllus,2022,Flowers_Female,33,0.06921492420278381,33,0.06921492420278381,11,0.0871346690008773,13,0.00540708995311986 +Jackfruit-Artocarpus heterophyllus,2023,Flowers_Female,26,0.10004892836133468,20,0.02844411450493433,5,0.07871909809648953,8,0.006327888443784244 +Jackfruit-Artocarpus heterophyllus,2018,Fruits_unripe,47,0.06451892440073523,43,0.06416025730334432,16,0.07801730689204904,23,0.010342472513997402 +Jackfruit-Artocarpus heterophyllus,2019,Fruits_unripe,35,0.0822298239212606,35,0.0822298239212606,20,0.07311007255014854,22,0.0029419318178963176 +Jackfruit-Artocarpus heterophyllus,2020,Fruits_unripe,33,0.06663251382381197,35,0.061382092339079895,13,0.07297663207098724,14,0.00250731000683603 +Jackfruit-Artocarpus heterophyllus,2021,Fruits_unripe,46,0.06649120214553059,40,0.01677115850513586,17,0.07019802209374525,17,0.0014121928808661106 +Jackfruit-Artocarpus heterophyllus,2022,Fruits_unripe,36,0.06565706866817984,38,0.046096251290414225,18,0.06987748496211349,19,0.006931765497449488 +Jackfruit-Artocarpus heterophyllus,2023,Fruits_unripe,32,0.09963090743285999,20,0.00883919859909583,21,0.06719573816627647,19,0.0012690311101318115 +Jackfruit-Artocarpus heterophyllus,2018,Fruits_ripe,47,0.10863317460630238,3,0.0,17,0.09253407830715321,30,0.014529216303803506 +Jackfruit-Artocarpus heterophyllus,2019,Fruits_ripe,46,0.07326270995134132,46,0.07326270995134132,23,0.08946392197882509,26,0.0020047635753238507 +Jackfruit-Artocarpus heterophyllus,2020,Fruits_ripe,45,0.054719954335262354,45,0.054719954335262354,20,0.09516774819004628,23,0.0006808586001949606 +Jackfruit-Artocarpus heterophyllus,2021,Fruits_ripe,46,0.06151770995768085,46,0.06151770995768085,23,0.07919058714255232,23,0.0034154970877684574 +Jackfruit-Artocarpus heterophyllus,2022,Fruits_ripe,45,0.0684679548684042,45,0.0684679548684042,23,0.07892790276911088,24,0.0019871231276574488 +Jackfruit-Artocarpus heterophyllus,2023,Fruits_ripe,32,0.14137155052222639,18,0.057136085798023026,21,0.07621426619009106,22,0.005497208614757275