library(mastr)
stromerzeuger_pv_berlin <- mastr::read_mastr()

g <- stromerzeuger_pv_berlin %>%
  dplyr::count(year) %>%
  ggplot2::ggplot(ggplot2::aes(x = year, y = n)) +
  ggplot2::geom_line() +
  ggplot2::labs(x = "Year", 
                y = "Number of PVs per year (grouped by 'Inbetriebnamedatum')") +
  ggplot2::theme_bw()

plotly::ggplotly(g)
### Probability distribution (kWp / PV system installed in Berlin)

quantile(stromerzeuger_pv_berlin$bruttoleistung_der_einheit, 
         probs = seq(0,1,0.005))
#>       0.0%       0.5%       1.0%       1.5%       2.0%       2.5%       3.0% 
#>    0.00300    0.30000    0.34000    0.60000    0.60000    0.66000    1.00000 
#>       3.5%       4.0%       4.5%       5.0%       5.5%       6.0%       6.5% 
#>    1.08800    1.20000    1.38000    1.53000    1.70000    1.80168    1.92000 
#>       7.0%       7.5%       8.0%       8.5%       9.0%       9.5%      10.0% 
#>    1.99080    2.00000    2.07000    2.16000    2.22000    2.35000    2.40000 
#>      10.5%      11.0%      11.5%      12.0%      12.5%      13.0%      13.5% 
#>    2.50000    2.55840    2.64000    2.71120    2.80000    2.88000    2.93070 
#>      14.0%      14.5%      15.0%      15.5%      16.0%      16.5%      17.0% 
#>    3.00000    3.00000    3.06400    3.15000    3.20000    3.24000    3.30000 
#>      17.5%      18.0%      18.5%      19.0%      19.5%      20.0%      20.5% 
#>    3.36000    3.42000    3.45000    3.51000    3.57000    3.60000    3.67500 
#>      21.0%      21.5%      22.0%      22.5%      23.0%      23.5%      24.0% 
#>    3.72000    3.80000    3.84000    3.90000    3.92000    3.96000    4.00000 
#>      24.5%      25.0%      25.5%      26.0%      26.5%      27.0%      27.5% 
#>    4.04060    4.08000    4.16000    4.20000    4.22410    4.26000    4.32000 
#>      28.0%      28.5%      29.0%      29.5%      30.0%      30.5%      31.0% 
#>    4.32000    4.40000    4.44000    4.48500    4.50000    4.56000    4.60000 
#>      31.5%      32.0%      32.5%      33.0%      33.5%      34.0%      34.5% 
#>    4.64000    4.69000    4.76000    4.80000    4.80000    4.87380    4.93000 
#>      35.0%      35.5%      36.0%      36.5%      37.0%      37.5%      38.0% 
#>    4.97000    5.00000    5.04000    5.06000    5.10000    5.12000    5.17000 
#>      38.5%      39.0%      39.5%      40.0%      40.5%      41.0%      41.5% 
#>    5.20000    5.22000    5.25000    5.28000    5.30000    5.36000    5.40000 
#>      42.0%      42.5%      43.0%      43.5%      44.0%      44.5%      45.0% 
#>    5.40000    5.44000    5.50000    5.52000    5.55000    5.60000    5.62500 
#>      45.5%      46.0%      46.5%      47.0%      47.5%      48.0%      48.5% 
#>    5.69500    5.73500    5.76000    5.78000    5.86500    5.90000    5.94000 
#>      49.0%      49.5%      50.0%      50.5%      51.0%      51.5%      52.0% 
#>    6.00000    6.00000    6.08000    6.12000    6.20000    6.24000    6.30000 
#>      52.5%      53.0%      53.5%      54.0%      54.5%      55.0%      55.5% 
#>    6.34500    6.39000    6.46000    6.49000    6.57460    6.60000    6.70000 
#>      56.0%      56.5%      57.0%      57.5%      58.0%      58.5%      59.0% 
#>    6.75000    6.80000    6.84000    6.90000    7.00000    7.02000    7.05000 
#>      59.5%      60.0%      60.5%      61.0%      61.5%      62.0%      62.5% 
#>    7.14000    7.20000    7.20000    7.28000    7.36000    7.40000    7.47750 
#>      63.0%      63.5%      64.0%      64.5%      65.0%      65.5%      66.0% 
#>    7.52000    7.60000    7.68000    7.70760    7.80000    7.84000    7.92000 
#>      66.5%      67.0%      67.5%      68.0%      68.5%      69.0%      69.5% 
#>    8.00000    8.10960    8.16500    8.28000    8.37500    8.45000    8.55000 
#>      70.0%      70.5%      71.0%      71.5%      72.0%      72.5%      73.0% 
#>    8.64000    8.74000    8.82720    8.96000    9.00000    9.10000    9.18480 
#>      73.5%      74.0%      74.5%      75.0%      75.5%      76.0%      76.5% 
#>    9.24000    9.36000    9.44000    9.52000    9.60000    9.64820    9.71500 
#>      77.0%      77.5%      78.0%      78.5%      79.0%      79.5%      80.0% 
#>    9.75000    9.75000    9.80000    9.86000    9.90000    9.90000    9.90000 
#>      80.5%      81.0%      81.5%      82.0%      82.5%      83.0%      83.5% 
#>    9.92000    9.94000    9.98220   10.08000   10.45590   11.06832   11.89960 
#>      84.0%      84.5%      85.0%      85.5%      86.0%      86.5%      87.0% 
#>   12.59840   13.50000   14.40000   15.30000   16.64000   17.89720   19.09680 
#>      87.5%      88.0%      88.5%      89.0%      89.5%      90.0%      90.5% 
#>   20.06500   21.23520   22.80740   24.26300   25.52670   27.37600   28.80000 
#>      91.0%      91.5%      92.0%      92.5%      93.0%      93.5%      94.0% 
#>   29.40000   29.64060   29.76000   29.96900   32.75360   37.42020   41.45760 
#>      94.5%      95.0%      95.5%      96.0%      96.5%      97.0%      97.5% 
#>   44.80000   47.81400   51.66290   60.00000   70.45560   83.66320   98.33850 
#>      98.0%      98.5%      99.0%      99.5%     100.0% 
#>   99.84000  128.92680  185.96480  315.19440 6900.00000