{"id":22088020,"url":"https://github.com/coatless-rpkg/ucimlrepo","last_synced_at":"2025-06-28T13:40:35.265Z","repository":{"id":249249734,"uuid":"830850675","full_name":"coatless-rpkg/ucimlrepo","owner":"coatless-rpkg","description":"An unofficial R port of the Python package to download data off of the UCI ML repository","archived":false,"fork":false,"pushed_at":"2024-07-28T05:29:07.000Z","size":1754,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-07-28T06:31:09.848Z","etag":null,"topics":["data","data-science","machine-learning","rstats","statistics","uci-machine-learning","uci-machine-learning-repository","web-api"],"latest_commit_sha":null,"homepage":"http://r-pkg.thecoatlessprofessor.com/ucimlrepo/","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/coatless-rpkg.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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},"funding":{"github":["coatless"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2024-07-19T06:14:08.000Z","updated_at":"2024-07-28T06:31:15.276Z","dependencies_parsed_at":"2024-07-28T06:31:12.804Z","dependency_job_id":null,"html_url":"https://github.com/coatless-rpkg/ucimlrepo","commit_stats":null,"previous_names":["coatless-rpkg/ucimlrepo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coatless-rpkg%2Fucimlrepo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coatless-rpkg%2Fucimlrepo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coatless-rpkg%2Fucimlrepo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coatless-rpkg%2Fucimlrepo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coatless-rpkg","download_url":"https://codeload.github.com/coatless-rpkg/ucimlrepo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227470127,"owners_count":17778930,"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":["data","data-science","machine-learning","rstats","statistics","uci-machine-learning","uci-machine-learning-repository","web-api"],"created_at":"2024-12-01T02:07:22.108Z","updated_at":"2024-12-01T02:07:22.963Z","avatar_url":"https://github.com/coatless-rpkg.png","language":"R","funding_links":["https://github.com/sponsors/coatless"],"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 = \"100%\"\n)\n```\n\n# ucimlrepo \u003cimg src=\"man/figures/logo-ucimlrepo.png\" align =\"right\" alt=\"A hexagonal logo of the ucimlrepo R package that shows data being downloaded from a repository\" width =\"150\"/\u003e\n\n\u003c!-- badges: start --\u003e\n  [![R-CMD-check](https://github.com/coatless-rpkg/ucimlrepo/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/coatless-rpkg/ucimlrepo/actions/workflows/R-CMD-check.yaml)\n  \u003c!-- badges: end --\u003e\n\nThe goal of `ucimlrepo` is to download and import data sets directly into R \nfrom the [UCI Machine Learning Repository](https://archive.ics.uci.edu/).\n\n\u003e [!IMPORTANT]\n\u003e \n\u003e This package is an unoffical port of the [Python `ucimlrepo` package](https://github.com/uci-ml-repo/ucimlrepo).\n\n\n\u003e [!NOTE]\n\u003e\n\u003e Want to have datasets alongside a help documentation entry? \n\u003e \n\u003e Check out the [`{ucidata}`](https://github.com/coatless-rpkg/ucidata) R package!\n\u003e The package provides a small selection of data sets from the\n\u003e UC Irvine Machine Learning Repository alongside of help entries.\n\n## Installation\n\nYou can install the development version of ucimlrepo from [GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"remotes\")\nremotes::install_github(\"coatless-rpkg/ucimlrepo\")\n```\n\n## Usage\n\nTo use `ucimlrepo`, load the package using:\n\n```{r}\n#| label: load-pkg\nlibrary(ucimlrepo)\n```\n\nWith the package now loaded, we can download a dataset using the `fetch_ucirepo()` function\nor use the `list_available_datasets()` function to view a list of available datasets.\n\n### Download data\n\nFor example, to download the `iris` dataset, we can use:\n\n```{r}\n#| label: download dataset\n# Fetch a dataset by name\niris_by_name \u003c- fetch_ucirepo(name = \"iris\")\nnames(iris_by_name)\n```\n\nThere are many levels to the data returned. For example, we can extract the \noriginal data frame containing the `iris` dataset using:\n\n```{r}\niris_uci \u003c- iris_by_name$data$original\nhead(iris_uci)\n```\n\nAlternatively, we could retrieve two data frames, one for the features and one for the targets:\n\n```{r}\niris_features \u003c- iris_by_name$data$features\niris_targets \u003c- iris_by_name$data$targets\n```\n\nWe can then view the first few rows of each data frame:\n\n```{r}\nhead(iris_features)\nhead(iris_targets)\n```\n\nAlternatively, you can also directly query by using an ID found by using\n`list_available_datasets()` or by looking up the dataset on the UCI ML Repo website: \n\n```{r}\n#| label: download dataset by id\n#| eval: false\n# Fetch a dataset by id\niris_by_id \u003c- fetch_ucirepo(id = 53)\n```\n\n\n### View list of data sets\n\nWe can also view a list of data sets available for download\nusing the `list_available_datasets()` function:\n\n```{r}\n#| label: list-packages\n#| eval: false\n# List available datasets\nlist_available_datasets()\n```\n\n\u003e [!NOTE]\n\u003e\n\u003e Not all 600+ datasets on UCI ML Repo are available for download using the package. \n\u003e The current list of available datasets can be viewed [here](https://archive.ics.uci.edu/datasets?Python=true\u0026skip=0\u0026take=25\u0026sort=desc\u0026orderBy=NumHits).\n\u003e \n\u003e If you would like to see a specific dataset added, please submit a comment\n\u003e on an [issue ticket in the upstream repository](https://github.com/uci-ml-repo/ucimlrepo/issues/9).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoatless-rpkg%2Fucimlrepo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoatless-rpkg%2Fucimlrepo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoatless-rpkg%2Fucimlrepo/lists"}