Metadata-Version: 2.1
Name: pyCDM4F
Version: 0.0.7
Summary: Package for Predicting Plant Phenology with ChillDay-Model(CDM), which has Parameter Examination, Visualization, Clustering and so on... with Phenology & Meteorological Data.
Home-page: https://github.com/CSBL-urap/2024-summer-swkim
Author: Songwon Kim
Author-email: kimsongwon10@korea.ac.kr
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: backports.tarfile==1.2.0
Requires-Dist: beautifulsoup4==4.12.3
Requires-Dist: bs4==0.0.2
Requires-Dist: certifi==2024.6.2
Requires-Dist: charset-normalizer==3.3.2
Requires-Dist: colorama==0.4.6
Requires-Dist: contourpy==1.1.1
Requires-Dist: cycler==0.12.1
Requires-Dist: docutils==0.20.1
Requires-Dist: et-xmlfile==1.1.0
Requires-Dist: fonttools==4.53.1
Requires-Dist: idna==3.7
Requires-Dist: importlib_metadata==8.5.0
Requires-Dist: importlib_resources==6.4.0
Requires-Dist: jaraco.classes==3.4.0
Requires-Dist: jaraco.context==6.0.1
Requires-Dist: jaraco.functools==4.1.0
Requires-Dist: joblib==1.4.2
Requires-Dist: keyring==25.5.0
Requires-Dist: kiwisolver==1.4.5
Requires-Dist: lxml==5.3.0
Requires-Dist: markdown-it-py==3.0.0
Requires-Dist: matplotlib==3.7.5
Requires-Dist: mdurl==0.1.2
Requires-Dist: more-itertools==10.5.0
Requires-Dist: nh3==0.2.20
Requires-Dist: numpy==1.24.4
Requires-Dist: openpyxl==3.1.5
Requires-Dist: packaging==24.1
Requires-Dist: pandas==2.0.3
Requires-Dist: patsy==0.5.6
Requires-Dist: pillow==10.4.0
Requires-Dist: pkginfo==1.12.0
Requires-Dist: Pygments==2.19.0
Requires-Dist: pyparsing==3.1.2
Requires-Dist: python-dateutil==2.9.0.post0
Requires-Dist: pytz==2024.1
Requires-Dist: pywin32-ctypes==0.2.3
Requires-Dist: readme_renderer==43.0
Requires-Dist: requests==2.32.3
Requires-Dist: requests-toolbelt==1.0.0
Requires-Dist: rfc3986==2.0.0
Requires-Dist: rich==13.9.4
Requires-Dist: scikit-learn==1.3.2
Requires-Dist: scipy==1.10.1
Requires-Dist: seaborn==0.13.2
Requires-Dist: six==1.16.0
Requires-Dist: soupsieve==2.5
Requires-Dist: statsmodels==0.14.1
Requires-Dist: threadpoolctl==3.5.0
Requires-Dist: tqdm==4.67.1
Requires-Dist: twine==6.0.1
Requires-Dist: typing_extensions==4.12.2
Requires-Dist: tzdata==2024.1
Requires-Dist: urllib3==2.2.2
Requires-Dist: zipp==3.20.2

# pyCDM4F: (p)ython (C)hill-(D)ay (M)odel (f)or (F)lowering date

## What is pyCDM4F?

[github](https://github.com/CSBL-urap/2024-summer-swkim)

pyCDM4F is Python package designed to guide the overall analysis procedure for **Budding & Flowering Prediction** specially tailored to **your target plant**. It offers useful functions including, **Downloading & Merging phenological and meteorological data, Key Parameter Examination, Visualization, Clustering**... and so on. The Chill-Day Model provided by this package demonstrates the highest prediction accuracy for Korean local areas among previously published models. Additionally, pyCDM4F has a broder objective: to become a generalized, open source tool for **accruate prediction of plant phenology** and to provide **insights and scientific research on phenological shift** in many regions affected by global warming.


What is **Chill-Day Model** and How to apply? (*References*)
- [Chilling and forcing model to predict bud-burst of crop and forest species](https://www.sciencedirect.com/science/article/pii/S0168192304000632)
- [Prediction of Blooming Dates of Spring Flowers by Using Digital Temperature Forecasts and Phenology Models](https://www.researchgate.net/publication/263399406_Prediction_of_Blooming_Dates_of_Spring_Flowers_by_Using_Digital_Temperature_Forecasts_and_Phenology_Models)


## Table of Contents

[How to use pyCDM4F?]()

[Main Features]()

[Description for Embedded Dataset]()

[Physiological Background for Plant Phenology]()

[Where to get it]()

[Useful Readings \& Links]()

[Contributing to pyCMD4F]()


## How to use pyCDM4F?

[Here](https://wikidocs.net/book/17034) is the detailed user guide of pyCDM4F.


## Main Features

pyCDM4F is designed to specialize in these areas.
- Contains sufficient [Embedded Data]() extracted from [**공공데이터포털**](https://www.data.go.kr/). 
- Easily [download and merge]() various types of phenological and meteorological data into the embedded data set or create your own. [Filter and Preprocess]() data to make it compatible with the package.
- [Predict **Bud-burst**]() and [Predict **Flowering**]() simultaneously for multiple regions with Chill-Day Model and Dataset. Highest accuracy for Korean local areas among previously published models.
- Simple application of [Hierarchical Clustering]() based on Chill-Day Model Temperature Time and [2D & 3D t-SNE method]() for future analysis.
- Select best key parameter sets with [Error Heatmap]() and [Error Contourmap]() visualization based on Mean Absolute Error(MAE) & Root Mean Squared Error(RMSE).
- After select the best fit parameter set, [line_graph & simple regression]() shows how you select parameters well.
- [Detailed shape of Chill-Day Model graph]() for each location & year and [Merged Chill-Day Model graph]() for each Cluster. 
- Contains [information]() about the years of occurrence of El Niño and La Niña in Korea, gives plot [how the prediction error shifts]() under climate change. 



## Description for Embedded Dataset

| Data | Division | Description | Period | Reference |
|----:|----:|----:|----:|-----:|
|daily_temperature_data|Daily|95 locations & 8 variables|1907-2024 (Maximum)|[공공데이터포털](https://www.data.go.kr/data/15043648/fileData.do)|
|monthly_meteorological_date|Monthly|95 locations & 9 variables| 1907-2024 (Maximum)| [공공데이터포털](https://www.data.go.kr/data/15043648/fileData.do)|
|계절관측 데이터|Animal, Plant, Meteorological Phenomena|Main Target Prunus(Budding date/Flowering date/Full Bloom date)| 1973-2024 (Observed Once A Year)| [기상청 기상자료개방포털](https://data.kma.go.kr/data/seasonObs/seasonObsDataList.do?pgmNo=648)|
|Prunus_phenology_data|Prunus(budding/flowering/full bloom)|Extracted from 계절관측 데이터| 1973-2024 (Observed Once A Year)| [기상청 기상자료개방포털](https://data.kma.go.kr/data/seasonObs/seasonObsDataList.do?pgmNo=648)|

[Here]() is the full data set containing **39 variables** for extended daily_temperature_data and more than **15 species** of **계절관측 데이터**.



## Physiological Background for Plant Phenology

After summer, if the nutrition & weather conditions are satisfied, woody plants prepare next year flowering by differentiation to **flower buds**. But to prevent flower bud differentiate to flowers in cold winter condition because of transient warm temperature, flower buds come into **dormancy state** and their flowering control genes maintain bud statement until they get enough cold requirment. 

In the Phenology Model, we call the cold requirement as '*Chill-requirement(Cr)*'. If the woody plant get enough cold, dormancy releases. From this time, plant needs Heat to differentiate into flowers. After the heat accumulated same amount to Cr, the Budding event happens. We call that as **Bud burst**. Last, the amount of heat accumulation flower bud differentiate into flower, **flowering**, is called as '*Heat-requirement(Hr)*'.

- Dormancy initiation: The Day when minimum temperature reaches to 5-7℃. (Depends on species)
- Dormancy release: The first Day when Chill accumulation is lower than Chill-requirement. 
- Bud burst: Observed Day when 20% of total flower buds in Woody plant get into bud burst.
- Flowering: Observed Day when 3 flowers are observed in a branch. 
- Detailed definition and observation rules are [**guidelines**](https://data.kma.go.kr/data/publication/publicationGlList.do) of KMA(Korea Meteorological Administration).


## Where to get it

The source code is currently hosted on GitHub at:
[https://github.com/CSBL-urap/2024-summer-swkim](https://github.com/CSBL-urap/2024-summer-swkim)

Binary installers for the latest released version are available at the [Python Package Index (PyPI)]() and on [Conda]().

```python
# PyPI

pip install pyCMD4F
```


## Useful Readings & Links

- [기상자료개방포털](https://data.kma.go.kr/)
- [공공데이터포털](https://www.data.go.kr/)
- [중앙일보 기사: 벚꽃이 피는 날짜를 어떻게 미리 알 수 있을까](https://www.joongang.co.kr/article/23433131)
- [Chilling and forcing model to predict bud-burst of crop and forest species](https://www.sciencedirect.com/science/article/abs/pii/S0168192304000632)
- [Predicting Cherry Flowering Date Using a Plant Phonology Model](https://www.researchgate.net/publication/263643081_Predicting_Cherry_Flowering_Date_Using_a_Plant_Phonology_Model)



## Contributing to pyCMD4F

All questions, bug reports, bug fixes, enhancements, requests, and ideas are welcome.

Feel free to send an email. 
- **kimsongwon10@korea.ac.kr**
- **rsw147362@gmail.com**


