url.census: See webpage with data on Census units from American Fact...

View source: R/url.census.R

url.censusR Documentation

See webpage with data on Census units from American Fact Finder - may not be used

Description

DRAFT CODE to see webpage with table of Census Bureau data via AFF WITHOUT NEEDING API KEY

Usage

url.census(
  fips,
  censustable = "P2",
  censusfile = "DEC/10_PL",
  launch = TRUE,
  clean = TRUE
)

Arguments

fips

vector of FIPS

censustable

'P2' by default but can be another table code e.g., see

(http://factfinder.census.gov/faces/affhelp/jsf/pages/metadata.xhtml?lang=en&type=dataset&id=dataset.en.DEC_10_SF1)

censusfile

'DEC/10_PL' by default. Also see 'DEC_10_SF1' for example.

launch

TRUE by default, whether to open page in web browser

clean

Does not use clean.fips1215() if FALSE, which helps if the countiesall or other list is not yet updated, for example and lacks some new FIPS code

Details

For information on FIPS codes, see http://www.census.gov/geo/reference/ansi.html,

and also see (https://www.census.gov/geo/reference/geoidentifiers.html)

For links to AFF, see (http://factfinder2.census.gov/files/AFF_deep_linking_guide.pdf)

e.g. to get 1 block census 2010 pop, for block fips 360610127001000 :

(http://factfinder2.census.gov/bkmk/table/1.0/en/DEC/10_SF1/P1/1000000US360610127001000)

e.g. to get 1 block census 2010 RACE/ETH/NHWA, for block fips 360610127002001 :

(http://factfinder2.census.gov/bkmk/table/1.0/en/DEC/10_PL/P2/1000000US360610127002001)

Notice the second one gets P2 from 10_PL not 10_SF1, because P2 in SF1 means something different TO GET RACE/ETHNICITY CENSUS 2010 COUNTS ON ONE BLOCK: block fips 360610127002001

(http://factfinder2.census.gov/bkmk/table/1.0/en/DEC/10_PL/P2/1000000US360610127002001)

TO GET RACE/ETHNICITY CENSUS 2010 COUNTS ON TWO BLOCKS:

http://factfinder2.census.gov/bkmk/table/1.0/en/DEC/10_PL/P2/1000000US360610127002001|1000000US360610127002000

Value

Can open a webpage. Returns vector of URL(s) as character

See Also

url.censusblock() and (http://ejanalysis.github.io/countyhealthrankings)

Examples

  myfips <- "360610127002001"
  url.census(myfips, launch=FALSE)
  myfips <- c("360610127002001", "360610127002000")
  url.census(myfips, launch=FALSE)

ejanalysis/ejanalysis documentation built on April 2, 2024, 10:12 a.m.