23 - use case: phenology data

Located here: https://opendata.dwd.de/climate_environment/CDC/observations_germany/phenology

This example uses data in the subfolder annual/crops/hist

phenocrop_base <- paste0(sub("climate$", "phenology", dwdbase), 
                        "/annual_reporters/crops/historical/")
# pheno_urls <- indexFTP("", base=phenocrop_base, dir="Pheno")
kohl_url <- "PH_Jahresmelder_Landwirtschaft_Kulturpflanze_Weisskohl_1951_1990_hist.txt"# 9 MB
kohl_file <- dataDWD(base=phenocrop_base, url=kohl_url, joinbf=TRUE, read=FALSE) 
kohl <- read.table(kohl_file, sep=";", header=TRUE)
summary(kohl)
##   Stations_id     Referenzjahr  Qualitaetsniveau   Objekt_id      Phase_id    
##  Min.   :   98   Min.   :1951   Min.   : 1.000   Min.   :244   Min.   :11.00  
##  1st Qu.: 9079   1st Qu.:1969   1st Qu.: 7.000   1st Qu.:244   1st Qu.:11.00  
##  Median :10234   Median :1977   Median :10.000   Median :244   Median :24.00  
##  Mean   :10074   Mean   :1975   Mean   : 8.859   Mean   :244   Mean   :17.52  
##  3rd Qu.:11206   3rd Qu.:1983   3rd Qu.:10.000   3rd Qu.:244   3rd Qu.:24.00  
##  Max.   :19488   Max.   :1990   Max.   :10.000   Max.   :244   Max.   :24.00  
##  Eintrittsdatum     Eintrittsdatum_QB     Jultag          eor           
##  Min.   :19510406   Min.   :1.000     Min.   : 29.0   Length:47402      
##  1st Qu.:19690623   1st Qu.:1.000     1st Qu.:146.0   Class :character  
##  Median :19770919   Median :1.000     Median :229.0   Mode  :character  
##  Mean   :19751882   Mean   :1.109     Mean   :213.5                     
##  3rd Qu.:19831022   3rd Qu.:1.000     3rd Qu.:282.0                     
##  Max.   :19901113   Max.   :5.000     Max.   :329.0                     
##     X          
##  Mode:logical  
##  NA's:47402    
##                
##                
##                
##