{
  "_id": "6ac8c955de46216d5edd7345",
  "Package": "phsmethods",
  "Title": "Standard Methods for Use in Public Health Scotland",
  "Version": "1.2.0.9000",
  "Authors@R": "c(\nperson(\"Public Health Scotland\", , , \"phs.datascience@phs.scot\", role = \"cph\"),\nperson(\"David\", \"Caldwell\", , \"David.Caldwell@phs.scot\", role = \"aut\"),\nperson(\"Lucinda\", \"Lawrie\", , \"Lucinda.Lawrie@phs.scot\", role = \"rev\"),\nperson(\"Jack\", \"Hannah\", , \"jack.hannah2@phs.scot\", role = \"aut\"),\nperson(\"Tina\", \"Fu\", , \"Yuyan.Fu2@phs.scot\", role = c(\"aut\", \"cre\")),\nperson(\"Ciara\", \"Gribben\", , \"Ciara.Gribben@phs.scot\", role = \"aut\"),\nperson(\"Chris\", \"Deans\", , \"Chris.Deans2@phs.scot\", role = \"aut\"),\nperson(\"Jaime\", \"Villacampa\", , \"Jaime.Villacampa@phs.scot\", role = \"aut\"),\nperson(\"Graeme\", \"Gowans\", , \"Graeme.Gowans@phs.scot\", role = \"aut\"),\nperson(\"Alice\", \"Byers\", role = \"ctb\"),\nperson(\"Alan\", \"Yeung\", , \"Alan.Yeung@phs.scot\", role = \"ctb\"),\nperson(\"James\", \"Hayes\", , \"James.Hayes2@phs.scot\", role = \"aut\",\ncomment = c(ORCID = \"0000-0002-5380-2029\")),\nperson(\"Nicolaos\", \"Christofidis\", , \"nicolaos.christofidis@phs.scot\", role = \"aut\")\n)",
  "Description": "A collection of methods for commonly undertaken analytical\ntasks, primarily developed for Public Health Scotland (PHS)\nanalysts, but the package is also generally useful to others\nworking in the healthcare space, particularly since it has\nfunctions for working with Community Health Index (CHI)\nnumbers. The package can help to make data manipulation and\nanalysis more efficient and reproducible.",
  "License": "GPL (>= 2)",
  "URL": "https://github.com/Public-Health-Scotland/phsmethods,\nhttps://code.publichealthscotland.scot/phsmethods",
  "BugReports": "https://github.com/Public-Health-Scotland/phsmethods/issues",
  "VignetteBuilder": "knitr",
  "RdMacros": "lifecycle",
  "Config/roxygen2/markdown": "TRUE",
  "Config/roxygen2/version": "8.1.0",
  "Config/testthat/edition": "3",
  "Encoding": "UTF-8",
  "Language": "en-GB",
  "LazyData": "true",
  "Config/pak/sysreqs": "libicu-dev libx11-dev",
  "Repository": "https://public-health-scotland.r-universe.dev",
  "Date/Publication": "2026-08-27 08:40:47 UTC",
  "RemoteUrl": "https://github.com/public-health-scotland/phsmethods",
  "RemoteRef": "HEAD",
  "RemoteSha": "c1e6f658ef222aaea8a2f4c4bb0b2e416f5aed26",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-10-09 10:18:52 UTC",
    "User": "root"
  },
  "Author": "Public Health Scotland [cph],\nDavid Caldwell [aut],\nLucinda Lawrie [rev],\nJack Hannah [aut],\nTina Fu [aut, cre],\nCiara Gribben [aut],\nChris Deans [aut],\nJaime Villacampa [aut],\nGraeme Gowans [aut],\nAlice Byers [ctb],\nAlan Yeung [ctb],\nJames Hayes [aut] (ORCID: <https://orcid.org/0000-0002-5380-2029>),\nNicolaos Christofidis [aut]",
  "Maintainer": "Tina Fu <Yuyan.Fu2@phs.scot>",
  "_user": "public-health-scotland",
  "_type": "src",
  "_file": "phsmethods_1.2.0.9000.tar.gz",
  "_fileid": "https://r2.ropensci.org/e28a426e04211134fb0fde18bdb1824c5adae751fbac7df7fe3f9009b2352d36",
  "_filesize": 463844,
  "_sha256": "e28a426e04211134fb0fde18bdb1824c5adae751fbac7df7fe3f9009b2352d36",
  "_expires": "2027-01-17T11:00:35.000Z",
  "_created": "2026-10-09T10:18:52.000Z",
  "_published": "2026-10-09T11:00:37.799Z",
  "_buildurl": "https://github.com/r-universe/public-health-scotland/actions/runs/37916461706",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_jobs": [
    {
      "job": 113775070397,
      "time": 144,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "11610990117"
    },
    {
      "job": 113775070463,
      "time": 140,
      "config": "linux-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11610445360"
    },
    {
      "job": 113775070484,
      "time": 104,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "11611961994"
    },
    {
      "job": 113775070404,
      "time": 136,
      "config": "macos-release-arm64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11611830967"
    },
    {
      "job": 113773894332,
      "time": 205,
      "config": "source",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11610350018"
    },
    {
      "job": 113775070429,
      "time": 113,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "11610335375"
    },
    {
      "job": 113775070658,
      "time": 102,
      "config": "windows-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "11609529966"
    },
    {
      "job": 113775070772,
      "time": 87,
      "config": "windows-oldrel-x86_64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "11609924841"
    },
    {
      "job": 113775070519,
      "time": 77,
      "config": "windows-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11609869677"
    }
  ],
  "_upstream": "https://github.com/public-health-scotland/phsmethods",
  "_commit": {
    "id": "c1e6f658ef222aaea8a2f4c4bb0b2e416f5aed26",
    "author": "James Hayes (né McMahon) <james.hayes2@phs.scot>",
    "committer": "GitHub <noreply@github.com>",
    "message": "Merge pull request #190 from Public-Health-Scotland/phs-domain-update\n\nPHS domain update",
    "time": 1787820047
  },
  "_maintainer": {
    "name": "Tina Fu",
    "email": "yuyan.fu2@phs.scot",
    "login": "tina815",
    "description": "",
    "uuid": 31853064
  },
  "_distro": "resolute",
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 3.6",
      "role": "Depends"
    },
    {
      "package": "cli",
      "role": "Imports"
    },
    {
      "package": "dplyr",
      "role": "Imports"
    },
    {
      "package": "lifecycle",
      "role": "Imports"
    },
    {
      "package": "lubridate",
      "role": "Imports"
    },
    {
      "package": "magrittr",
      "role": "Imports"
    },
    {
      "package": "readr",
      "role": "Imports"
    },
    {
      "package": "rlang",
      "role": "Imports"
    },
    {
      "package": "scales",
      "version": ">= 1.0.0",
      "role": "Imports"
    },
    {
      "package": "stringr",
      "role": "Imports"
    },
    {
      "package": "tibble",
      "role": "Imports"
    },
    {
      "package": "covr",
      "role": "Suggests"
    },
    {
      "package": "flextable",
      "role": "Suggests"
    },
    {
      "package": "ggplot2",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "spelling",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    },
    {
      "package": "withr",
      "role": "Suggests"
    }
  ],
  "_owner": "public-health-scotland",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2025-43",
      "n": 1
    },
    {
      "week": "2025-44",
      "n": 1
    },
    {
      "week": "2025-45",
      "n": 7
    },
    {
      "week": "2025-48",
      "n": 3
    },
    {
      "week": "2026-06",
      "n": 1
    },
    {
      "week": "2026-07",
      "n": 3
    },
    {
      "week": "2026-15",
      "n": 1
    },
    {
      "week": "2026-19",
      "n": 1
    },
    {
      "week": "2026-28",
      "n": 1
    },
    {
      "week": "2026-29",
      "n": 3
    },
    {
      "week": "2026-31",
      "n": 4
    },
    {
      "week": "2026-32",
      "n": 2
    },
    {
      "week": "2026-33",
      "n": 1
    },
    {
      "week": "2026-35",
      "n": 1
    }
  ],
  "_tags": [
    {
      "name": "1.1.0",
      "date": "2026-04-07"
    },
    {
      "name": "1.2.0",
      "date": "2026-08-05"
    }
  ],
  "_stars": 59,
  "_contributors": [
    {
      "user": "moohan",
      "count": 279,
      "uuid": 5982260
    },
    {
      "user": "jackhannah95",
      "count": 208,
      "uuid": 38332502
    },
    {
      "user": "tina815",
      "count": 137,
      "uuid": 31853064
    },
    {
      "user": "nic-chr",
      "count": 48,
      "uuid": 74770457
    },
    {
      "user": "jvillacampa",
      "count": 40,
      "uuid": 30340183
    },
    {
      "user": "alan-y",
      "count": 26,
      "uuid": 34042624
    },
    {
      "user": "davidc92",
      "count": 18,
      "uuid": 33342336
    },
    {
      "user": "jokpro",
      "count": 17,
      "uuid": 57229241
    },
    {
      "user": "chrisdeans",
      "count": 15,
      "uuid": 23474011
    },
    {
      "user": "graemegowans",
      "count": 7,
      "uuid": 47667899
    },
    {
      "user": "rmccreath",
      "count": 3,
      "uuid": 33964310
    },
    {
      "user": "ciarag01",
      "count": 1,
      "uuid": 36995878
    },
    {
      "user": "alice-hannah",
      "count": 1,
      "uuid": 36480969
    }
  ],
  "_userbio": {
    "uuid": 35955342,
    "type": "organization",
    "name": "Public Health Scotland",
    "followers": 234
  },
  "_downloads": {
    "count": 389,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/phsmethods"
  },
  "_devurl": "https://github.com/public-health-scotland/phsmethods",
  "_pkgdown": "https://code.publichealthscotland.scot/phsmethods",
  "_searchresults": 146,
  "_rbuild": "4.6.1",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/manual.pdf",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/phsmethods.html",
    "extra/readme.html",
    "extra/readme.md"
  ],
  "_homeurl": "https://github.com/public-health-scotland/phsmethods",
  "_realowner": "public-health-scotland",
  "_cranurl": true,
  "_releases": [
    {
      "version": "1.0.0",
      "date": "2023-11-03"
    },
    {
      "version": "1.0.1",
      "date": "2023-11-28"
    },
    {
      "version": "1.0.2",
      "date": "2024-01-09"
    },
    {
      "version": "1.1.0",
      "date": "2026-03-30"
    },
    {
      "version": "1.2.0",
      "date": "2026-07-31"
    }
  ],
  "_exports": [
    "age_calculate",
    "age_from_chi",
    "as_percent",
    "chi_check",
    "chi_pad",
    "create_age_groups",
    "dob_from_chi",
    "extract_fin_year",
    "file_size",
    "format_postcode",
    "match_area",
    "NA_percent_",
    "qtr",
    "qtr_end",
    "qtr_next",
    "qtr_prev",
    "sex_from_chi"
  ],
  "_datasets": [
    {
      "name": "area_lookup",
      "title": "Codes and names of Scottish geographical and administrative areas.",
      "object": "area_lookup",
      "class": [
        "tbl_df",
        "tbl",
        "data.frame"
      ],
      "fields": [
        "geo_code",
        "area_name"
      ],
      "rows": 17278,
      "table": true,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "age_calculate",
      "title": "Calculate age between two dates",
      "topics": [
        "age_calculate"
      ]
    },
    {
      "page": "age_from_chi",
      "title": "Extract age from the CHI number",
      "topics": [
        "age_from_chi"
      ]
    },
    {
      "page": "area_lookup",
      "title": "Codes and names of Scottish geographical and administrative areas.",
      "topics": [
        "area_lookup"
      ]
    },
    {
      "page": "percent",
      "title": "Percentages",
      "topics": [
        "as_percent",
        "NA_percent_"
      ]
    },
    {
      "page": "chi_check",
      "title": "Check the validity of a CHI number",
      "topics": [
        "chi_check"
      ]
    },
    {
      "page": "chi_pad",
      "title": "Add a leading zero to nine-digit CHI numbers",
      "topics": [
        "chi_pad"
      ]
    },
    {
      "page": "create_age_groups",
      "title": "Create age groups",
      "topics": [
        "create_age_groups"
      ]
    },
    {
      "page": "dob_from_chi",
      "title": "Extract Date of Birth (DoB) from the CHI number",
      "topics": [
        "dob_from_chi"
      ]
    },
    {
      "page": "extract_fin_year",
      "title": "Extract the formatted financial year from a date",
      "topics": [
        "extract_fin_year"
      ]
    },
    {
      "page": "format_postcode",
      "title": "Format a postcode",
      "topics": [
        "format_postcode"
      ]
    },
    {
      "page": "match_area",
      "title": "Translate geography codes into area names",
      "topics": [
        "match_area"
      ]
    },
    {
      "page": "qtr",
      "title": "Assign a date to a quarter",
      "topics": [
        "qtr",
        "qtr_end",
        "qtr_next",
        "qtr_prev"
      ]
    },
    {
      "page": "sex_from_chi",
      "title": "Extract sex from the CHI number",
      "topics": [
        "sex_from_chi"
      ]
    }
  ],
  "_readme": "https://github.com/public-health-scotland/phsmethods/raw/HEAD/README.md",
  "_rundeps": [
    "bit",
    "bit64",
    "cli",
    "clipr",
    "cpp11",
    "crayon",
    "dplyr",
    "farver",
    "generics",
    "glue",
    "hms",
    "labeling",
    "lifecycle",
    "lubridate",
    "magrittr",
    "pillar",
    "pkgconfig",
    "prettyunits",
    "progress",
    "R6",
    "RColorBrewer",
    "readr",
    "rlang",
    "scales",
    "stringi",
    "stringr",
    "tibble",
    "tidyselect",
    "timechange",
    "tzdb",
    "utf8",
    "vctrs",
    "viridisLite",
    "vroom",
    "withr"
  ],
  "_vignettes": [
    {
      "source": "percent.Rmd",
      "filename": "percent.html",
      "title": "Using percent vectors",
      "author": "Nick Christofides",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Motivation",
        "Creating percentages",
        "Rounding",
        "Rounding via as_percent + digits",
        "Rounding via round()",
        "Math with percent vectors",
        "percent vectors and tidyverse",
        " vectors and formatted tables",
        "percent vectors and ggplot2"
      ],
      "created": "2026-02-05 12:03:38",
      "modified": "2026-02-05 12:03:38",
      "commits": 1
    },
    {
      "source": "chi-operations.Rmd",
      "filename": "chi-operations.html",
      "title": "Working with CHI numbers",
      "author": "James Hayes, Alan Yeung",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Checking and correcting CHI numbers",
        "Cleaning up bad CHI numbers",
        "Inferring data from a CHI number",
        "The structure of a CHI number",
        "Modulus-11 check",
        "Changes to CHI numbers (August 2026): Inclusion of Modulus-10 check",
        "Extracting sex from CHI",
        "Extracting Date of Birth from CHI",
        "Extracting age from CHI"
      ],
      "created": "2023-11-28 14:54:36",
      "modified": "2026-08-10 12:56:43",
      "commits": 4
    }
  ],
  "_score": 9.160514149152444,
  "_indexed": true,
  "_nocasepkg": "phsmethods",
  "_universes": [
    "public-health-scotland",
    "tina815"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "1.2.0.9000",
      "date": "2026-10-09T10:21:08.000Z",
      "distro": "resolute",
      "commit": "c1e6f658ef222aaea8a2f4c4bb0b2e416f5aed26",
      "fileid": "https://r2.ropensci.org/a222ab06b271385e0c3815f5ba3c701886e01cabb8f3db3e764662e4acd5c6a4",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/public-health-scotland/actions/runs/37916461706"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "1.2.0.9000",
      "date": "2026-10-09T10:21:07.000Z",
      "distro": "resolute",
      "commit": "c1e6f658ef222aaea8a2f4c4bb0b2e416f5aed26",
      "fileid": "https://r2.ropensci.org/ddfd4dde823f67c309cbf463ea46a236dfbf46cb962d142572c3b5e25b27e75b",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/public-health-scotland/actions/runs/37916461706"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "1.2.0.9000",
      "date": "2026-10-09T10:59:41.000Z",
      "commit": "c1e6f658ef222aaea8a2f4c4bb0b2e416f5aed26",
      "fileid": "https://r2.ropensci.org/1fba5028d6b7d71c25327291650d5f8ba8b826fb649837bb5a81a823114030a9",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/public-health-scotland/actions/runs/37916461706"
    },
    {
      "r": "4.6.1",
      "os": "mac",
      "version": "1.2.0.9000",
      "date": "2026-10-09T10:53:59.000Z",
      "commit": "c1e6f658ef222aaea8a2f4c4bb0b2e416f5aed26",
      "fileid": "https://r2.ropensci.org/1365b96c7cb42910d302e4ec45c2f2a0e2fac16692fb73532de01901887a2863",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/public-health-scotland/actions/runs/37916461706"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "1.2.0.9000",
      "date": "2026-10-09T10:21:05.000Z",
      "commit": "c1e6f658ef222aaea8a2f4c4bb0b2e416f5aed26",
      "fileid": "https://r2.ropensci.org/bad101a887f2c96e0dd139728fa664a05cb5cc5eb3efa8d82c98107916d56d64",
      "status": "success",
      "buildurl": "https://github.com/r-universe/public-health-scotland/actions/runs/37916461706"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "1.2.0.9000",
      "date": "2026-10-09T10:20:18.000Z",
      "commit": "c1e6f658ef222aaea8a2f4c4bb0b2e416f5aed26",
      "fileid": "https://r2.ropensci.org/cad0c5ecc481262e893dc6f4bf03757e8c945f1c1348faaa06773674eae1c23c",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/public-health-scotland/actions/runs/37916461706"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "1.2.0.9000",
      "date": "2026-10-09T10:20:02.000Z",
      "commit": "c1e6f658ef222aaea8a2f4c4bb0b2e416f5aed26",
      "fileid": "https://r2.ropensci.org/8592b4016fdaf3f0e442332cc3b8d640c94eec01a761f3fb1017d69014d9e0e5",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/public-health-scotland/actions/runs/37916461706"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "1.2.0.9000",
      "date": "2026-10-09T10:20:04.000Z",
      "commit": "c1e6f658ef222aaea8a2f4c4bb0b2e416f5aed26",
      "fileid": "https://r2.ropensci.org/747fdd9ff2371faea7f7457463dab91f1e1f7a81c7089ab9e5c54e682b140e35",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/public-health-scotland/actions/runs/37916461706"
    }
  ]
}