Package censusr. R topics documented: June 14, Type Package Title Collect Data from the Census API Version 0.0.

Similar documents
Package censusapi. August 19, 2018

Package cattonum. R topics documented: May 2, Type Package Version Title Encode Categorical Features

Package fitbitscraper

Package fastdummies. January 8, 2018

Package jpmesh. December 4, 2017

Package robotstxt. November 12, 2017

Package dkanr. July 12, 2018

Package facerec. May 14, 2018

Package qualmap. R topics documented: September 12, Type Package

Package cancensus. February 4, 2018

Package rmapzen. October 7, 2018

Package ECctmc. May 1, 2018

Package SEMrushR. November 3, 2018

Package geojsonsf. R topics documented: January 11, Type Package Title GeoJSON to Simple Feature Converter Version 1.3.

Package nlgeocoder. October 8, 2018

Package areal. December 31, 2018

Package validara. October 19, 2017

Package calpassapi. August 25, 2018

Package rzeit2. January 7, 2019

Package virustotal. May 1, 2017

Package statsdk. September 30, 2017

Package nngeo. September 29, 2018

Package mapsapi. March 12, 2018

Package opencage. January 16, 2018

Package tidytransit. March 4, 2019

Package repec. August 31, 2018

Package internetarchive

Package reval. May 26, 2015

Package rcv. August 11, 2017

Package knitrprogressbar

Package rgho. R topics documented: January 18, 2017

Package messaging. May 27, 2018

Package ggimage. R topics documented: November 1, Title Use Image in 'ggplot2' Version 0.0.7

Package fingertipsr. May 25, Type Package Version Title Fingertips Data for Public Health

Package oec. R topics documented: May 11, Type Package

Package editdata. October 7, 2017

Package dbx. July 5, 2018

Package rsppfp. November 20, 2018

Package bisect. April 16, 2018

Package canvasxpress

Package goodpractice

Package datasets.load

Package ggimage. R topics documented: December 5, Title Use Image in 'ggplot2' Version 0.1.0

Package postgistools

Package sfdct. August 29, 2017

Package catenary. May 4, 2018

Package bikedata. April 27, 2018

Package githubinstall

Package skynet. December 12, 2018

Package docxtools. July 6, 2018

Package pdfsearch. July 10, 2018

Package data.world. April 5, 2018

Package postal. July 27, 2018

Package geniusr. December 6, 2017

Package httpcache. October 17, 2017

Package loggit. April 9, 2018

Package rwars. January 14, 2017

Package modules. July 22, 2017

Package essurvey. August 23, 2018

Package algorithmia. September 13, 2016

Package TrafficBDE. March 1, 2018

Package guardianapi. February 3, 2019

Package lumberjack. R topics documented: July 20, 2018

Package smapr. October 20, 2017

Package splithalf. March 17, 2018

Package crossword.r. January 19, 2018

Package climber. R topics documented:

Package spelling. December 18, 2017

Package rprojroot. January 3, Title Finding Files in Project Subdirectories Version 1.3-2

Package genesysr. June 14, 2018

Package vinereg. August 10, 2018

Package widyr. August 14, 2017

Package deductive. June 2, 2017

Package triebeard. August 29, 2016

Package rbgm. May 18, 2018

Package shinyfeedback

Package gtrendsr. October 19, 2017

Package ezsummary. August 29, 2016

Package barcoder. October 26, 2018

Package pwrab. R topics documented: June 6, Type Package Title Power Analysis for AB Testing Version 0.1.0

Package labelvector. July 28, 2018

Package wikitaxa. December 21, 2017

Package colf. October 9, 2017

Package tidytree. June 13, 2018

Package scrubr. August 29, 2016

Package gtrendsr. August 4, 2018

Package IsoCorrectoR. R topics documented:

Package available. November 17, 2017

Package tidylpa. March 28, 2018

Package IATScore. January 10, 2018

Package keyholder. May 19, 2018

Package rnaturalearth

Package comparedf. February 11, 2019

Package omu. August 2, 2018

Package ecoseries. R topics documented: September 27, 2017

Package GetHFData. November 28, 2017

Package projector. February 27, 2018

Package BANEScarparkinglite

Package sfc. August 29, 2016

Package modmarg. R topics documented:

Transcription:

Type Package Title Collect Data from the Census API Version 0.0.3 Date 2017-06-13 Package censusr June 14, 2017 Use the US Census API to collect summary data tables for SF1 and ACS datasets at arbitrary geographies. URL https://github.com/transportfoundry/censusr BugReports https://github.com/transportfoundry/censusr/issues License MIT + file LICENSE LazyData TRUE Depends dplyr (>= 0.4.3), httr (>= 1.0.0) Suggests knitr, rmarkdown VignetteBuilder knitr RoxygenNote 6.0.1 Imports stringr NeedsCompilation no Author Greg Macfarlane [cre, aut], Josie Kressner [aut] Maintainer Greg Macfarlane <greg@transportfoundry.com> Repository CRAN Date/Publication 2017-06-14 13:07:56 UTC R topics documented: aggregate_moe....................................... 2 append_geoid........................................ 3 call_api_once........................................ 3 call_census_api....................................... 4 call_geolocator....................................... 5 1

2 aggregate_moe call_geolocator_latlon.................................... 6 censusr........................................... 6 get_geo_url......................................... 6 Index 8 aggregate_moe Aggregated margin of error across multiple geographies Aggregated margin of error across multiple geographies aggregate_moe(x) x A numeric vector containing margins of error for estimates in multiple geographies. Details Applies a root sum of squared errors. See page A-14 of this guide: https://www.census.gov/library/publications/2009/acs/resea The aggregated margin of error for the geographies. Author(s) Josie Kressner Examples x <- c(3, 5, 12, 4) aggregate_moe(x) data_frame(x = x, group = c(1, 1, 2, 2)) %>% group_by(group) %>% summarise(moe = aggregate_moe(x))

append_geoid 3 append_geoid Retrieve GEOID from the Census Geocoder by address Returns GEOID for 2010 geographies. append_geoid(address, geoid_type = "bl") address geoid_type A tibble/data frame with (at a minimum, others can be present) either character columns street, city, and state OR numeric columns lat and lon. Lat/lon columns take priority. GEOID level to return, c('co', 'tr', 'bg', 'bl'). Defaults to block. the original tibble with GEOIDs appended as a new column called geoid. Examples airports <- dplyr::data_frame( street = "700 Catalina Dr", city = "Daytona Beach", state = "FL" ) append_geoid(airports, 'tr') call_api_once Call Census API for a set of variables This is an internal function and is not intended for users. See instead call_census_api. call_api_once(variables_to_get, geoid, allgeos, data_source, year, period, api_key)

4 call_census_api variables_to_get A character vector of the desired variable names for the Census API call, defined at https://www.census.gov/data/developers/data-sets.html geoid allgeos data_source year period api_key A character string with a FIPS code, between 2 and 15 digits long. (optional) A string identifying the type of geography for which to collect data within the the requested geoids. Must be one of c('co', 'tr', 'bg', 'bl'). For instance, if allgeos = "bg", will return all block groups within the given geoids. A string identifying whether the SF1 (decennial census) or ACS data is desired. If data_source = "acs", the final year of the summary period. Default is 2013. If data_source = "acs", the length of aggregation period. Default is 5, or a 5-year aggregation table. The user s Census API key (as a character string). You can get a free key from [Census](http://api.census.gov/data/key_signup.html). See vignette('censusr', package = 'censusr to setup a default key as an environment variable. A codedata.frame with the requested variables at the requested geography. call_census_api Retrieve data from the Census API Returns Census data for the 2010 SF1 or ACS 2013-2015 1-, 3-, and 5-Yr aggregations for requested variables and geographies. call_census_api(variables_to_get, names = NULL, geoids, allgeos = NULL, data_source = c("sf1", "acs"), year = 2013, period = 5, api_key = NULL) variables_to_get A character vector of the desired variable names for the Census API call, defined at https://www.census.gov/data/developers/data-sets.html names geoids A character vector of the same length as variables_to_get giving the userdefined names for the variables (optional). Defaults to raw API names. A character vector of FIPS codes; must be at least to the county (5-digit) level, and can accept down to blocks (15-digit).

call_geolocator 5 allgeos data_source year period api_key (optional) A string identifying the type of geography for which to collect data within the the requested geoids. Must be one of c('co', 'tr', 'bg', 'bl'). For instance, if allgeos = "bg", will return all block groups within the given geoids. A string identifying whether the SF1 (decennial census) or ACS data is desired. If data_source = "acs", the final year of the summary period. Default is 2013. If data_source = "acs", the length of aggregation period. Default is 5, or a 5-year aggregation table. The user s Census API key (as a character string). You can get a free key from [Census](http://api.census.gov/data/key_signup.html). See vignette('censusr', package = 'censusr to setup a default key as an environment variable. Details See vignette('censusr', package = 'censusr') for examples. a data_frame with each requested variable at each requested geography. call_geolocator Call gelocator for one address Call gelocator for one address call_geolocator(street, city, state) street city state A character string indicating a street name and number A character string indicating a city A two-digit character string with a state postal code A character string representing the Census block of the supplied address. importfrom utils URLencode importfrom httr GET stop_for_status

6 get_geo_url call_geolocator_latlon Call gelocator for one address with lat/lon Call gelocator for one address with lat/lon call_geolocator_latlon(lat, lon) lat lon A numeric value A numeric value A character string representing the Census block of the supplied lat/lon. importfrom utils URLencode importfrom httr GET stop_for_status censusr censusr: A package to download Census API data The censusr package provides principally one main function: call_census_api allows users to pass a list of variables and a list of geographies, and returns a data_frame with the requested data. get_geo_url Construct a geography request string from a FIPS Code Construct a geography request string from a FIPS Code get_geo_url(geoid, allgeos)

get_geo_url 7 geoid allgeos A character string with a FIPS code, between 2 and 15 digits long. (optional) A string identifying the type of geography for which to collect data within the the requested geoids. Must be one of c('co', 'tr', 'bg', 'bl'). For instance, if allgeos = "bg", will return all block groups within the given geoids. A string with the FIPS formatted for an API request.

Index aggregate_moe, 2 append_geoid, 3 call_api_once, 3 call_census_api, 3, 4 call_geolocator, 5 call_geolocator_latlon, 6 censusr, 6 censusr-package (censusr), 6 get_geo_url, 6 8