{"id":27428632,"url":"https://github.com/fvd/conceptr","last_synced_at":"2025-10-11T05:34:44.890Z","repository":{"id":71639984,"uuid":"43091669","full_name":"FvD/conceptr","owner":"FvD","description":"R Tools for Concept Hierarchies","archived":false,"fork":false,"pushed_at":"2016-03-14T16:10:06.000Z","size":129,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-14T13:53:01.837Z","etag":null,"topics":[],"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/FvD.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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":"2015-09-24T20:35:11.000Z","updated_at":"2016-03-14T14:35:34.000Z","dependencies_parsed_at":"2023-02-23T07:46:11.009Z","dependency_job_id":null,"html_url":"https://github.com/FvD/conceptr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/FvD/conceptr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FvD%2Fconceptr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FvD%2Fconceptr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FvD%2Fconceptr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FvD%2Fconceptr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FvD","download_url":"https://codeload.github.com/FvD/conceptr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FvD%2Fconceptr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006323,"owners_count":26084085,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-04-14T13:39:05.519Z","updated_at":"2025-10-11T05:34:44.885Z","avatar_url":"https://github.com/FvD.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Travis-CI Build Status](https://travis-ci.org/FvD/conceptr.svg?branch=master)](https://travis-ci.org/FvD/conceptr) \n[![Coverage Status](https://img.shields.io/codecov/c/github/FvD/conceptr/master.svg)](https://codecov.io/github/FvD/conceptr?branch=master)\n\n\n***\nPlease look into\n[data.tree](https://cran.r-project.org/web/packages/data.tree/index.html)\npackage first if you need a way to work with hierarchical data structured as\ntrees. The `data.tree` package is mature and probably does what you need.\n\nThis is a convenience package that includes amongst other things the posibility\nto read trees in self-referencing tables. There is no release yet, and is under\nactive development. Be careful if you use the current development version as\nyou may likely run into be errors. \n***\n\n# conceptr\nConcept hierarchies are common in many knowledge areas and applications of\nstatistics. They can be deceptively simple, as they are easy to intuit, but can\noffer annoying problems while working with them as data set. \n\nThis package was made with a specific concept hierarchy in mind where the\nhierarchy is represented by a table with id, concept-name and parent-id. This\nstructure that is often found in biological data, in competency data (Human \nResource Management) and business-inventories. \n\nA typical example could be as follows:\n\n    Level1:      A           B           C          D\n                 |           |           |     \n    Level2:    AA AB      BA BB BD      CA    \n               |                         |\n    Level3:   AAA                     CAA CAB\n                                       |\n    Level4:                          CABA\n\nThis kind of tree structure can be used for instance on hierarchies such as\ntree \u003e Oak \u003e White Oak. Or Technical Skills \u003e Programming \u003e R, or Sales \u003e EMEA \u003e \nEurope \u003e Lithuania. These are also called multilevel classes, or multilevel\nfeatures (in Machine Learning applications). \n\nThe goal of the package `conceptr` package is to help you when you need to work\nwith these kinds of data by allowing you to make the hierarchy corresponding to\nthe data explicit so that it becomes easier to:\n\n1. Roll-up data into higher order concepts, even if they are implied but not\n   included in the data set itself. For example, you have White Oaks and\n   Chihuaha Oaks, but no entry for \"Oaks\". That higher order concept \"Oak\" is\n   implicit in the data set and can be added by summing sub-level concept.\n2. Visualize the hierarchies as a tree using networkD3.\n3. Inspect the data to see whether it conforms with the given hierarchy\n4. Visualize data in the hierarchy using ternary diagrams.\n\n## Installation\nThe package is still far from complete, so please be mindful of errors if you\nare going to use this. By all means report or fix any issues that you may find.\n\nTo install makes sure you have the package `devtools` installed and run:\n\n    devtools::install_github(\"fvd/conceptr\")\n\n## Usage\n### Data formats\nThe library is still primitive and not tested for all possible exceptions. You\ncan help by reporting any issues you find with your data so that the package\ncan be made more generic.\n\nAt the moment a number of conventions are imposed:\n\n1. The `hierarchy` data frame has three columns with names `c(\"id\",\"name\",\n   \"parent_id\")`\n1. The column names in the `data` data frame need to match the names in\n   `hierarachy$name` \n\nNote that to match the names in the hierarchy and data data frames both the\n`hierarchy$name` column and column names in `data` will be normalized with\n`make.names`.\n\n## Features\n### Aggregate data\nAggregate all data from all the sub-levels of a concept by summing the\nobservations. So in the example `aggregate_byname(D)` returns `D` and\n`aggregate_byname(B)` returns `B+BA+BB+BD`. We need to reference the hierarchy\nto use so the full example would be:\n\n     aggregate_byname(data, hierarchy, \"Level1-D\")\n \nand\n\n    aggregate_byname(data, hierarchy, \"Level1-B\")\n\nThe full names in the test data base include the levels, so Level1-A, Level2-AA\netc.\n\n### Visualize hierarchies\n\n![example network diagram](https://raw.githubusercontent.com/FvD/conceptr/gh-pages/images/visualize_networkD3.png)\n\n### Plot selected concepts\nMake exploratory analysis of the data at different levels easier by plotting by\nname. \n\n    visualize_ternary(data, hierarchy, c(\"A\", \"BA\", \"CAA\"))\n \n### Planned \n\n* Visualize hierarchy (create tree with networkD3)\n* Inspect hierarchy (check the structure of the hierarchy)\n\n## Example data\nThere is a small example data set included that you can compare to your own.\nPlease note that you preferably use R-style names (no spaces, no non-ASCII) for\nthe column names in the data file. The package will `make.normal` any names\nthat it will find.\n\nTo load the test data from the inst folder in the package:\n\n    data \u003c- read.csv(system.file(\"data.csv\", package=\"conceptr\"))\n    hierarchy \u003c- read.csv(system.file(\"concept-hierarchy.csv\", package=\"conceptr\"))\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffvd%2Fconceptr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffvd%2Fconceptr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffvd%2Fconceptr/lists"}