Skip to content

Commit

Permalink
describe api key in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Sep 20, 2023
1 parent 068c456 commit 1e7f7f7
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 5 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: ushardship
Title: Hardship Index from United States Census Data
Version: 0.0.1.019
Version: 0.0.1.020
Authors@R:
person(given = "Mark",
family = "Padgham",
Expand Down
14 changes: 12 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ status](https://github.com/UrbanAnalyst/us-hardship-index/workflows/R-CMD-check/
# US Hardship Index

`us-hardship-index` is an R package for calculating a hardship index for
specified US states. It includes the single primary function
`hs_hardship_index()`, which accepts the two parameters of:
specified US states, using data from the US Census Bureau's *American Community
Survey*. It includes the single primary function `hs_hardship_index()`, which
accepts the two parameters of:

- "state" for the desired US state; and
- "year" for the desired year (with values available since 2010).
Expand All @@ -57,3 +58,12 @@ action is provided by [the city of Chicago](
https://data.cityofchicago.org/Health-Human-Services/Census-Data-Selected-socioeconomic-indicators-in-C/kn9c-c2s2/data),
as a table of the six metrics plus their conversion to a composite hardship
index.

## Access to Census Bureau Data

This package requires an API key for census.gov, which can be obtained from
[the Census Bureau's website](https://api.census.gov/data/key_signup.html).
This key should be stored as an environment variable named `CENSUS_API_KEY`,
generally by specifying its value in the `~/.Renviron` file. Alternatively, the
key can be set with the [`tidycensus` function,
`census_api_key()`](https://walker-data.com/tidycensus/reference/census_api_key.html).
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ Active](https://www.repostatus.org/badges/latest/active.svg)](https://www.repost
# US Hardship Index

`us-hardship-index` is an R package for calculating a hardship index for
specified US states. It includes the single primary function
specified US states, using data from the US Census Bureau’s *American
Community Survey*. It includes the single primary function
`hs_hardship_index()`, which accepts the two parameters of:

- “state” for the desired US state; and
Expand All @@ -35,3 +36,13 @@ of the index in action is provided by [the city of
Chicago](https://data.cityofchicago.org/Health-Human-Services/Census-Data-Selected-socioeconomic-indicators-in-C/kn9c-c2s2/data),
as a table of the six metrics plus their conversion to a composite
hardship index.

## Access to Census Bureau Data

This package requires an API key for census.gov, which can be obtained
from [the Census Bureau’s
website](https://api.census.gov/data/key_signup.html). This key should
be stored as an environment variable named `CENSUS_API_KEY`, generally
by specifying its value in the `~/.Renviron` file. Alternatively, the
key can be set with the [`tidycensus` function,
`census_api_key()`](https://walker-data.com/tidycensus/reference/census_api_key.html).
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"codeRepository": "https://github.com/UrbanAnalyst/us-hardship-index",
"issueTracker": "https://github.com/UrbanAnalyst/us-hardship-index/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.0.1.019",
"version": "0.0.1.020",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down

0 comments on commit 1e7f7f7

Please sign in to comment.