/entsoeftp

Get Files From the Entso-E FTP Server.

Primary LanguageR

entsoeftp

The goal of entsoeftp is to give access to one of the three download options from the Entso-E platform. Obviously it is the FTP site, this package is for.

All dates and times are in UTC.

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("krose/entsoeftp")

Get an access to create two variables in the .Renviron file.

Example

There are three functions:

  • list high level folders: entsoe_list_folders()
  • list files in a folder: entsoe_list_files()
  • download_file: entsoe_entsoe_get_file()

List the folders on the server:

suppressPackageStartupMessages(library(tidyverse))
library(entsoeftp)

glimpse(entsoe_list_folders())
#> Observations: 108
#> Variables: 6
#> $ perm  <chr> "drwxr-xr-x", "drwxr-xr-x", "drwxr-xr-x", "drwxr-xr-x", ...
#> $ dir   <chr> "", "", "", "", "", "", "", "", "", "", "", "", "", "", ...
#> $ group <chr> "", "", "", "", "", "", "", "", "", "", "", "", "", "", ...
#> $ size  <chr> "500", "19", "500", "500", "500", "500", "500", "500", "...
#> $ date  <chr> "Mar 13 02:37", "Nov 19 12:38", "May  6 01:05", "May  6 ...
#> $ links <chr> "", "", "AcceptedAggregatedOffers", "ActivatedBalancingE...

List the folders on the server:

glimpse(entsoe_list_files(basis_name = "OutagesPU"))
#> Observations: 101
#> Variables: 5
#> $ perm <chr> "-rwxr--r--", "-rwxr--r--", "-rwxr--r--", "-rwxr--r--", "...
#> $ dir  <chr> "", "", "", "", "", "", "", "", "", "", "", "", "", "", "...
#> $ size <chr> "500", "500", "500", "500", "500", "500", "500", "500", "...
#> $ date <chr> "Mar 23 02:42", "Mar 23 02:42", "Mar 23 02:45", "Mar 23 0...
#> $ file <chr> "2014_12_OutagesPU.csv", "2015_1_OutagesPU.csv", "2015_10...

Download af file for a specified month from the server:

glimpse(entsoe_get_file(basis_name = "OutagesPU"))
#> Observations: 14,385
#> Variables: 22
#> $ Year                   <int> 2019, 2019, 2019, 2019, 2019, 2019, 201...
#> $ Month                  <int> 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, ...
#> $ Day                    <int> 26, 26, 5, 5, 13, 13, 31, 29, 30, 21, 2...
#> $ StartTS                <dttm> 2019-05-26 00:00:00, 2019-05-26 00:00:...
#> $ EndTS                  <dttm> 2019-06-12 00:00:00, 2019-06-12 00:00:...
#> $ TimeZone               <chr> "CET", "CET", "CET", "CET", "CET", "CET...
#> $ MRID                   <chr> "0tjiu-34S6F1qP7V-0vglA", "XpjsLlML08Sl...
#> $ Status                 <chr> "Active", "Active", "Active", "Active",...
#> $ Type                   <chr> "Planned", "Planned", "Planned", "Plann...
#> $ AreaCode               <chr> "10Y1001A1001A46L", "10YSE-1--------K",...
#> $ AreaTypeCode           <chr> "BZN", "CTA", "BZN", "CTA", "CTA", "BZN...
#> $ AreaName               <chr> "SE3 BZ", "SvK CA", "SE3 BZ", "SvK CA",...
#> $ MapCode                <chr> "SE3", "SE", "SE3", "SE", "CH", "CH", "...
#> $ PowerRecourceEIC       <chr> "46WPU0000000061P", "46WPU0000000061P",...
#> $ UnitName               <chr> "Oskarshamn 3", "Oskarshamn 3", "Forsma...
#> $ ProductionType         <chr> "Nuclear", "Nuclear", "Nuclear", "Nucle...
#> $ Version                <int> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
#> $ VoltageConnectionLevel <dbl> 400, 400, 400, 400, 220, 220, 110, 110,...
#> $ InstalledCapacity      <dbl> 1400, 1400, 988, 988, 259, 259, 192, 19...
#> $ UnavailabilityValue    <int> 0, 0, 0, 0, 92, 92, 143, 143, 143, 143,...
#> $ Reason                 <chr> "Foreseen Maintenance", "Foreseen Maint...
#> $ UpdateTime             <dttm> 2018-10-02 17:35:52, 2018-10-02 17:35:...

glimpse(entsoe_get_file(basis_name = "OutagesPU", year = 2018, month = 3))
#> Observations: 29,173
#> Variables: 22
#> $ Year                   <int> 2018, 2018, 2018, 2018, 2018, 2018, 201...
#> $ Month                  <int> 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, ...
#> $ Day                    <int> 4, 1, 22, 6, 4, 6, 25, 22, 1, 9, 9, 25,...
#> $ StartTS                <dttm> 2018-03-04 01:00:00, 2018-03-01 01:00:...
#> $ EndTS                  <dttm> 2018-03-05 01:00:00, 2018-03-02 01:00:...
#> $ TimeZone               <chr> "EET", "EET", "EET", "EET", "EET", "EET...
#> $ MRID                   <chr> "1VXKfzGZkE_DmvmpZJdrSQ", "sf5ify1o4OcE...
#> $ Status                 <chr> "Active", "Active", "Active", "Active",...
#> $ Type                   <chr> "Planned", "Planned", "Planned", "Plann...
#> $ AreaCode               <chr> "10YCZ-CEPS-----N", "10YCZ-CEPS-----N",...
#> $ AreaTypeCode           <chr> "CTA", "CTA", "CTA", "CTA", "BZN", "BZN...
#> $ AreaName               <chr> "CEPS CA", "CEPS CA", "CEPS CA", "CEPS ...
#> $ MapCode                <chr> "CZ", "CZ", "CZ", "CZ", "CZ", "CZ", "CZ...
#> $ PowerRecourceEIC       <chr> "27W-PU-EKOM----C", "27W-PU-EKOM----C",...
#> $ UnitName               <chr> "EKOM_______", "EKOM_______", "EKOM____...
#> $ ProductionType         <chr> "Fossil Brown coal/Lignite", "Fossil Br...
#> $ Version                <int> 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
#> $ VoltageConnectionLevel <dbl> 110, 110, 110, 110, 110, 110, 110, 110,...
#> $ InstalledCapacity      <dbl> 192, 192, 192, 192, 192, 192, 192, 192,...
#> $ UnavailabilityValue    <int> 160, 160, 160, 160, 160, 160, 160, 160,...
#> $ Reason                 <chr> "Foreseen Maintenance", "Foreseen Maint...
#> $ UpdateTime             <dttm> 2018-10-02 17:27:55, 2018-10-02 17:27:...