{"id":23672742,"url":"https://github.com/flrd/standardlastprofile","last_synced_at":"2026-03-16T10:08:34.698Z","repository":{"id":206580459,"uuid":"717229642","full_name":"flrd/standardlastprofile","owner":"flrd","description":"R Data Package for BDEW Standard Load Profiles in Electricity","archived":false,"fork":false,"pushed_at":"2026-01-29T13:06:47.000Z","size":23429,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-29T22:35:44.409Z","etag":null,"topics":["data","electricity","germany","r"],"latest_commit_sha":null,"homepage":"https://flrd.github.io/standardlastprofile/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/flrd.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-11-10T21:32:53.000Z","updated_at":"2025-07-23T12:49:36.000Z","dependencies_parsed_at":"2023-12-04T21:30:19.367Z","dependency_job_id":"91cd34b8-8312-41ec-b014-781eb1d8943e","html_url":"https://github.com/flrd/standardlastprofile","commit_stats":{"total_commits":103,"total_committers":2,"mean_commits":51.5,"dds":"0.029126213592232997","last_synced_commit":"ba737420d46807f88758548093458bf1ae16c906"},"previous_names":["flrd/standardlastprofil","flrd/standardlastprofile"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/flrd/standardlastprofile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flrd%2Fstandardlastprofile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flrd%2Fstandardlastprofile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flrd%2Fstandardlastprofile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flrd%2Fstandardlastprofile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flrd","download_url":"https://codeload.github.com/flrd/standardlastprofile/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flrd%2Fstandardlastprofile/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29021059,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-02T18:51:31.335Z","status":"ssl_error","status_checked_at":"2026-02-02T18:49:20.777Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data","electricity","germany","r"],"created_at":"2024-12-29T11:18:32.100Z","updated_at":"2026-03-16T10:08:34.689Z","avatar_url":"https://github.com/flrd.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"95%\",\n  fig.align = \"center\"\n)\n```\n\n# standardlastprofile\n\n\u003c!-- badges: start --\u003e\n[![R-CMD-check](https://github.com/flrd/standardlastprofile/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/flrd/standardlastprofile/actions/workflows/R-CMD-check.yaml)\n[![codecov](https://codecov.io/gh/flrd/standardlastprofile/branch/main/graph/badge.svg)](https://app.codecov.io/gh/flrd/standardlastprofile)\n[![CRAN version](https://www.r-pkg.org/badges/version/standardlastprofile)](https://cran.r-project.org/package=standardlastprofile)\n[![CRAN downloads](http://cranlogs.r-pkg.org/badges/grand-total/standardlastprofile)](https://cran.r-project.org/package=standardlastprofile)\n\u003c!-- badges: end --\u003e\n\nThis package provides data on standard load profiles for electricity, published by the German Association of Energy and Water Industries (BDEW Bundesverband der Energie- und Wasserwirtschaft e.V.).\n\n``` {r, message=FALSE, include = FALSE}\nlibrary(standardlastprofile)\nlibrary(ggplot2)\n```\n\n\n```{r bdew-1999-small_multiples, echo = FALSE, fig.asp = 2.64, fig.retina=2}\n#| fig.alt = \"Small multiple line chart of 11 standard load profiles\n#|  published by the German Association of Energy and Water Industries (BDEW\n#|  Bundesverband der Energie- und Wasserwirtschaft e.V.). The lines compare\n#|  the consumption for three different periods over a year, and\n#|  also compare the consumption between different days of a week.\"\n\nstandardlastprofile:::slp_plot_1999()\n```\n\n## Installation\n\nYou can install standardlastprofile from CRAN with:\n\n```{r eval=FALSE}\ninstall.packages(\"standardlastprofile\")\n```\n\nTo install the development version from [GitHub](https://github.com/) use:\n\n``` {r eval=FALSE}\n# install.packages(\"pak\")\npak::pkg_install(\"flrd/standardlastprofile\")\n```\n\n## Included Features\n\n- `slp` — a dataset containing BDEW standard load profiles for electricity.\n- `slp_generate()` — generate a standard load profile for a user-defined time period.\n- `slp_info()` — retrieve details of standard load profiles.\n\n## About the Data\n\nThe dataset `slp` contains 26,784 observations across 5 variables:\n\n- `profile_id`: identifier of a standard load profile\n- `period`: one of `\"summer\"`, `\"winter\"`, `\"transition\"` for the 1999 profiles; a lowercase month name (`\"january\"` … `\"december\"`) for the 2025 profiles\n- `day`: one of `\"workday\"`, `\"saturday\"`, `\"sunday\"`\n- `timestamp`: format `\"%H:%M\"`\n- `watts`: electric power\n\n``` {r, message=FALSE}\nlibrary(standardlastprofile)\nstr(slp)\n```\n\nIn the context of the German electricity market, the term *Standard Load Profile* denotes a representative pattern of electricity consumption over a specific period. These profiles portray anticipated electricity consumption for diverse customer groups, like households or businesses. While not an exact match for an individual customer's consumption profile, they serve as a valid approximation for larger groups of similar customers.\n\nFor each unique combination of `profile_id`, `period` and `day` there are 96 x 1/4 hour measurements in watts. The dataset covers two generations of profiles:\n\n**1999 profiles**[^bdew-2] — based on an analysis of 1,209 load profiles of low-voltage electricity consumers in Germany:\n\n  [^bdew-2]: More information on the data and methodology can be found [here](https://www.bdew.de/media/documents/1999_Repraesentative-VDEW-Lastprofile.pdf).\n\n- `H0`: households (German: \"Haushalte\")\n- `G0` to `G6`: commerce (\"Gewerbe\")\n- `L0` to `L2`: agriculture (\"Landwirtschaft\")\n\n**2025 profiles** — an updated set published by BDEW reflecting changes in consumption patterns:\n\n- `H25`, `G25`, `L25`: updated household, commerce, and agriculture profiles\n- `P25`: households with a photovoltaic (PV) system\n- `S25`: households with a PV system and battery storage\n\nFor more details, call the `slp_info()` function.\n\n``` {r, message=FALSE, echo=TRUE}\nslp_info(profile_id = \"H0\", language = \"DE\")\n```\n\n## 2025 Profiles\n\nIn 2025, BDEW published an updated set of standard load profiles reflecting\nchanges in electricity consumption patterns since the original 1999 study. Five\nnew profiles are included:\n\n- `H25`: households — updated version of `H0`\n- `G25`: commerce (general) — updated version of `G0`\n- `L25`: agriculture — updated version of `L0`\n- `P25`: combination profile for households with a photovoltaic (PV) system\n- `S25`: combination profile for households with a PV system and battery storage\n\nUnlike the 1999 profiles, which group days into three seasonal periods\n(`winter`, `summer`, `transition`), the 2025 profiles provide a separate set\nof values for each calendar month. `P25` and `S25` are entirely new profile\ntypes with no 1999 equivalent, capturing the growing role of distributed\ngeneration and storage in residential electricity consumption.\n\n```{r bdew-2025-small_multiples, echo = FALSE, fig.asp = 1.2, fig.retina = 2}\n#| fig.alt = \"Small multiple line chart of five standard load profiles published\n#|  by the German Association of Energy and Water Industries (BDEW) in 2025.\n#|  Lines are coloured by calendar month and faceted by profile and day type.\"\n\nstandardlastprofile:::slp_plot_2025()\n```\n\nThe chart below places the 2025 household profiles side by side against\n`H0` as a reference, showing how cumulative energy consumption diverges over\nthe course of a year. \n\n```{r H0_vs_2025, echo=FALSE, message=FALSE, fig.asp=0.78, fig.retina=2}\n#| fig.alt = \"Faceted line plot with three panels for profiles H25, P25, and\n#|  S25. Each panel shows cumulative energy consumption in kWh over 2026.\n#|  A grey reference line shows H0 in every panel. H25 tracks H0 closely,\n#|  while P25 and S25 diverge due to photovoltaic generation and battery\n#|  storage respectively.\"\ndat \u003c- slp_generate(\n  profile_id = c(\"H0\", \"H25\", \"P25\", \"S25\"),\n  start_date = \"2026-01-01\",\n  end_date = \"2026-12-31\"\n)\n\ndat$kWh \u003c- tapply(dat, dat$profile_id, \\(x) {\n  (cumsum(x$watts) - x$watts[1]) / 4 / 1000\n}) |\u003e\n  unlist()\n\nggplot(transform(dat, profile_facet = profile_id), aes(start_time, kWh)) +\n  geom_line(\n    data = dat[, c(\"start_time\", \"kWh\", \"profile_id\")],\n    aes(group = profile_id), \n    colour = \"#CCCCCC\"\n  ) +\n  geom_line(aes(colour = profile_id), linewidth = 1) +\n  facet_wrap(vars(profile_facet), ncol = 2) +\n  scale_x_datetime(NULL, date_labels = \"%b\") +\n  scale_y_continuous(breaks = c(0, 500, 1000)) +\n  scale_colour_manual(\n    values = c(\n      \"H25\" = \"#961BFA\",\n      \"P25\" = \"#FA9529\",\n      \"S25\" = \"#0CC792\"\n    )\n  ) +\n  labs(\n    title = \"H0 vs. H25, S25, and P25\",\n    subtitle = \"Cumulative energy consumption over the course of one year\",\n    caption = \"data: www.bdew.de\",\n    y = \"kWh\"\n  ) +\n  theme_minimal() +\n  theme(legend.position = \"none\") +\n  theme(strip.text.y.right = element_text(angle = 0)) +\n  theme(panel.grid.minor.x = element_blank()) +\n  theme(panel.grid.minor.y = element_blank()) +\n  theme(\n    panel.grid = element_line(\n      linetype = \"12\",\n      lineend = \"round\",\n      colour = \"#FAF6F4\"\n    )\n  )\n```\n\n`H25` tracks `H0` almost exactly, confirming that the updated household profile\nrepresents a similar consumption pattern to its 1999 predecessor. `P25` and\n`S25`, on the other hand, show a flattening of the cumulative curve from spring\nthrough summer: households with a photovoltaic system — and even more so those\nwith additional battery storage — draw less energy from the grid during the\nmonths of high solar yield.\n\n### Generate a Standard Load Profile\n\nTo create a standard load profile for a specified time period, call the `slp_generate()` function:\n\n``` {r, G5_data_readme, message=FALSE, echo=TRUE}\nG5 \u003c- slp_generate(\n  profile_id = \"G5\",\n  start_date = \"2023-12-22\",\n  end_date = \"2023-12-27\"\n)\n\nhead(G5)\n```\n\n\n``` {r G5_plot_readme, message=FALSE, echo=FALSE, fig.retina=2, fig.asp=0.5}\n#| fig.alt = \"Line plot of the standard load profile 'G5' (i.e. Bakery\n#|  with a bakehouse) based on data from the German Association of Energy\n#|  and Water Industries (BDEW Bundesverband der Energie- und Wasserwirtschaft\n#|  e.V.) from December 22nd to December 27th 2023; values\n#|  are normalised to an annual consumption of 1,000 kWh.\"\nggplot(G5, aes(start_time, watts)) +\n  geom_line(color = \"#0CC792\") +\n  scale_x_datetime(\n    date_breaks = \"1 day\",\n    date_labels = \"%b %d\"\n  ) +\n  scale_y_continuous(NULL, labels = \\(x) paste(x, \"W\")) +\n  labs(\n    title = \"'G5': bakery with bakehouse\",\n    subtitle = \"1/4h measurements, based on consumption of 1,000 kWh/a\",\n    caption = \"data: www.bdew.de\",\n    x = NULL\n  ) +\n  theme_minimal() +\n  theme(\n    panel.grid.minor.x = element_blank(),\n    panel.grid.minor.y = element_blank(),\n    panel.grid = element_line(\n      linetype = \"12\",\n      lineend = \"round\",\n      colour = \"#FAF6F4\"\n    )\n  ) +\n  NULL\n```\n\n### Public Holidays\n\nBy default, `slp_generate()` treats the nine public holidays observed\nnationwide in Germany as Sundays:\n\n* New Year's (Jan 1)\n* Good Friday\n* Easter Monday\n* Labour Day (May 1)\n* Ascension Day\n* Whit Monday\n* German Unity Day (Oct 3)\n* Christmas Day (Dec 25)\n* Boxing Day (Dec 26)\n\nState-level holidays are _not_ included because they vary by state and can\nchange over time. Use the `holidays` argument to supply your own dates — the\nbuilt-in data are then ignored entirely.\n\nThe example below fetches all 2027 public holidays for Germany and the state of\nBerlin from the [nager.Date API](https://date.nager.at), and passes them to\n`slp_generate()`. Berlin observes **International Women's Day** (8 March) as\nan additional public holiday not shared by any other state.\n\n``` {r holidays-berlin, eval=FALSE}\nlibrary(httr2)\n\nresp \u003c- request(\"https://date.nager.at\") |\u003e\n  req_url_path_append(\"api\", \"v3\", \"PublicHolidays\", \"2027\", \"DE\") |\u003e\n  req_perform() |\u003e\n  resp_body_json()\n\n# global == TRUE  →  nationwide holiday (counties is NULL)\n# global == FALSE →  counties lists the states that observe it\nis_berlin \u003c- \\(x) isTRUE(x$global) || \"DE-BE\" %in% unlist(x$counties)\n\nholidays_berlin_2027 \u003c- as.Date(\n  vapply(Filter(is_berlin, resp), \\(x) x$date, character(1))\n)\n\nH0_berlin_2027 \u003c- slp_generate(\n  \"H0\", \"2027-01-01\", \"2027-12-31\",\n  holidays = holidays_berlin_2027\n)\n```\n\nTo generate a standard load profile including holidays for each of the \n16 German states, repeat the same pattern in a loop — one API call suffices,\nre-filter per state:\n\n``` {r holidays-all-states, eval=FALSE}\nstates \u003c- c(\n  \"DE-BB\", \"DE-BE\", \"DE-BW\", \"DE-BY\", \"DE-HB\", \"DE-HE\",\n  \"DE-HH\", \"DE-MV\", \"DE-NI\", \"DE-NW\", \"DE-RP\", \"DE-SH\",\n  \"DE-SL\", \"DE-SN\", \"DE-ST\", \"DE-TH\"\n)\n\nresults \u003c- vector(\"list\", length(states))\nnames(results) \u003c- states\n\nfor (state in states) {\n  is_state \u003c- \\(x) isTRUE(x$global) || state %in% unlist(x$counties)\n  holidays_state \u003c- as.Date(\n    vapply(Filter(is_state, resp), \\(x) x$date, character(1))\n  )\n  results[[state]] \u003c- slp_generate(\n    profile_id = \"H0\",\n    start_date = \"2027-01-01\",\n    end_date = \"2027-12-31\",\n    holidays = holidays_state\n  )\n}\n```\n\nFor more information, details about the data, and an explanation of the algorithm,\nsee the [vignette](https://flrd.github.io/standardlastprofile/articles/standardlastprofile.html)\nor run `vignette(\"standardlastprofile\", package = \"standardlastprofile\")` locally.\n\n\n## Source\nYou can access the studies and data on standard load profiles for electricity on the website of the BDEW: https://www.bdew.de/energie/standardlastprofile-strom/\n\n## Code of Conduct\nPlease note that this project is released with a [Contributor Code of Conduct](https://github.com/flrd/standardlastprofile/blob/main/CODE_OF_CONDUCT.md). \nBy participating in this project you agree to abide by its terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflrd%2Fstandardlastprofile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflrd%2Fstandardlastprofile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflrd%2Fstandardlastprofile/lists"}