{"id":22713537,"url":"https://github.com/program--/fipio","last_synced_at":"2025-04-13T17:36:10.953Z","repository":{"id":43176938,"uuid":"415489022","full_name":"program--/fipio","owner":"program--","description":"An R :package: for lightweight FIPS code information retrieval","archived":false,"fork":false,"pushed_at":"2024-05-25T01:41:56.000Z","size":17754,"stargazers_count":14,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T05:05:37.371Z","etag":null,"topics":["information-retrieval","r","spatial","us-data"],"latest_commit_sha":null,"homepage":"https://fipio.justinsingh.me","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/program--.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}},"created_at":"2021-10-10T04:53:00.000Z","updated_at":"2024-05-13T19:15:17.000Z","dependencies_parsed_at":"2024-01-22T00:35:04.432Z","dependency_job_id":"679ea56b-1a7d-4ea1-b3f4-3b1166269025","html_url":"https://github.com/program--/fipio","commit_stats":{"total_commits":38,"total_committers":2,"mean_commits":19.0,"dds":0.02631578947368418,"last_synced_commit":"85ccde86cd84a1c12536b2e4bfc947bfc60b00c2"},"previous_names":["UFOKN/fipio","ufokn/fipio"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/program--%2Ffipio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/program--%2Ffipio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/program--%2Ffipio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/program--%2Ffipio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/program--","download_url":"https://codeload.github.com/program--/fipio/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248753146,"owners_count":21156219,"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":["information-retrieval","r","spatial","us-data"],"created_at":"2024-12-10T14:09:30.338Z","updated_at":"2025-04-13T17:36:10.930Z","avatar_url":"https://github.com/program--.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# fipio \u003ca href=\"https://github.com/program--/fipio\"\u003e\u003cimg src=\"man/figures/logo.png\" align=\"right\" width=\"25%\"/\u003e\u003c/a\u003e\n\n\u003c!-- badges: start --\u003e\n[![CRAN status](https://www.r-pkg.org/badges/version/fipio)](https://CRAN.R-project.org/package=fipio)\n[![CRAN downloads](https://cranlogs.r-pkg.org/badges/fipio)](https://CRAN.R-project.org/package=fipio)\n[![codecov](https://codecov.io/gh/program--/fipio/graph/badge.svg?token=1ODDHARQM1)](https://app.codecov.io/gh/program--/fipio)\n[![R-CMD-check](https://github.com/program--/fipio/workflows/R-CMD-check/badge.svg)](https://github.com/program--/fipio/actions)\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/license/mit/)\n\u003c!-- badges: end --\u003e\n\n`fipio` is a **lightweight** package that makes it easy to get information about a US FIPS code.\n\n## Installation\n\nYou can install the released version of `fipio` from [CRAN](https://cran.r-project.org/package=fipio) with:\n\n``` r\ninstall.packages(\"fipio\")\n```\n\nor the development version with `pak` or `remotes`:\n``` r\n# Using `pak`\npak::pkg_install(\"program--/fipio\")\n\n# Using `remotes`\nremotes::install_github(\"program--/fipio\")\n```\n\n## Usage\n\n`fipio` makes it easy to get information about a US FIPS code.\nLet's answer a few questions that might come up if you have a FIPS code:\n\n```{r}\nfip \u003c- \"37129\"\n\n# What state is `37129` in?\nfipio::fips_state(fip)\n\n# Alternatively, you can use the state FIPS code by itself\nfipio::fips_state(\"37\")\n\n# What about the state abbreviation?\nfipio::fips_abbr(fip)\n\n# What county is `37129`?\nfipio::fips_county(fip)\n\n# It'd be nice to have this all in a data.frame...\nfipio::fips_metadata(fip)\n\n# And the metadata for the state by itself...\nfipio::fips_metadata(\"37\")\n```\n\n### With `sf`\n`fipio` also includes functions that support geometry for FIPS codes. This requires\n`sfheaders` at the very least to get an `sf`-compatible geometry object back.\n\n```{r, include = FALSE}\nlibrary(sf, quietly = TRUE)\n```\n\n```{r}\n# I'm doing spatial work, what's the geometry of `37129`?\nfipio::fips_geometry(fip)\n\n# What if I need it with my other metadata?\nfipio::fips_metadata(fip, geometry = TRUE)\n```\n\n### Vectorized\n`fipio` functions are inherently vectorized, so you can use them with vectors of FIPS codes easily:\n```{r}\nfips \u003c- c(\"37129\", \"44001\", \"48115\")\n\nfipio::fips_state(fips)\n\nfipio::fips_abbr(fips)\n\nfipio::fips_county(fips)\n\nfipio::fips_metadata(fips)\n\nfipio::fips_geometry(fips)\n```\n\n### Reverse Geolocate Coordinates to FIPS\n`fipio` contains the ability to locate the FIPS code(s) for a set of coordinates (in `WGS84`/`EPSG:4326`):\n```{r}\n# With a single set of coordinates\nfipio::coords_to_fips(x = -119.8696, y = 34.4184)\n\n# Vectorized\nfipio::coords_to_fips(\n    x = c(-81.4980534549709, -81.1249425046948),\n    y = c(36.4314781444978, 36.4911893240597)\n)\n\n# With a `data.frame` or `matrix`\nfipio::coords_to_fips(\n    x = data.frame(\n        X = c(-81.4980534549709, -81.1249425046948),\n        Y = c(36.4314781444978, 36.4911893240597)\n    ),\n    coords = c(\"X\", \"Y\")\n)\n\n# With an `sfg` object\nfipio::coords_to_fips(\n    x   = sf::st_point(c(-81.4980534549709,\n                         36.4314781444978)),\n    dim = \"XY\"\n)\n\n# With an `sf` object\nfipio::coords_to_fips(\n    x = sf::st_as_sf(\n        data.frame(X = c(-81.4980534549709, -81.1249425046948),\n                   Y = c(36.4314781444978, 36.4911893240597)),\n        coords = c(\"X\", \"Y\"),\n        crs = 4326\n    )\n)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogram--%2Ffipio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprogram--%2Ffipio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprogram--%2Ffipio/lists"}