geoDetail

Query to specify data request for geographic detail around zip, county, metro, state or region - including US Census population statistics at each level

Get Started with geoDetail

If you have already setup CareQuery, run the below code to get started with your first geoDetail query.

Example:

🔍

Request all geographic detail for all zips, counties, state, division and region corresponding to the Atlanta, Sandy Springs and Roswell Georgia area.

# import package
from care_query.care_query import CareQuery

# instantiate and connect
cq = CareQuery(email = "your-email", 
               token = "your-api-token")

# construct query
query = cq.geoDetail(metro = ["atlanta-sandy springs-roswell, ga"])

# estimate query size (optional)
estimate = query.estimate() 

# return query sample data (optional)
sample = query.sample() 

# execute query to return results
data = query.execute() 

Query Parameters

The following a parameters are available within the geoDetail query, including details on the parameter values.

parameterdescriptionoptions
short_zipFirst three digits the zip code of the
query patient population specified
First 3 digits of zip code(s)
metroMetropolitan and micropolitan statistical
areas according to the US Census Bureau
values available
stateUS State residence of the query patient populationvalues available
divisionNine distinct US State groupings as defined by the US Census Bureauvalues available
regionFour major US State groupings as defined by the US Census Bureauvalues available
limitNumber of rows returned in the data requestInteger or False
showBinary indicator as to whether you'd like
query to be printed for review upon it's creation
True or False

Query Return Data

The geoDetail query returns the GEO_TABLE for all zip codes that meet the criterion specified within the query.

The GEO_TABLE offers a hierarchical structure into zip codes, counties with their corresponding metros, state, division and regions of the US - including population and growth statistics at each level - as sourced by the US Census Bureau annually.

featuredescriptionexample
zipPostal Zone Improvement Plan (ZIP) code corresponding to a geographic area36511
zip3First three digits of the zip code365
county_codeUS Government's Federal Information Processing Standards (FIPS) code for state-county combination.1003
countyName and State of the corresponding countybaldwin county, al
county_popUS Census estimated population of the County population246,435
county_growth_rateUS Census estimated County population growth trend2.96%
metroUS Census Bureau metropolitan and micropolitan statistical areamobile-daphne-fairhope, al
metro_locationCentrality of the county as it relates to the corresponding Metrocentral
state_codeTwo digit code representing a US StateAL
stateFull name of US Statealabama
state_popUS Census estimated population of the State population4,670,054
state_growth_rateUS Census estimated State population growth trend0.55%
divisionNine minor State groupings as defined by the US Census Bureaueast south central
division_popUS Census estimated population of the Division population17,113,731
division_growth_rateUS Census estimated Division population growth trend0.62%
regionFour major State groupings as defined by the US Census Bureausouth
region_popUS Census estimated population of the Region population120,425,628
region_growth_rateUS Census estimated Region population growth trend1.14%

Advanced Query Logic & Recipes

geoDetail gives users categorical groupings for ease of use, as well as SQL-like capabilities to tactfully specify AND and OR logic, right within the CareQuery API!

🚧

geoDetail does not allow for nested lists within the query parameters

Please reference the following resources to better understand how to create rockstar queries!