19 - 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, 
                     dir=localtestdir(), 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.: 9072   1st Qu.:1968   1st Qu.: 7.000   1st Qu.:244   1st Qu.:11.00  
##  Median :10233   Median :1976   Median : 7.000   Median :244   Median :24.00  
##  Mean   :10050   Mean   :1975   Mean   : 6.428   Mean   :244   Mean   :17.54  
##  3rd Qu.:11199   3rd Qu.:1983   3rd Qu.: 7.000   3rd Qu.:244   3rd Qu.:24.00  
##  Max.   :15935   Max.   :1990   Max.   :10.000   Max.   :244   Max.   :24.00  
##  Eintrittsdatum     Eintrittsdatum_QB     Jultag          eor           
##  Min.   :19510401   Min.   :0.000     Min.   : 29.0   Length:47054      
##  1st Qu.:19680609   1st Qu.:1.000     1st Qu.:146.0   Class :character  
##  Median :19761104   Median :1.000     Median :205.0   Mode  :character  
##  Mean   :19745971   Mean   :1.031     Mean   :213.1                     
##  3rd Qu.:19831028   3rd Qu.:1.000     3rd Qu.:282.0                     
##  Max.   :19901113   Max.   :5.000     Max.   :339.0                     
##     X          
##  Mode:logical  
##  NA's:47054    
##                
##                
##                
##