Skip to contents

geo_preview() previews cbsa metadata for use in filtering of core data sets. It also saves the outputs with an invisible return.

Usage

geo_preview(geo, within = NULL, type = NULL)

Arguments

geo

Character vector. Vector of columns to preview/return from CBSA data

within

character vector. Vector of state abbreviations to filter data with.

type

character scalar. Scalar variable indicating type of data to return. Acceptable values are "metro" and "micro".

Value

printout of data or data.frame of filtered cbsa data.frame

Examples


geo_preview( geo="cbsa", within="LA" )
#> 
#> 
#> |                             cbsa|
#> |--------------------------------:|
#> |                    Lafayette, LA|
#> |                  Baton Rouge, LA|
#> |                     DeRidder, LA|
#> |      Shreveport-Bossier City, LA|
#> |                 Lake Charles, LA|
#> |                   Natchez, MS-LA|
#> |                   Alexandria, LA|
#> |                   New Iberia, LA|
#> |         New Orleans-Metairie, LA|
#> |   Houma-Bayou Cane-Thibodaux, LA|
#> |                       Ruston, LA|
#> |                       Monroe, LA|
#> |                 Natchitoches, LA|
#> |                    Opelousas, LA|
#> |                  Morgan City, LA|
#> | Slidell-Mandeville-Covington, LA|
#> |                      Hammond, LA|
#> |                     Bogalusa, LA|
#> |                       Minden, LA|
geo_preview( geo=c("county","cbsa"), within="GA", type="metro" )
#> 
#> 
#> |                            county|                              cbsa|
#> |---------------------------------:|---------------------------------:|
#> |       Barrow County, GA, Outlying| Atlanta-Sandy Springs-Roswell, GA|
#> |       Bartow County, GA, Outlying| Atlanta-Sandy Springs-Roswell, GA|
#> |          Bibb County, GA, Central|             Macon-Bibb County, GA|
#> |     Brantley County, GA, Outlying|          Brunswick-St. Simons, GA|
#> |       Brooks County, GA, Outlying|                      Valdosta, GA|
#> |         Bryan County, GA, Central|                      Savannah, GA|
#> |        Burke County, GA, Outlying|    Augusta-Richmond County, GA-SC|
#> |        Butts County, GA, Outlying| Atlanta-Sandy Springs-Roswell, GA|
#> |      Carroll County, GA, Outlying| Atlanta-Sandy Springs-Roswell, GA|
#> |       Catoosa County, GA, Central|                Chattanooga, TN-GA|
#> |       Chatham County, GA, Central|                      Savannah, GA|
#> | Chattahoochee County, GA, Central|                   Columbus, GA-AL|
#> |      Cherokee County, GA, Central| Atlanta-Sandy Springs-Roswell, GA|
#> |        Clarke County, GA, Central|          Athens-Clarke County, GA|
#> |       Clayton County, GA, Central| Atlanta-Sandy Springs-Roswell, GA|
#> |          Cobb County, GA, Central| Atlanta-Sandy Springs-Roswell, GA|
#> |      Columbia County, GA, Central|    Augusta-Richmond County, GA-SC|
#> |        Coweta County, GA, Central| Atlanta-Sandy Springs-Roswell, GA|
#> |     Crawford County, GA, Outlying|             Macon-Bibb County, GA|
#> |         Dade County, GA, Outlying|                Chattanooga, TN-GA|
#> |        Dawson County, GA, Central| Atlanta-Sandy Springs-Roswell, GA|
#> |        DeKalb County, GA, Central| Atlanta-Sandy Springs-Roswell, GA|
#> |     Dougherty County, GA, Central|                        Albany, GA|
#> |       Douglas County, GA, Central| Atlanta-Sandy Springs-Roswell, GA|
#> |       Echols County, GA, Outlying|                      Valdosta, GA|
#> |    Effingham County, GA, Outlying|                      Savannah, GA|
#> |       Fayette County, GA, Central| Atlanta-Sandy Springs-Roswell, GA|
#> |         Floyd County, GA, Central|                          Rome, GA|
#> |       Forsyth County, GA, Central| Atlanta-Sandy Springs-Roswell, GA|
#> |        Fulton County, GA, Central| Atlanta-Sandy Springs-Roswell, GA|
#> |         Glynn County, GA, Central|          Brunswick-St. Simons, GA|
#> |      Gwinnett County, GA, Central| Atlanta-Sandy Springs-Roswell, GA|
#> |          Hall County, GA, Central|                   Gainesville, GA|
#> |     Haralson County, GA, Outlying| Atlanta-Sandy Springs-Roswell, GA|
#> |       Harris County, GA, Outlying|                   Columbus, GA-AL|
#> |        Heard County, GA, Outlying| Atlanta-Sandy Springs-Roswell, GA|
#> |         Henry County, GA, Central| Atlanta-Sandy Springs-Roswell, GA|
#> |       Houston County, GA, Central|                 Warner Robins, GA|
#> |       Jasper County, GA, Outlying| Atlanta-Sandy Springs-Roswell, GA|
#> |        Jones County, GA, Outlying|             Macon-Bibb County, GA|
#> |       Lanier County, GA, Outlying|                      Valdosta, GA|
#> |           Lee County, GA, Central|                        Albany, GA|
#> |       Liberty County, GA, Central|                    Hinesville, GA|
#> |      Lincoln County, GA, Outlying|    Augusta-Richmond County, GA-SC|
#> |         Long County, GA, Outlying|                    Hinesville, GA|
#> |       Lowndes County, GA, Central|                      Valdosta, GA|
#> |      Lumpkin County, GA, Outlying| Atlanta-Sandy Springs-Roswell, GA|
#> |     McDuffie County, GA, Outlying|    Augusta-Richmond County, GA-SC|
#> |     McIntosh County, GA, Outlying|          Brunswick-St. Simons, GA|
#> |      Madison County, GA, Outlying|          Athens-Clarke County, GA|
#> |       Marion County, GA, Outlying|                   Columbus, GA-AL|
#> |   Meriwether County, GA, Outlying| Atlanta-Sandy Springs-Roswell, GA|
#> |       Monroe County, GA, Outlying|             Macon-Bibb County, GA|
#> |       Morgan County, GA, Outlying| Atlanta-Sandy Springs-Roswell, GA|
#> |       Murray County, GA, Outlying|                        Dalton, GA|
#> |      Muscogee County, GA, Central|                   Columbus, GA-AL|
#> |        Newton County, GA, Central| Atlanta-Sandy Springs-Roswell, GA|
#> |        Oconee County, GA, Central|          Athens-Clarke County, GA|
#> |   Oglethorpe County, GA, Outlying|          Athens-Clarke County, GA|
#> |      Paulding County, GA, Central| Atlanta-Sandy Springs-Roswell, GA|
#> |         Peach County, GA, Central|                 Warner Robins, GA|
#> |      Pickens County, GA, Outlying| Atlanta-Sandy Springs-Roswell, GA|
#> |         Pike County, GA, Outlying| Atlanta-Sandy Springs-Roswell, GA|
#> |      Richmond County, GA, Central|    Augusta-Richmond County, GA-SC|
#> |      Rockdale County, GA, Central| Atlanta-Sandy Springs-Roswell, GA|
#> |     Spalding County, GA, Outlying| Atlanta-Sandy Springs-Roswell, GA|
#> |      Stewart County, GA, Outlying|                   Columbus, GA-AL|
#> |       Talbot County, GA, Outlying|                   Columbus, GA-AL|
#> |      Terrell County, GA, Outlying|                        Albany, GA|
#> |       Twiggs County, GA, Outlying|             Macon-Bibb County, GA|
#> |        Walker County, GA, Central|                Chattanooga, TN-GA|
#> |        Walton County, GA, Central| Atlanta-Sandy Springs-Roswell, GA|
#> |     Whitfield County, GA, Central|                        Dalton, GA|
#> |        Worth County, GA, Outlying|                        Albany, GA|
geo_preview( geo=c("cbsa","cbsafips"), within="FL", type="metro" )
#> 
#> 
#> |                                        cbsa| cbsafips|
#> |-------------------------------------------:|--------:|
#> |                             Gainesville, FL|    23540|
#> |                            Jacksonville, FL|    27260|
#> |           Panama City-Panama City Beach, FL|    37460|
#> |           Palm Bay-Melbourne-Titusville, FL|    37340|
#> |   Miami-Fort Lauderdale-West Palm Beach, FL|    33100|
#> |                             Punta Gorda, FL|    39460|
#> |                       Homosassa Springs, FL|    26140|
#> |                     Naples-Marco Island, FL|    34940|
#> |              Pensacola-Ferry Pass-Brent, FL|    37860|
#> |      Deltona-Daytona Beach-Ormond Beach, FL|    19660|
#> |                             Tallahassee, FL|    45220|
#> |         Tampa-St. Petersburg-Clearwater, FL|    45300|
#> |                                 Sebring, FL|    42700|
#> | Sebastian-Vero Beach-West Vero Corridor, FL|    42680|
#> |               Orlando-Kissimmee-Sanford, FL|    36740|
#> |                   Cape Coral-Fort Myers, FL|    15980|
#> |           North Port-Bradenton-Sarasota, FL|    35840|
#> |                                   Ocala, FL|    36100|
#> |                          Port St. Lucie, FL|    38940|
#> |      Crestview-Fort Walton Beach-Destin, FL|    18880|
#> |                   Lakeland-Winter Haven, FL|    29460|
#> |                   Wildwood-The Villages, FL|    48680|
xx <- geo_preview( geo=c("cbsa","cbsafips"), within="FL", type="metro" )
#> 
#> 
#> |                                        cbsa| cbsafips|
#> |-------------------------------------------:|--------:|
#> |                             Gainesville, FL|    23540|
#> |                            Jacksonville, FL|    27260|
#> |           Panama City-Panama City Beach, FL|    37460|
#> |           Palm Bay-Melbourne-Titusville, FL|    37340|
#> |   Miami-Fort Lauderdale-West Palm Beach, FL|    33100|
#> |                             Punta Gorda, FL|    39460|
#> |                       Homosassa Springs, FL|    26140|
#> |                     Naples-Marco Island, FL|    34940|
#> |              Pensacola-Ferry Pass-Brent, FL|    37860|
#> |      Deltona-Daytona Beach-Ormond Beach, FL|    19660|
#> |                             Tallahassee, FL|    45220|
#> |         Tampa-St. Petersburg-Clearwater, FL|    45300|
#> |                                 Sebring, FL|    42700|
#> | Sebastian-Vero Beach-West Vero Corridor, FL|    42680|
#> |               Orlando-Kissimmee-Sanford, FL|    36740|
#> |                   Cape Coral-Fort Myers, FL|    15980|
#> |           North Port-Bradenton-Sarasota, FL|    35840|
#> |                                   Ocala, FL|    36100|
#> |                          Port St. Lucie, FL|    38940|
#> |      Crestview-Fort Walton Beach-Destin, FL|    18880|
#> |                   Lakeland-Winter Haven, FL|    29460|
#> |                   Wildwood-The Villages, FL|    48680|