{"id":13712203,"url":"https://github.com/gadenbuie/ggweekly","last_synced_at":"2025-03-16T07:31:59.739Z","repository":{"id":76832866,"uuid":"193391082","full_name":"gadenbuie/ggweekly","owner":"gadenbuie","description":"🗓 🖨 Easy, printable, custom calendars and week planners","archived":false,"fork":false,"pushed_at":"2021-11-04T03:15:46.000Z","size":10543,"stargazers_count":110,"open_issues_count":2,"forks_count":12,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-02-27T05:49:34.086Z","etag":null,"topics":["calendar","ggplot2","planning"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gadenbuie.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2019-06-23T20:11:14.000Z","updated_at":"2025-02-05T16:46:40.000Z","dependencies_parsed_at":"2024-01-07T01:41:46.832Z","dependency_job_id":"d7cfb06d-fbc4-4062-b3e5-3e46c500ccdd","html_url":"https://github.com/gadenbuie/ggweekly","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gadenbuie%2Fggweekly","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gadenbuie%2Fggweekly/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gadenbuie%2Fggweekly/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gadenbuie%2Fggweekly/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gadenbuie","download_url":"https://codeload.github.com/gadenbuie/ggweekly/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243806045,"owners_count":20350775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["calendar","ggplot2","planning"],"created_at":"2024-08-02T23:01:15.930Z","updated_at":"2025-03-16T07:31:58.517Z","avatar_url":"https://github.com/gadenbuie.png","language":"R","funding_links":[],"categories":["Plot layers","R","ggplot"],"sub_categories":["Additional Plot Types"],"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  warning = FALSE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  fig.width = 10,\n  fig.height = 8,\n  fig.retina = 2,\n  out.width = \"100%\"\n)\n\nshowtext::showtext_auto()\nsysfonts::font_add_google(\"PT Sans\")\nsysfonts::font_add_google(\"PT Sans Narrow\")\n```\n# ggweekly\n\n\u003c!-- badges: start --\u003e\n\u003c!-- badges: end --\u003e\n\n[ggplot2]: https://ggplot2.tidyverse.org\n\nThe goal of ggweekly is to easily create custom weekly planners with [ggplot2].\n\n## Installation\n\nYou can install **ggweekly** from GitHub with `devtools`\n\n``` r\ndevtools::install_github(\"gadenbuie/ggweekly\")\n```\n\n## Example\n\nThis is a basic example which shows you how to create a weekly planner covering April, May, and June of 2019.\n\n```{r year-week}\nlibrary(ggweekly)\nggweek_planner(\n  start_day = \"2019-04-01\", \n  end_day = \"2019-06-30\", \n)\n```\n\nYou can also create traditional calendars as well.\n\n```{r yearly-calendar, fig.height = 4, fig.width = 12}\nggweek_planner(\n  start_day = \"2019-04-01\", \n  end_day = \"2019-06-30\", \n  show_month_boundaries = FALSE, \n  show_month_start_day = FALSE,\n  week_start = \"isoweek\",\n  week_start_label = \"week\"\n) + \n  ggplot2::ggtitle(\"2019\") +\n  ggplot2::facet_wrap(~ month, scales = 'free')\n```\n\nUse `week_start` to choose between weeks that start on Monday (`\"isoweek\"`)\nor weeks that start on Sunday (`\"epiweek\"`).\nYou can also set (or remove) the weekend color fill with `weekend_fill`.\n\n```{r yearly-calendar-opts, fig.height = 4, fig.width = 12}\nggweek_planner(\n  start_day = \"2019-04-01\", \n  end_day = \"2019-06-30\", \n  show_month_boundaries = FALSE, \n  show_month_start_day = FALSE,\n  week_start = \"epiweek\",\n  week_start_label = \"week\",\n  weekend_fill = \"#FFFFFF\"\n) + \n  ggplot2::ggtitle(\"2019\") +\n  ggplot2::facet_wrap(~ month, scales = 'free')\n```\n\n## Project Planning\n\nCreate a tibble of days to highlight and pass into `highlight_days`.\n\n```{r project}\nproject_days \u003c- dplyr::tribble(\n          ~day,             ~label,    ~color,     ~fill,\n  \"2019-07-02\", \"Project Kick Off\", \"#02307a\", \"#02307a\",\n  \"2019-07-12\",          \"LOI Due\", \"#02307a\", \"#02307a\",\n  \"2019-07-26\",      \"First Draft\", \"#02307a\", \"#02307a\",\n  \"2019-08-05\",        \"Work week\", \"#bf006c\", \"#bf006c\",\n  \"2019-08-06\",                 NA,        NA, \"#bf006c\",\n  \"2019-08-07\",                 NA,        NA, \"#bf006c\",\n  \"2019-08-08\",                 NA,        NA, \"#bf006c\",\n  \"2019-08-09\",                 NA,        NA, \"#bf006c\",\n  \"2019-08-23\", \"Final Submission\", \"#02307a\", \"#02307a\"\n)\n\n\nggweek_planner(\n  start_day = \"2019-07-01\",\n  highlight_days = project_days\n) +\n  ggplot2::ggtitle(\"A Very Important Project\")\n```\n\n## Printable Calendars\n\nHere's a printable calendar of 8 week time periods for 2019 and 2020: \n\n- [2019-weekly-planner.pdf](printable/2019-weekly-planner.pdf)\n- [2020-weekly-planner.pdf](printable/2020-weekly-planner.pdf)\n\nThe code chunk below shows how this PDF was created and can be adjusted as needed.\nI included margins to the left and below the calendar for extra notes.\n\n```{r printable-2019}\nstart_date \u003c- lubridate::floor_date(lubridate::ymd(\"2019-01-01\"), \"week\", week_start = 1)\nend_date \u003c- lubridate::ceiling_date(lubridate::ymd(\"2019-12-31\"), \"week\", week_start = 1) - \n  lubridate::days(1)\nweek_dates \u003c- seq(start_date, end_date, by = \"56 day\")\n\npdf(here::here(\"printable\", \"2019-weekly-planner.pdf\"), width = 8.5, height = 11)\nfor (idx_week in seq_along(week_dates)) {\n  gcal \u003c- ggweek_planner(start_day = week_dates[idx_week]) +\n    ggplot2::theme(plot.margin = ggplot2::margin(1, 2, 3, 0.5, \"in\")) +\n    ggplot2::ggtitle(paste(\n      strftime(week_dates[idx_week], \"%B %e, %Y\"),\n      strftime(week_dates[idx_week] + 55, \"%B %e, %Y\"),\n      sep = \" — \"\n    ))\n  print(gcal)\n}\ndev.off()\n```\n\n\n```{r printable-2020, echo=FALSE}\nstart_date \u003c- lubridate::floor_date(lubridate::ymd(\"2020-01-01\"), \"week\", week_start = 1)\nend_date \u003c- lubridate::ceiling_date(lubridate::ymd(\"2020-12-31\"), \"week\", week_start = 1) - \n  lubridate::days(1)\nweek_dates \u003c- seq(start_date, end_date, by = \"56 day\")\n\npdf(here::here(\"printable\", \"2020-weekly-planner.pdf\"), width = 8.5, height = 11)\nfor (idx_week in seq_along(week_dates)) {\n  gcal \u003c- ggweek_planner(start_day = week_dates[idx_week]) +\n    ggplot2::theme(plot.margin = ggplot2::margin(1, 2, 3, 0.5, \"in\")) +\n    ggplot2::ggtitle(paste(\n      strftime(week_dates[idx_week], \"%B %e, %Y\"),\n      strftime(week_dates[idx_week] + 55, \"%B %e, %Y\"),\n      sep = \" — \"\n    ))\n  print(gcal)\n}\ndev.off()\n```\n\nAnd here are fullpage yearly calendars for 2019 and 2020.\n\n* [2019-full-year.pdf](printable/2019-full-year.pdf)\n* [2020-full-year.pdf](printable/2020-full-year.pdf)\n\n\n```{r printable-fullyear-2019}\ng2019 \u003c- ggweek_planner(\n  start_day = \"2019-01-01\", \n  end_day = \"2019-12-31\", \n  show_day_numbers = TRUE, \n  show_month_boundaries = FALSE, \n  show_month_start_day = FALSE,\n  week_start_label = \"week\"\n) + \n  ggplot2::ggtitle(\"2019\") +\n  ggplot2::facet_wrap(~ month, scales = 'free')\n\nggplot2::ggsave(\n  file = here::here(\"printable\", \"2019-full-year.pdf\"),\n  plot = g2019,\n  width = 11, height = 8.5\n)\n```\n\n```{r printable-fullyear-2020, echo = FALSE}\ng2019 \u003c- ggweek_planner(\n  start_day = \"2020-01-01\", \n  end_day = \"2020-12-31\", \n  show_day_numbers = TRUE, \n  show_month_boundaries = FALSE, \n  show_month_start_day = FALSE,\n  week_start_label = \"week\"\n) + \n  ggplot2::ggtitle(\"2020\") +\n  ggplot2::facet_wrap(~ month, scales = 'free')\n\nggplot2::ggsave(\n  file = here::here(\"printable\", \"2020-full-year.pdf\"),\n  plot = g2019,\n  width = 11, height = 8.5\n)\n```\n\n\n***\n\nPlease note that the 'ggweekly' project is released with a\n[Contributor Code of Conduct](CODE_OF_CONDUCT.md).\nBy contributing to this project, you agree to abide by its terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgadenbuie%2Fggweekly","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgadenbuie%2Fggweekly","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgadenbuie%2Fggweekly/lists"}