
tinytiger is to provide a lightweight interface to the
US
Census Bureau’s TIGER/Line Shapefiles. It has four dependencies
other than sf. Download caching is supported; see below for details.
Install tinytiger from CRAN with:
install.packages("tinytiger")You can also install the development version of
tinytiger:
remotes::install_github("alarm-redist/tinytiger")tinytiger provides lightweight functions to download
Census Bureau TIGER/Line Shapefiles. To download a geography, simply use
the function corresponding to one of the supported geographies.
library(tinytiger)
tt_counties("NY")
#> Simple feature collection with 62 features and 18 fields
#> Geometry type: MULTIPOLYGON
#> Dimension: XY
#> Bounding box: xmin: -79.76259 ymin: 40.47658 xmax: -71.77749 ymax: 45.01586
#> Geodetic CRS: NAD83
#> STATEFP COUNTYFP COUNTYNS GEOID GEOIDFQ NAME
#> 53 36 123 00974159 36123 0500000US36123 Yates
#> 241 36 039 00974118 36039 0500000US36039 Greene
#> 248 36 043 00974120 36043 0500000US36043 Herkimer
#> 406 36 081 00974139 36081 0500000US36081 Queens
#> 682 36 097 00974146 36097 0500000US36097 Schuyler
#> 699 36 067 00974132 36067 0500000US36067 Onondaga
#> 731 36 025 00974111 36025 0500000US36025 Delaware
#> 744 36 051 00974124 36051 0500000US36051 Livingston
#> 1072 36 113 00974154 36113 0500000US36113 Warren
#> 1127 36 005 00974101 36005 0500000US36005 Bronx
#> 1180 36 107 00974151 36107 0500000US36107 Tioga
#> 1208 36 083 00974140 36083 0500000US36083 Rensselaer
#> 1233 36 059 00974128 36059 0500000US36059 Nassau
#> 1320 36 101 00974148 36101 0500000US36101 Steuben
#> 1350 36 001 00974099 36001 0500000US36001 Albany
#> 1382 36 099 00974147 36099 0500000US36099 Seneca
#> 1491 36 041 00974119 36041 0500000US36041 Hamilton
#> 1512 36 055 00974126 36055 0500000US36055 Monroe
#> 1579 36 069 00974133 36069 0500000US36069 Ontario
#> 1636 36 037 00974117 36037 0500000US36037 Genesee
#> 1662 36 029 00974113 36029 0500000US36029 Erie
#> 1848 36 019 00974108 36019 0500000US36019 Clinton
#> 1902 36 027 00974112 36027 0500000US36027 Dutchess
#> 1913 36 077 00974137 36077 0500000US36077 Otsego
#> 2017 36 049 00974123 36049 0500000US36049 Lewis
#> 2043 36 119 00974157 36119 0500000US36119 Westchester
#> 2077 36 105 00974150 36105 0500000US36105 Sullivan
#> 2086 36 023 00974110 36023 0500000US36023 Cortland
#> 2130 36 091 00974143 36091 0500000US36091 Saratoga
#> 2138 36 003 00974100 36003 0500000US36003 Allegany
#> 2213 36 017 00974107 36017 0500000US36017 Chenango
#> 2313 36 075 00974136 36075 0500000US36075 Oswego
#> 2320 36 111 00974153 36111 0500000US36111 Ulster
#> 2331 36 089 00977309 36089 0500000US36089 St. Lawrence
#> 2373 36 095 00974145 36095 0500000US36095 Schoharie
#> 2375 36 007 00974102 36007 0500000US36007 Broome
#> 2438 36 085 00974141 36085 0500000US36085 Richmond
#> 2456 36 047 00974122 36047 0500000US36047 Kings
#> 2480 36 053 00974125 36053 0500000US36053 Madison
#> 2481 36 115 00974155 36115 0500000US36115 Washington
#> 2484 36 103 00974149 36103 0500000US36103 Suffolk
#> 2558 36 065 00974131 36065 0500000US36065 Oneida
#> 2619 36 011 00974104 36011 0500000US36011 Cayuga
#> 2636 36 073 00974135 36073 0500000US36073 Orleans
#> 2653 36 057 00974127 36057 0500000US36057 Montgomery
#> 2680 36 035 00974116 36035 0500000US36035 Fulton
#> 2701 36 015 00974106 36015 0500000US36015 Chemung
#> 2702 36 121 00974158 36121 0500000US36121 Wyoming
#> 2754 36 045 00974121 36045 0500000US36045 Jefferson
#> 2763 36 087 00974142 36087 0500000US36087 Rockland
#> 2789 36 061 00974129 36061 0500000US36061 New York
#> 2795 36 021 00974109 36021 0500000US36021 Columbia
#> 2830 36 009 00974103 36009 0500000US36009 Cattaraugus
#> 2937 36 033 00974115 36033 0500000US36033 Franklin
#> 2956 36 031 00974114 36031 0500000US36031 Essex
#> 2974 36 071 00974134 36071 0500000US36071 Orange
#> 2975 36 093 00974144 36093 0500000US36093 Schenectady
#> 2985 36 013 00974105 36013 0500000US36013 Chautauqua
#> 3050 36 117 00974156 36117 0500000US36117 Wayne
#> 3054 36 063 00974130 36063 0500000US36063 Niagara
#> 3111 36 079 00974138 36079 0500000US36079 Putnam
#> 3168 36 109 00974152 36109 0500000US36109 Tompkins
#> NAMELSAD LSAD CLASSFP MTFCC CSAFP CBSAFP METDIVFP FUNCSTAT
#> 53 Yates County 06 H1 G4020 <NA> <NA> <NA> A
#> 241 Greene County 06 H1 G4020 <NA> <NA> <NA> A
#> 248 Herkimer County 06 H1 G4020 <NA> 46540 <NA> A
#> 406 Queens County 06 H6 G4020 408 35620 35614 C
#> 682 Schuyler County 06 H1 G4020 <NA> <NA> <NA> A
#> 699 Onondaga County 06 H1 G4020 532 45060 <NA> A
#> 731 Delaware County 06 H1 G4020 <NA> <NA> <NA> A
#> 744 Livingston County 06 H1 G4020 464 40380 <NA> A
#> 1072 Warren County 06 H1 G4020 104 24020 <NA> A
#> 1127 Bronx County 06 H6 G4020 408 35620 35614 C
#> 1180 Tioga County 06 H1 G4020 <NA> 13780 <NA> A
#> 1208 Rensselaer County 06 H1 G4020 104 10580 <NA> A
#> 1233 Nassau County 06 H1 G4020 408 35620 35004 A
#> 1320 Steuben County 06 H1 G4020 236 18500 <NA> A
#> 1350 Albany County 06 H1 G4020 104 10580 <NA> A
#> 1382 Seneca County 06 H1 G4020 464 42900 <NA> A
#> 1491 Hamilton County 06 H1 G4020 <NA> <NA> <NA> A
#> 1512 Monroe County 06 H1 G4020 464 40380 <NA> A
#> 1579 Ontario County 06 H1 G4020 464 40380 <NA> A
#> 1636 Genesee County 06 H1 G4020 464 12860 <NA> A
#> 1662 Erie County 06 H1 G4020 160 15380 <NA> A
#> 1848 Clinton County 06 H1 G4020 <NA> 38460 <NA> A
#> 1902 Dutchess County 06 H1 G4020 408 28880 <NA> A
#> 1913 Otsego County 06 H1 G4020 <NA> 36580 <NA> A
#> 2017 Lewis County 06 H1 G4020 <NA> <NA> <NA> A
#> 2043 Westchester County 06 H1 G4020 408 35620 35614 A
#> 2077 Sullivan County 06 H1 G4020 408 33910 <NA> A
#> 2086 Cortland County 06 H1 G4020 296 18660 <NA> A
#> 2130 Saratoga County 06 H1 G4020 104 10580 <NA> A
#> 2138 Allegany County 06 H1 G4020 <NA> <NA> <NA> A
#> 2213 Chenango County 06 H1 G4020 <NA> <NA> <NA> A
#> 2313 Oswego County 06 H1 G4020 532 45060 <NA> A
#> 2320 Ulster County 06 H1 G4020 408 28740 <NA> A
#> 2331 St. Lawrence County 06 H1 G4020 <NA> 32390 <NA> A
#> 2373 Schoharie County 06 H1 G4020 104 10580 <NA> A
#> 2375 Broome County 06 H1 G4020 <NA> 13780 <NA> A
#> 2438 Richmond County 06 H6 G4020 408 35620 35614 C
#> 2456 Kings County 06 H6 G4020 408 35620 35614 C
#> 2480 Madison County 06 H1 G4020 532 45060 <NA> A
#> 2481 Washington County 06 H1 G4020 104 24020 <NA> A
#> 2484 Suffolk County 06 H1 G4020 408 35620 35004 A
#> 2558 Oneida County 06 H1 G4020 <NA> 46540 <NA> A
#> 2619 Cayuga County 06 H1 G4020 532 12180 <NA> A
#> 2636 Orleans County 06 H1 G4020 464 40380 <NA> A
#> 2653 Montgomery County 06 H1 G4020 104 11220 <NA> A
#> 2680 Fulton County 06 H1 G4020 104 24100 <NA> A
#> 2701 Chemung County 06 H1 G4020 236 21300 <NA> A
#> 2702 Wyoming County 06 H1 G4020 <NA> <NA> <NA> A
#> 2754 Jefferson County 06 H1 G4020 <NA> 48060 <NA> A
#> 2763 Rockland County 06 H1 G4020 408 35620 35614 A
#> 2789 New York County 06 H6 G4020 408 35620 35614 C
#> 2795 Columbia County 06 H1 G4020 104 26460 <NA> A
#> 2830 Cattaraugus County 06 H1 G4020 160 36460 <NA> A
#> 2937 Franklin County 06 H1 G4020 <NA> <NA> <NA> A
#> 2956 Essex County 06 H1 G4020 <NA> <NA> <NA> A
#> 2974 Orange County 06 H1 G4020 408 28880 <NA> A
#> 2975 Schenectady County 06 H1 G4020 104 10580 <NA> A
#> 2985 Chautauqua County 06 H1 G4020 <NA> 27460 <NA> A
#> 3050 Wayne County 06 H1 G4020 464 40380 <NA> A
#> 3054 Niagara County 06 H1 G4020 160 15380 <NA> A
#> 3111 Putnam County 06 H1 G4020 408 35620 35614 A
#> 3168 Tompkins County 06 H1 G4020 296 27060 <NA> A
#> ALAND AWATER INTPTLAT INTPTLON
#> 53 875850182 97496449 +42.6382370 -077.1043238
#> 241 1676140501 28201061 +42.2869702 -074.1495421
#> 248 3653402964 120355811 +43.5710090 -074.8410968
#> 406 281594050 188444349 +40.6546581 -073.8412089
#> 682 850405404 36246373 +42.4197755 -076.9386030
#> 699 2016027797 70512842 +43.0065163 -076.1961336
#> 731 3736306656 64163829 +42.1939865 -074.9667281
#> 744 1635974791 22076449 +42.7290418 -077.7784630
#> 1072 2246093482 166839689 +43.5551053 -073.8381388
#> 1127 109301172 39287800 +40.8487111 -073.8529390
#> 1180 1343600018 11044570 +42.1780565 -076.2974556
#> 1208 1689861383 33524231 +42.7104206 -073.5138454
#> 1233 736965431 437285877 +40.7296118 -073.5894144
#> 1320 3601403378 35034921 +42.2667252 -077.3855253
#> 1350 1354273426 26971925 +42.5882401 -073.9740095
#> 1382 838377559 172813844 +42.7822943 -076.8270880
#> 1491 4447989312 234204425 +43.6578786 -074.5024556
#> 1512 1701536380 1838269506 +43.2503466 -077.7005177
#> 1579 1668017479 47845322 +42.8563571 -077.3034968
#> 1636 1276803035 6136678 +43.0009096 -078.1927784
#> 1662 2700743414 476876396 +42.7527590 -078.7781922
#> 1848 2687763047 206581998 +44.7527120 -073.7056429
#> 1902 2060598606 76906718 +41.7548253 -073.7400136
#> 1913 2594488422 36312826 +42.6297762 -075.0288410
#> 2017 3305625876 39648337 +43.7827061 -075.4441316
#> 2043 1115811944 179391718 +41.1526862 -073.7457526
#> 2077 2507484146 73737482 +41.7199928 -074.7715769
#> 2086 1291817953 7110638 +42.5940390 -076.0762398
#> 2130 2097812297 87488004 +43.1061353 -073.8553872
#> 2138 2666410173 12989704 +42.2478532 -078.0261531
#> 2213 2314006878 13433905 +42.4780238 -075.6022407
#> 2313 2464685609 933435238 +43.4614431 -076.2092618
#> 2320 2911757763 94596810 +41.9472124 -074.2654582
#> 2331 6939961469 366939180 +44.4881125 -075.0743110
#> 2373 1610503550 11676951 +42.5912940 -074.4381718
#> 2375 1827626589 25078245 +42.1619773 -075.8302833
#> 2438 148982681 117441532 +40.5612628 -074.1398995
#> 2456 179684482 71158757 +40.6350451 -073.9506398
#> 2480 1696064498 16680858 +42.9100255 -075.6635749
#> 2481 2152773115 38123569 +43.3123766 -073.4394282
#> 2484 2359323057 3787372220 +40.9435540 -072.6922183
#> 2558 3140211182 117357244 +43.2427273 -075.4342824
#> 2619 1791207571 445691131 +43.0085456 -076.5745866
#> 2636 1013364726 1103744014 +43.3399059 -078.2070281
#> 2653 1044053041 18613118 +42.9008912 -074.4353575
#> 2680 1283236089 96915000 +43.1156093 -074.4236782
#> 2701 1054989064 8874703 +42.1486972 -076.7524712
#> 2702 1535086365 9085228 +42.7013652 -078.2285762
#> 2754 3283928401 1524534691 +43.9963890 -076.0529678
#> 2763 449841001 66919666 +41.1546276 -074.0246616
#> 2789 58683879 29010416 +40.7766419 -073.9701871
#> 2795 1643770715 35071400 +42.2476964 -073.6267175
#> 2830 3388177066 36783591 +42.2390986 -078.6623320
#> 2937 4219867408 176612001 +44.5943758 -074.3106700
#> 2956 4646755722 316348027 +44.1096005 -073.7784307
#> 2974 2103273921 67952544 +41.4024096 -074.3062522
#> 2975 530121015 12335637 +42.8175516 -074.0435592
#> 2985 2746450227 1139029655 +42.3042159 -079.4075949
#> 3050 1563913378 2018184725 +43.2181139 -077.0494024
#> 3054 1352876143 1598772310 +43.2726719 -078.8129431
#> 3111 596350753 41228996 +41.4279067 -073.7438608
#> 3168 1229336924 43765697 +42.4530063 -076.4734835
#> geometry
#> 53 MULTIPOLYGON (((-77.35735 4...
#> 241 MULTIPOLYGON (((-73.79432 4...
#> 248 MULTIPOLYGON (((-75.16781 4...
#> 406 MULTIPOLYGON (((-74.03813 4...
#> 682 MULTIPOLYGON (((-77.10711 4...
#> 699 MULTIPOLYGON (((-76.08017 4...
#> 731 MULTIPOLYGON (((-74.66969 4...
#> 744 MULTIPOLYGON (((-77.65085 4...
#> 1072 MULTIPOLYGON (((-73.73948 4...
#> 1127 MULTIPOLYGON (((-73.93381 4...
#> 1180 MULTIPOLYGON (((-76.11623 4...
#> 1208 MULTIPOLYGON (((-73.274 42....
#> 1233 MULTIPOLYGON (((-73.78019 4...
#> 1320 MULTIPOLYGON (((-77.08327 4...
#> 1350 MULTIPOLYGON (((-73.96379 4...
#> 1382 MULTIPOLYGON (((-76.96393 4...
#> 1491 MULTIPOLYGON (((-74.20976 4...
#> 1512 MULTIPOLYGON (((-77.63502 4...
#> 1579 MULTIPOLYGON (((-76.97439 4...
#> 1636 MULTIPOLYGON (((-78.23451 4...
#> 1662 MULTIPOLYGON (((-78.7776 42...
#> 1848 MULTIPOLYGON (((-73.3863 44...
#> 1902 MULTIPOLYGON (((-73.8611 41...
#> 1913 MULTIPOLYGON (((-74.77289 4...
#> 2017 MULTIPOLYGON (((-75.31609 4...
#> 2043 MULTIPOLYGON (((-73.65762 4...
#> 2077 MULTIPOLYGON (((-75.14449 4...
#> 2086 MULTIPOLYGON (((-75.87633 4...
#> 2130 MULTIPOLYGON (((-73.67891 4...
#> 2138 MULTIPOLYGON (((-78.04342 4...
#> 2213 MULTIPOLYGON (((-75.40346 4...
#> 2313 MULTIPOLYGON (((-76.02509 4...
#> 2320 MULTIPOLYGON (((-74.0748 42...
#> 2331 MULTIPOLYGON (((-74.64908 4...
#> 2373 MULTIPOLYGON (((-74.24306 4...
#> 2375 MULTIPOLYGON (((-75.74223 4...
#> 2438 MULTIPOLYGON (((-74.25875 4...
#> 2456 MULTIPOLYGON (((-74.05647 4...
#> 2480 MULTIPOLYGON (((-75.68409 4...
#> 2481 MULTIPOLYGON (((-73.26504 4...
#> 2484 MULTIPOLYGON (((-71.80938 4...
#> 2558 MULTIPOLYGON (((-75.84891 4...
#> 2619 MULTIPOLYGON (((-76.75354 4...
#> 2636 MULTIPOLYGON (((-77.99691 4...
#> 2653 MULTIPOLYGON (((-74.25683 4...
#> 2680 MULTIPOLYGON (((-74.41589 4...
#> 2701 MULTIPOLYGON (((-76.73057 4...
#> 2702 MULTIPOLYGON (((-77.95538 4...
#> 2754 MULTIPOLYGON (((-75.90417 4...
#> 2763 MULTIPOLYGON (((-73.89379 4...
#> 2789 MULTIPOLYGON (((-74.03544 4...
#> 2795 MULTIPOLYGON (((-73.3822 42...
#> 2830 MULTIPOLYGON (((-78.69725 4...
#> 2937 MULTIPOLYGON (((-74.38487 4...
#> 2956 MULTIPOLYGON (((-73.6182 43...
#> 2974 MULTIPOLYGON (((-74.24491 4...
#> 2975 MULTIPOLYGON (((-73.89962 4...
#> 2985 MULTIPOLYGON (((-79.14523 4...
#> 3050 MULTIPOLYGON (((-76.70573 4...
#> 3054 MULTIPOLYGON (((-78.49165 4...
#> 3111 MULTIPOLYGON (((-73.66062 4...
#> 3168 MULTIPOLYGON (((-76.25388 4...tt_address_ranges(): Address Rangestt_ai_an_nh_areas(): American Indian / Alaska Native /
Native Hawaiian Areastt_tribal_subdivisions(): Tribal Subdivisionstt_anrc(): Alaskan Native Regional Corporationstt_area_landmarks(): Area Landmarkstt_area_water(): Area Watertt_block_groups(): Block Groupstt_cbsa(): Core Based Statistical Areastt_congressional_districts(): Congressional
Districtstt_new_england_combined_areas(): Combined New England
Towns and Citiestt_coastline(): Coastlinett_consolidated_cities(): Consolidated Citiestt_counties(): Countiestt_county_subdivisions(): County Subdivisionstt_csa(): Combined Statistical Areastt_polygon_edges(): All Polygon Edgestt_elementary_school_districts(): Elementary School
Districts (limited states)tt_estates(): Estates (Virgin Islands only)tt_polygon_faces(): All Polygon Facestt_linear_water(): Linear Watertt_metropolitan_divisions(): Metropolitan
Divisionstt_military(): Military Installationstt_new_england_cities(): New England Cities and
Townstt_new_england_city_divisions(): New England Cities and
Towns Divisionstt_places(): Census Placestt_point_landmarks(): Point Landmarkstt_primary_roads(): Primary Roadstt_primary_secondary_roads(): Primary and Secondary
Roadstt_puma(): Public Use Microdata Areastt_rails(): Railroadstt_roads(): Roadstt_secondary_school_districts(): Secondary School
Districts (limited states)tt_state_leg_lower(): Lower State Legislative
Districtstt_state_leg_upper(): Upper State Legislative
Districtstt_states(): Statestt_subbarrios(): Subbarios (Puerto Rico only)tt_blocks(): Blockstt_tribal_block_groups(): Tribal Block Groupstt_tracts(): Tractstt_tribal_tracts(): Tribal Tractstt_uac(): : Urban Areastt_unified_school_districts(): Unified School
Districtstt_voting_districts(): Voting Districtstt_zcta(): Zip Code Tabulation AreasBy default, downloads show a progress bar in interactive sessions and
are quiet in non-interactive sessions. Override this with
options(tinytiger.curl_quiet = TRUE) or
FALSE.
Downloads will go to options(tinytiger.cache_dir) if it
is set. If it is not, and rappdirs is installed, and
options(tinytiger.use_cache = TRUE), downloads will be
cached between sessions in
rappdirs::user_cache_dir("tinytiger"). If it is not
installed, or if options(tinytiger.use_cache = FALSE), then
the cache will be in a temporary directory that does not persist between
sessions. You can check the size of the cache and clear it with
tt_cache_size() and tt_cache_clear().