Skip to content

Commit

Permalink
organize vignettes vs web articles re #97 and more pkgdown n tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
hrecht committed Mar 26, 2024
1 parent 5585e9f commit 4de9663
Show file tree
Hide file tree
Showing 31 changed files with 428 additions and 1,262 deletions.
6 changes: 1 addition & 5 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,5 @@ pkgdown/
^pkgdown$
.github/
^.github$
vignettes/getting-started.Rmd
vignettes/example-list.Rmd
vignettes/advanced-usage.Rmd
vignettes/accessing-microdata.Rmd
vignettes/frequently-asked-questions.Rmd
^\.github$
^vignettes/articles$
1 change: 1 addition & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ Suggests:
knitr,
rmarkdown
Encoding: UTF-8
VignetteBuilder: knitr
5 changes: 3 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ apis_timeseries <- listCensusApis(name = "timeseries")
```

## Minor improvements
* `getCensus()` automatically converts data columns in the Household Pulse Survey to numeric.
* `getCensus()` automatically converts data columns from the Household Pulse Survey (`name = "timeseries/hps"`) to numeric.

## Documentation
* Function documentation is improved and better formatted.
* A new online [frequently asked questions article](https://www.hrecht.com/censusapi/articles/frequently-asked-questions.html) improves documentation.
* Examples are updated to use newly released datasets.
* A new online [frequently asked questions article](https://www.hrecht.com/censusapi/articles/frequently-asked-questions.html) improves documentation.
* A new vignette included in the package build directs users to the website to read web-only articles.

# censusapi 0.8.0
* `listCensusApis()` has new columns in the resulting data frame of available API endpoints: the API `contact` email address and `type`: either Aggregate, Timeseries, or Microdata.
Expand Down
12 changes: 6 additions & 6 deletions R/metadata_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,30 @@
#' this needs to be the left-most part of the dataset name before `/`, e.g.
#' "timeseries/eits" or "dec" or "acs/acs5".
#' @param vintage Optional vintage (year) of dataset.
#' @export
#' @examples
#' \dontrun{
#' # Get information about every dataset available in the APIs
#' apis <- listCensusApis()
#' head(apis)
#'
#' Get information about all vintage 2022 datasets
#' # Get information about all vintage 2022 datasets
#' apis_2022 <- listCensusApis(vintage = 2022)
#' head(apis_2022)
#'
#' Get information about all timeseries datasets
#' # Get information about all timeseries datasets
#' apis_timeseries <- listCensusApis(name = "timeseries")
#' head(apis_timeseries)
#'
#' Get information about 2020 Decennial Census datasets
#' # Get information about 2020 Decennial Census datasets
#' apis_decennial_2020 <- listCensusApis(name = "dec", vintage = 2020)
#' head(apis_decennial_2020)
#'
#' Get information about one particular dataset
#' # Get information about one particular dataset
#' api_sahie <- listCensusApis(name = "timeseries/healthins/sahie")
#' head(api_sahie)
#' }

#'
#' @export
listCensusApis <- function(name = NULL,
vintage = NULL) {
constructURL <- function(name, vintage) {
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
[![R-CMD-check](https://github.com/hrecht/censusapi/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/hrecht/censusapi/actions/workflows/R-CMD-check.yaml)
<!-- badges: end -->

`censusapi` is a lightweight package to get data from the U.S. Census Bureau's [APIs](https://www.census.gov/data/developers.html). More than [1,000 Census API endpoints](https://api.census.gov/data.html) are available, including the Decennial Census, American Community Survey, Poverty Statistics, Population Estimates, and Census microdata. This package is designed to let you get data from all of those APIs using the same main functions and syntax for every dataset.
`censusapi` is a lightweight package to get data from the U.S. Census Bureau's [APIs](https://www.census.gov/data/developers.html). More than [1,500 Census API endpoints](https://api.census.gov/data.html) are available, including the Decennial Census, American Community Survey, Poverty Statistics, Population Estimates, and Census microdata. This package is designed to let you get data from all of those APIs using the same main functions and syntax for every dataset.

`getCensus()` is designed to work with any new Census API endpoint when it is released, as long as it conforms to Census's existing standards. The package also includes metadata functions so that users determine [which datasets](https://www.hrecht.com/censusapi/reference/listCensusApis.html) are available and [for each dataset](https://www.hrecht.com/censusapi/reference/listCensusMetadata.html), what variables, geographies, and groups can be used.
The package also includes metadata functions to help users determine [which datasets](https://www.hrecht.com/censusapi/reference/listCensusApis.html) are available and the variable, geography, and other options [each of them contains](https://www.hrecht.com/censusapi/reference/listCensusMetadata.html).

## Installation
Get the latest stable release from CRAN:
Expand Down
18 changes: 18 additions & 0 deletions _pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ template:
paragraph-margin-bottom: 1.5rem

navbar:
structure:
left: [start, reference, articles, news]
components:
start:
text: Get started
href: articles/getting-started.html
articles:
text: Articles
menu:
Expand All @@ -23,5 +28,18 @@ navbar:
- text: Accessing microdata
href: articles/accessing-microdata.html

reference:
- title: "Get data"
contents:
- getCensus
- title: "Get metadata"
contents:
- listCensusApis
- listCensusMetadata
- makeVarlist
- title: "Helpers"
contents:
- fips

redirects:
- ["articles/example-masterlist.html", "articles/example-list.html"]
3 changes: 3 additions & 0 deletions docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions docs/CODE_OF_CONDUCT.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion docs/articles/accessing-microdata.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4de9663

Please sign in to comment.