{"id":27428626,"url":"https://github.com/fvd/junr","last_synced_at":"2025-04-14T13:39:06.154Z","repository":{"id":71640094,"uuid":"54205919","full_name":"FvD/junr","owner":"FvD","description":"Access Open Data Through the Junar API","archived":false,"fork":false,"pushed_at":"2021-02-14T01:05:12.000Z","size":134,"stargazers_count":1,"open_issues_count":6,"forks_count":8,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-01-27T14:43:41.827Z","etag":null,"topics":["government-data","junar-api","open-data","open-datasets"],"latest_commit_sha":null,"homepage":"https://fvd.github.io/junr/","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.Rmd","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}},"created_at":"2016-03-18T14:08:09.000Z","updated_at":"2020-02-01T08:43:37.000Z","dependencies_parsed_at":"2023-02-23T07:46:12.009Z","dependency_job_id":null,"html_url":"https://github.com/FvD/junr","commit_stats":{"total_commits":88,"total_committers":3,"mean_commits":"29.333333333333332","dds":0.2272727272727273,"last_synced_commit":"dd6d1173891296ae6d9537ce0814a397faba1273"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FvD%2Fjunr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FvD%2Fjunr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FvD%2Fjunr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FvD%2Fjunr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FvD","download_url":"https://codeload.github.com/FvD/junr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248889646,"owners_count":21178267,"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":["government-data","junar-api","open-data","open-datasets"],"created_at":"2025-04-14T13:39:04.729Z","updated_at":"2025-04-14T13:39:06.097Z","avatar_url":"https://github.com/FvD.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 = \"100%\"\n)\n```\n\n# junr\n\n\u003c!-- badges: start --\u003e\n[![Travis-CI Build Status](https://travis-ci.org/FvD/junr.svg?branch=master)](https://travis-ci.org/FvD/junr) \n[![Coverage Status](https://img.shields.io/codecov/c/github/FvD/junr/master.svg)](https://codecov.io/github/FvD/junr?branch=master)\n[![CRAN Status Badge](http://www.r-pkg.org/badges/version/junr)](https://cran.r-project.org/package=junr)\n\u003c!-- badges: end --\u003e\n\n## Access Open Data in R through the Junar API\nThe Junar API is the basis for a number of Open Data initiatives in Latin\nAmerica and the USA.  The `junr` package is a wrapper to make it easier to\naccess data made public through the Junar API. Some examples of implementations\nare: [the City of Pasadena](http://data.cityofpasadena.net/home/), and [the\nCity of San Jose](http://data.sanjoseca.gov/home/). Others are listed on the\n[Junar website](http://junar.com/).\n\n### Installation\n\n```{r, eval=FALSE}\ninstall.packages(\"devtools\")\ndevtools::install_github(\"FvD/junr\")\n```\n\n### Usage\nFor a full example, please consult the [package\nvignette](http://rpubs.com/FvD/access-junar-api). \n\n**Load the package and set URL and API-Key**\n\n```{r}\nlibrary(junr)\nbase_url \u003c- \"http://api.datosabiertos.presidencia.go.cr/api/v2/datastreams/\"\napi_key \u003c- \"the-API-Key-from-the-corresponding-url\" \n```\nWith this connection information the `junr` package helps you to do the following:\n\n**Get the index of data behind the base URL**\n\n```{r, eval=FALSE}\nget_index(base_url, api_key)\n```\n\nYou can also just get a list of GUID's `list_guid(base_url, api_key)` or a list\nof data set titles `list_titles(base_url, api_key)`.\n\n**Get a particular data set**\n\n```{r, eval=FALSE}\ndata_guid \u003c- \"COMPR-PUBLI-DEL-MINIS\"\npurchasing_data \u003c- get_data(base_url, api_key, data_guid)\n```\n**Determine data dimensions**\n\n```{r, eval=FALSE}\nget_dimensions(base_url, api_key)\n```\n\n**Clean up currency data**\n\n```{r, eval=FALSE}\ncurrency_data \u003c- get_data(base_url, api_key, \"LICIT-ADJUD-POR-LOS-MINIS\")\ncurrency_data$`Monto Adjudicado` \u003c- clean_currency(currency_data$`Monto Adjudicado`)  \n```\n\n## Accede Datos a través del API de Junar en R\nEl API de Junar es la base para varias iniciativas de Datos Abiertos en Latino\nAmérica y los EEUU.  El paquete `junr` facilita el acceso a estos datos des R.\nEl objetivo es fomentar el uso de los datos disponibles haciendo el acceso lo\nmas fácil. Algunos ejemplos de implementaciones son: [el Portal de Datos\nAbiertos del Gobierno de Costa\nRica](http://datosabiertos.presidencia.go.cr/home) y la Ciudad de Córdoba (Argentina)\nentre otros. Otros se pueden encontrar en el [sitio web de Junar](http://junar.com/).\n\n\n### Instalación\nPara instalar este paquete desde Github es necesario tener el paquete\n`devtools` instalado:\n\n```{r, eval=FALSE}\ninstall.packages(\"devtools\")\ndevtools::install_github(\"FvD/junr\")\n```\n\n### Uso \nPara un ejemplo completo por favor consulta la [documentación](http://rpubs.com/FvD/acceder-junar-api).\n\n**Carga el paquete y define el URL y API-Key**\n\n```{r, eval=FALSE}\nlibrary(junr)\nurl_base \u003c- \"http://api.datosabiertos.presidencia.go.cr/api/v2/datastreams/\"\napi_key \u003c- \"El-API-Key-que-obtuviste-de-la-pagina\"\n```\n\n**Obten un indice de los datos detras del URL**\n\n```{r, eval=FALSE}\nget_index(url_base, api_key)\n```\n\nPara tener solo una lista de los GUID la instrucción puedes usar\n`list_guid(url_base, api_key)` o para solo un listado de los títulos:\n`list_titles(url_base, api_key)`\n\n**Obten un conjunto de datos determinado**\n\n```{r, eval=FALSE}\nguid_datos \u003c- \"COMPR-PUBLI-DEL-MINIS\"\ndatos_compras \u003c- get_data(url_base, api_key, guid_datos)\n```\n\n**Determina la cantidad de datos disponibles**\n\n```{r, eval=FALSE}\nget_dimensions(url_base, api_key)\n``` \n\n**Limpiar valores de divisas**\n\n```{r, eval=FALSE}\ndatos_con_divisas \u003c- get_data(base_url, api_key, \"LICIT-ADJUD-POR-LOS-MINIS\")\ndatos_con_divisas$`Monto Adjudicado` \u003c- clean_currency(datos_con_divisas$`Monto Adjudicado`)  \n```\n   \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffvd%2Fjunr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffvd%2Fjunr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffvd%2Fjunr/lists"}