{"id":23372914,"url":"https://github.com/urbananalyst/us-hardship-index","last_synced_at":"2025-04-08T02:49:27.660Z","repository":{"id":195748943,"uuid":"693241715","full_name":"UrbanAnalyst/us-hardship-index","owner":"UrbanAnalyst","description":"National hardship index from US census data","archived":false,"fork":false,"pushed_at":"2024-08-21T09:02:26.000Z","size":54,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T02:19:29.486Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UrbanAnalyst.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":"codemeta.json"}},"created_at":"2023-09-18T16:21:30.000Z","updated_at":"2024-09-06T18:43:54.000Z","dependencies_parsed_at":"2023-09-19T12:42:14.818Z","dependency_job_id":"8b030d24-97fd-4167-97dc-65fe02874e8b","html_url":"https://github.com/UrbanAnalyst/us-hardship-index","commit_stats":null,"previous_names":["urbananalyst/us-hardship-index"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UrbanAnalyst%2Fus-hardship-index","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UrbanAnalyst%2Fus-hardship-index/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UrbanAnalyst%2Fus-hardship-index/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UrbanAnalyst%2Fus-hardship-index/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UrbanAnalyst","download_url":"https://codeload.github.com/UrbanAnalyst/us-hardship-index/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247767261,"owners_count":20992541,"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":[],"created_at":"2024-12-21T16:51:19.968Z","updated_at":"2025-04-08T02:49:27.632Z","avatar_url":"https://github.com/UrbanAnalyst.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\ntitle: \"US Hardship Index\"\noutput:\n  md_document:\n    variant: markdown_github\n\n  rmarkdown::html_vignette:\n    self_contained: no\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r opts, echo = FALSE}\nknitr::opts_chunk$set (\n    collapse = TRUE,\n    warning = TRUE,\n    message = TRUE,\n    width = 120,\n    comment = \"#\u003e\",\n    fig.retina = 2,\n    fig.path = \"README-\"\n)\n```\n\n[![R build\nstatus](https://github.com/UrbanAnalyst/us-hardship-index/workflows/R-CMD-check/badge.svg)](https://github.com/UrbanAnalyst/us-hardship-index/actions?query=workflow%3AR-CMD-check)\n[![Project Status: Active](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)\n\n\n# US Hardship Index\n\n`us-hardship-index` is an R package for calculating a hardship index for\nspecified US states, using data from the US Census Bureau's *American Community\nSurvey*. It includes the single primary function `hs_hardship_index()`, which\naccepts the two parameters of:\n\n- \"state\" for the desired US state; and\n- \"year\" for the desired year (with values available since 2010).\n\nThe index itself is calculated from the methodology of \"*An Update on Urban\nHardship*,\" by Lisa M. Monteil, Richard P. Nathan, and David J. Wright (2004),\n*The Nelson A. Rockefeller Institute of Goverment*. It is formed as a multiple\nof the following six measures, each standardised to unit (or percentage)\nscales:\n\n- *occupancy*: Proportion of rooms with \u003e 1 occupant per room;\n- *poverty*: Proportion of households below poverty line;\n- *unemployment*: Proportion of unemployed adults;\n- *no_hs*: Proportion of population without highschool diploma\n- *deps*:  Proportion of population who may be considered dependent; that is\n  either under 18 or over 65\n- *income*: Per-capita income\n\nAll variables are quantified such that lower values are better, except for\nincome. The hardship index is then simply the product of those six metrics,\nagain standardised to a unit (or percentage) scale. An example of the index in\naction is provided by [the city of Chicago](\nhttps://data.cityofchicago.org/Health-Human-Services/Census-Data-Selected-socioeconomic-indicators-in-C/kn9c-c2s2/data),\nas a table of the six metrics plus their conversion to a composite hardship\nindex.\n\nNote that those Chicago data are ultimately transformed into a single rank for\neach measured area, and so manifest a perfectly uniform distribution. In\ncontrast, the values returned by the `hs_hardship_index()` function are not\ntransformed, and so generally manifest highly skewed distributions. The\nlogarithm of these values will nevertheless generally be approximately normally\ndistributed. Accordingly, any statistical analyses of hardship values should\ngenerally be applied to log-transformed versions of the values derived here.\n\n## Access to Census Bureau Data\n\nThis package requires an API key for census.gov, which can be obtained from\n[the Census Bureau's website](https://api.census.gov/data/key_signup.html).\nThis key should be stored as an environment variable named `CENSUS_API_KEY`,\ngenerally by specifying its value in the `~/.Renviron` file. Alternatively, the\nkey can be set with the [`tidycensus` function,\n`census_api_key()`](https://walker-data.com/tidycensus/reference/census_api_key.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furbananalyst%2Fus-hardship-index","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Furbananalyst%2Fus-hardship-index","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Furbananalyst%2Fus-hardship-index/lists"}