cdc-gov/places-county-data-gis-friendly-format-2023-i46a-9kgh
Icon for Socrata external plugin

Query the Data Delivery Network

Query the DDN

The easiest way to query any data on Splitgraph is via the "Data Delivery Network" (DDN). The DDN is a single endpoint that speaks the PostgreSQL wire protocol. Any Splitgraph user can connect to it at data.splitgraph.com:5432 and query any version of over 40,000 datasets that are hosted or proxied by Splitgraph.

For example, you can query the places_county_data_gis_friendly_format_2023 table in this repository, by referencing it like:

"cdc-gov/places-county-data-gis-friendly-format-2023-i46a-9kgh:latest"."places_county_data_gis_friendly_format_2023"

or in a full query, like:

SELECT
    ":id", -- Socrata column ID
    "depression_crude95ci", -- Estimated confidence interval for crude prevalence of depression among adults aged >=18 years, 2021
    "depression_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of depression among adults aged >=18 years, 2021
    "totalpopulation", -- Total population of Census 2021 estimates
    "geolocation", -- Latitude, Longitude of city centroid (Format: Point(Longitude Latitude))
    "disability_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of any disability among adults aged >=18 years
    "disability_adjprev", -- Model-based estimate for age-adjusted prevalence of any disability  among adults aged >=18 years, 2021
    "disability_crude95ci", -- Estimated confidence interval for crude prevalence of any disability among adults aged >=18 years
    "indeplive_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of independent living disability among adults aged >=18 years
    "indeplive_crude95ci", -- Estimated confidence interval for crude prevalence of independent living disability among adults aged >=18 years
    "indeplive_crudeprev", -- Model-based estimate for crude prevalence of independent living disability among adults aged >=18 years, 2021
    "selfcare_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of self-care disability among adults aged >=18 years
    "selfcare_adjprev", -- Model-based estimate for age-adjusted prevalence of self-care disability  among adults aged >=18 years, 2021
    "selfcare_crude95ci", -- Estimated confidence interval for crude prevalence of self-care disability among adults aged >=18 years
    "selfcare_crudeprev", -- Model-based estimate for crude prevalence of self-care disability among adults aged >=18 years, 2021
    "mobility_adjprev", -- Model-based estimate for age-adjusted prevalence of mobility disability  among adults aged >=18 years, 2021
    "mobility_crudeprev", -- Model-based estimate for crude prevalence of mobility disability among adults aged >=18 years, 2021
    "cognition_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of cognitive disability among adults aged >=18 years
    "cognition_adjprev", -- Model-based estimate for age-adjusted prevalence of cognitive disability  among adults aged >=18 years, 2021
    "cognition_crude95ci", -- Estimated confidence interval for crude prevalence of cognitive disability among adults aged >=18 years
    "cognition_crudeprev", -- Model-based estimate for crude prevalence of cognitive disability among adults aged >=18 years, 2021
    "vision_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of vision disability among adults aged >=18 years
    "vision_adjprev", -- Model-based estimate for age-adjusted prevalence of vision disability  among adults aged >=18 years, 2021
    "vision_crude95ci", -- Estimated confidence interval for crude prevalence of vision disability among adults aged >=18 years
    "vision_crudeprev", -- Model-based estimate for crude prevalence of vision disability among adults aged >=18 years, 2021
    "hearing_crude95ci", -- Estimated confidence interval for crude prevalence of hearing disability among adults aged >=18 years
    "teethlost_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of all teeth lost among adults aged >=65 years
    "teethlost_crude95ci", -- Estimated confidence interval for crude prevalence of all teeth lost among adults aged >=65 years
    "teethlost_crudeprev", -- Model-based estimate for crude prevalence of all teeth lost among adults aged >=65 years, 2020
    "stroke_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of stroke among adults aged >=18 years
    "stroke_adjprev", -- Model-based estimate for age-adjusted prevalence of stroke among adults aged >=18 years, 2021
    "stroke_crude95ci", -- Estimated confidence interval for crude prevalence of stroke among adults aged >=18 years
    "sleep_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of sleeping less than 7 hours among adults aged >=18 years
    "sleep_adjprev", -- Model-based estimate for age-adjusted prevalence of sleeping less than 7 hours among adults aged >=18 years, 2020
    "sleep_crude95ci", -- Estimated confidence interval for crude prevalence of sleeping less than 7 hours among adults aged >=18 years
    "phlth_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of physical health not good for >=14 days among adults aged >=18 years
    "phlth_adjprev", -- Model-based estimate for age-adjusted prevalence of physical health not good for >=14 days among adults aged >=18 years, 2021
    "phlth_crude95ci", -- Estimated confidence interval for crude prevalence of physical health not good for >=14 days among adults aged >=18 years
    "phlth_crudeprev", -- Model-based estimate for crude prevalence of physical health not good for >=14 days among adults aged >=18 years, 2021
    "obesity_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of obesity among adults aged >=18 years
    "obesity_adjprev", -- Model-based estimate for age-adjusted prevalence of obesity among adults aged >=18 years, 2021
    "obesity_crude95ci", -- Estimated confidence interval for crude prevalence of obesity among adults aged >=18 years
    "obesity_crudeprev", -- Model-based estimate for crude prevalence of obesity among adults aged >=18 years, 2021
    "mhlth_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of mental health not good for >=14 days among adults aged >=18 years
    "mhlth_adjprev", -- Model-based estimate for age-adjusted prevalence of mental health not good for >=14 days among adults aged >=18 years, 2021
    "mhlth_crude95ci", -- Estimated confidence interval for crude prevalence of mental health not good for >=14 days among adults aged >=18 years
    "mhlth_crudeprev", -- Model-based estimate for crude prevalence of mental health not good for >=14 days among adults aged >=18 years, 2021
    "mammouse_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of mammography use among women aged 50–74 years
    "mammouse_adjprev", -- Model-based estimate for age-adjusted prevalence of mammography use among women aged 50–74 years, 2020
    "mammouse_crude95ci", -- Estimated confidence interval for crude prevalence of mammography use among women aged 50–74 years
    "mammouse_crudeprev", -- Model-based estimate for crude prevalence of mammography use among women aged 50–74 years, 2020
    "lpa_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of no leisure-time physical activity among adults aged >=18 years
    "lpa_adjprev", -- Model-based estimate for age-adjusted prevalence of no leisure-time physical activity among adults aged >=18 years, 2021
    "lpa_crude95ci", -- Estimated confidence interval for crude prevalence of no leisure-time physical activity among adults aged >=18 years
    "kidney_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of chronic kidney disease among adults aged >=18 years
    "kidney_adjprev", -- Model-based estimate for age-adjusted prevalence of chronic kidney disease among adults aged >=18 years, 2021
    "kidney_crudeprev", -- Model-based estimate for crude prevalence of chronic kidney disease among adults aged >=18 years, 2021
    "highchol_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of high cholesterol among adults aged >=18 years who have been screened in the past 5 years
    "highchol_adjprev", -- Model-based estimate for age-adjusted prevalence of high cholesterol among adults aged >=18 years who have been screened in the past 5 years, 2021
    "highchol_crude95ci", -- Estimated confidence interval for crude prevalence of high cholesterol among adults aged >=18 years who have been screened in the past 5 years
    "ghlth_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of fair or poor health among adults aged >=18 years
    "ghlth_adjprev", -- Model-based estimate for age-adjusted prevalence of fair or poor health among adults aged >=18 years, 2021
    "ghlth_crude95ci", -- Estimated confidence interval for crude prevalence of fair or poor health among adults aged >=18 years
    "diabetes_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of diagnosed diabetes among adults aged >=18 years
    "diabetes_adjprev", -- Model-based estimate for age-adjusted prevalence of diagnosed diabetes among adults aged >=18 years, 2021
    "diabetes_crude95ci", -- Estimated confidence interval for crude prevalence of diagnosed diabetes among adults aged >=18 years
    "depression_adjprev", -- Model-based estimate for age-adjusted prevalence of depression among adults aged >=18 years, 2021
    "depression_crudeprev", -- Model-based estimate for crude prevalence of depression among adults aged >=18 years, 2021
    "dental_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of visits to dentist or dental clinic among adults aged >=18 years
    "dental_crude95ci", -- Estimated confidence interval for crude prevalence of visits to dentist or dental clinic among adults aged >=18 years
    "dental_crudeprev", -- Model-based estimate for crude prevalence of visits to dentist or dental clinic among adults aged >=18 years, 2020
    "csmoking_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of current smoking among adults aged >=18 years
    "csmoking_adjprev", -- Model-based estimate for age-adjusted prevalence of current smoking among adults aged >=18 years, 2021
    "csmoking_crudeprev", -- Model-based estimate for crude prevalence of current smoking among adults aged >=18 years, 2021
    "corew_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of older adult women aged >=65 years who are up to date on a core set of clinical preventive services: Flu shot past year, PPV shot ever, Colorectal cancer screening, and Mammogram past 2 years
    "corew_crude95ci", -- Estimated confidence interval for crude prevalence of older adult women aged >=65 years who are up to date on a core set of clinical preventive services: Flu shot past year, PPV shot ever, Colorectal cancer screening, and Mammogram past 2 years
    "corew_crudeprev", -- Model-based estimate for crude prevalence of older adult women aged >=65 years who are up to date on a core set of clinical preventive services: Flu shot past year, PPV shot ever, Colorectal cancer screening, and Mammogram past 2 years, 2020
    "corem_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of older adult men aged >=65 years who are up to date on a core set of clinical preventive services: Flu shot past year, PPV shot ever, Colorectal cancer screening
    "corem_adjprev", -- Model-based estimate for age-adjusted prevalence of older adult men aged >=65 years who are up to date on a core set of clinical preventive services: Flu shot past year, PPV shot ever, Colorectal cancer screening, 2020
    "corem_crude95ci", -- Estimated confidence interval for crude prevalence of older adult men aged >=65 years who are up to date on a core set of clinical preventive services: Flu shot past year, PPV shot ever, Colorectal cancer screening
    "corem_crudeprev", -- Model-based estimate for crude prevalence of older adult men aged >=65 years who are up to date on a core set of clinical preventive services: Flu shot past year, PPV shot ever, Colorectal cancer screening, 2020
    "copd_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of chronic obstructive pulmonary disease among adults aged >=18 years
    "copd_adjprev", -- Model-based estimate for age-adjusted prevalence of chronic obstructive pulmonary disease among adults aged >=18 years, 2021
    "copd_crude95ci", -- Estimated confidence interval for crude prevalence of chronic obstructive pulmonary disease among adults aged >=18 years
    "copd_crudeprev", -- Model-based estimate for crude prevalence of chronic obstructive pulmonary disease among adults aged >=18 years, 2021
    "colon_screen_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of colorectal cancer screening among adults aged 50–75 years
    "colon_screen_adjprev", -- Model-based estimate for age-adjusted prevalence of colorectal cancer screening among adults aged 50–75 years, 2020
    "colon_screen_crude95ci", -- Estimated confidence interval for crude prevalence of colorectal cancer screening among adults aged 50–75 years
    "cholscreen_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of cholesterol screening among adults aged >=18 years
    "cholscreen_adjprev", -- Model-based estimate for age-adjusted prevalence of cholesterol screening among adults aged >=18 years, 2021
    "cholscreen_crude95ci", -- Estimated confidence interval for crude prevalence of cholesterol screening among adults aged >=18 years
    "cholscreen_crudeprev", -- Model-based estimate for crude prevalence of cholesterol screening among adults aged >=18 years, 2021
    "checkup_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of visits to doctor for routine checkup within the past year among adults aged >=18 years
    "checkup_adjprev", -- Model-based estimate for age-adjusted prevalence of visits to doctor for routine checkup within the past year among adults aged >=18 years, 2021
    "checkup_crude95ci", -- Estimated confidence interval for crude prevalence of visits to doctor for routine checkup within the past year among adults aged >=18 years
    "checkup_crudeprev", -- Model-based estimate for crude prevalence of visits to doctor for routine checkup within the past year among adults aged >=18 years, 2021
    "chd_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of coronary heart disease among adults aged >=18 years
    "chd_crude95ci", -- Estimated confidence interval for crude prevalence of coronary heart disease among adults aged >=18 years
    "chd_crudeprev", -- Model-based estimate for crude prevalence of coronary heart disease among adults aged >=18 years, 2021
    "cervical_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of cervical cancer screening among adult women aged 21–65 years
    "cervical_adjprev", -- Model-based estimate for age-adjusted prevalence of cervical cancer screening among adult women aged 21–65 years, 2020
    "cervical_crude95ci", -- Estimated confidence interval for crude prevalence of cervical cancer screening among adult women aged 21–65 years
    "cervical_crudeprev", -- Model-based estimate for crude prevalence of cervical cancer screening among adult women aged 21–65 years, 2020
    "casthma_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of current asthma among adults aged >=18 years
    "casthma_adjprev", -- Model-based estimate for age-adjusted prevalence of current asthma among adults aged >=18 years, 2021
    "casthma_crudeprev", -- Model-based estimate for crude prevalence of current asthma among adults aged >=18 years, 2021
    "cancer_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of cancer (excluding skin cancer) among adults aged >=18 years
    "cancer_adjprev", -- Model-based estimate for age-adjusted prevalence of cancer (excluding skin cancer) among adults aged >=18 years, 2021
    "cancer_crude95ci", -- Estimated confidence interval for crude prevalence of cancer (excluding skin cancer) among adults aged >=18 years
    "cancer_crudeprev", -- Model-based estimate for crude prevalence of cancer (excluding skin cancer) among adults aged >=18 years, 2021
    "bpmed_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of taking medicine for high blood pressure control among adults aged >=18 years with high blood pressure
    "bpmed_crudeprev", -- Model-based estimate for crude prevalence of taking medicine for high blood pressure control among adults aged >=18 years with high blood pressure, 2021
    "bphigh_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of high blood pressure among adults aged >=18 years
    "bphigh_adjprev", -- Model-based estimate for age-adjusted prevalence of high blood pressure among adults aged >=18 years, 2021
    "bphigh_crude95ci", -- Estimated confidence interval for crude prevalence of high blood pressure among adults aged >=18 years
    "bphigh_crudeprev", -- Model-based estimate for crude prevalence of taking medicine for high blood pressure control among adults aged >=18 years with high blood pressure, 2021
    "binge_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of binge drinking among adults aged ≥18 years
    "binge_crude95ci", -- Estimated confidence interval for crude prevalence of binge drinking among adults aged >=18 years
    "binge_crudeprev", -- Model-based estimate for crude prevalence of binge drinking among adults aged >=18 years, 2021
    "arthritis_adj95ci", -- Estimated confidence interval for age-adjusted prevalence estimate of arthritis among adults aged ≥18 years
    "arthritis_adjprev", -- Model-based estimate for age-adjusted prevalence of arthritis among adults aged >=18 years, 2021
    "arthritis_crude95ci", -- Estimated confidence interval for crude prevalence of arthritis among adults aged ≥18 years
    "arthritis_crudeprev", -- Model-based estimate for crude prevalence of arthritis among adults aged >=18 years, 2021
    "access2_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of current lack of health insurance among adults aged 18-64 years
    "access2_adjprev", -- Model-based estimate for age-adjusted prevalence of current lack of health insurance among adults aged 18-64 years, 2021
    "access2_crude95ci", -- Estimated confidence interval for crude prevalence of current lack of health insurance among adults aged 18 - 64 years
    "access2_crudeprev", -- Model-based estimate for crude prevalence of current lack of health insurance among adults aged 18-64 years, 2021
    "countyfips", -- County FIPS code
    "countyname", -- County name
    "statedesc", -- State name
    "stateabbr", -- State abbreviation
    "disability_crudeprev", -- Model-based estimate for crude prevalence of any disability among adults aged >=18 years, 2021 
    "indeplive_adjprev", -- Model-based estimate for age-adjusted prevalence of independent living disability  among adults aged >=18 years, 2021
    "mobility_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of mobility disability among adults aged >=18 years
    "mobility_crude95ci", -- Estimated confidence interval for crude prevalence of mobility disability among adults aged >=18 years
    "hearing_adj95ci", -- Estimated confidence interval for age-adjusted prevalence of hearing disability among adults aged >=18 years
    "hearing_adjprev", -- Model-based estimate for age-adjusted prevalence of hearing disability  among adults aged >=18 years, 2021
    "hearing_crudeprev", -- Model-based estimate for crude prevalence of hearing disability among adults aged >=18 years, 2021 
    "teethlost_adjprev", -- Model-based estimate for age-adjusted prevalence of all teeth lost among adults aged >=65 years, 2020
    "stroke_crudeprev", -- Model-based estimate for crude prevalence of stroke among adults aged >=18 years, 2021
    "sleep_crudeprev", -- Model-based estimate for crude prevalence of sleeping less than 7 hours among adults aged >=18 years, 2020
    "lpa_crudeprev", -- Model-based estimate for crude prevalence of no leisure-time physical activity among adults aged >=18 years, 2021
    "highchol_crudeprev", -- Model-based estimate for crude prevalence of high cholesterol among adults aged >=18 years who have been screened in the past 5 years, 2021
    "ghlth_crudeprev", -- Model-based estimate for crude prevalence of fair or poor health among adults aged >=18 years, 2021
    "diabetes_crudeprev", -- Model-based estimate for crude prevalence of diagnosed diabetes among adults aged >=18 years, 2021
    "dental_adjprev", -- Model-based estimate for age-adjusted prevalence of visits to dentist or dental clinic among adults aged >=18 years, 2020
    "csmoking_crude95ci", -- Estimated confidence interval for crude prevalence of current smoking among adults aged >=18 years
    "colon_screen_crudeprev", -- Model-based estimate for crude prevalence of colorectal cancer screening  among adults aged 50–75 years, 2020
    "chd_adjprev", -- Model-based estimate for age-adjusted prevalence of coronary heart disease among adults aged >=18 years, 2021
    "casthma_crude95ci", -- Estimated confidence interval for crude prevalence of current asthma among adults aged >=18 years
    "bpmed_adjprev", -- Model-based estimate for age-adjusted prevalence of taking medicine for high blood pressure control among adults aged >=18 years with high blood pressure, 2021
    "bpmed_crude95ci", -- Estimated confidence interval for crude prevalence of taking medicine for high blood pressure control among adults aged >=18 years with high blood pressure
    "binge_adjprev", -- Model-based estimate for age-adjusted prevalence of binge drinking among adults aged >=18 years, 2021
    ":@computed_region_skr5_azej", -- This column was automatically created in order to record in what polygon from the dataset 'Counties' (skr5-azej) the point in column 'geolocation' is located.  This enables the creation of region maps (choropleths) in the visualization canvas and data lens.
    "kidney_crude95ci", -- Estimated confidence interval for crude prevalence of chronic kidney disease among adults aged >=18 years
    "corew_adjprev" -- Model-based estimate for age-adjusted prevalence of older adult women aged >=65 years who are up to date on a core set of clinical preventive services: Flu shot past year, PPV shot ever, Colorectal cancer screening, and Mammogram past 2 years, 2020
FROM
    "cdc-gov/places-county-data-gis-friendly-format-2023-i46a-9kgh:latest"."places_county_data_gis_friendly_format_2023"
LIMIT 100;

Connecting to the DDN is easy. All you need is an existing SQL client that can connect to Postgres. As long as you have a SQL client ready, you'll be able to query cdc-gov/places-county-data-gis-friendly-format-2023-i46a-9kgh with SQL in under 60 seconds.

This repository is an "external" repository. That means it's hosted elsewhere, in this case at data.cdc.gov. When you querycdc-gov/places-county-data-gis-friendly-format-2023-i46a-9kgh:latest on the DDN, we "mount" the repository using the socrata mount handler. The mount handler proxies your SQL query to the upstream data source, translating it from SQL to the relevant language (in this case SoQL).

We also cache query responses on the DDN, but we run the DDN on multiple nodes so a CACHE_HIT is only guaranteed for subsequent queries that land on the same node.

Query Your Local Engine

Install Splitgraph Locally
bash -c "$(curl -sL https://github.com/splitgraph/splitgraph/releases/latest/download/install.sh)"
 

Read the installation docs.

Splitgraph Cloud is built around Splitgraph Core (GitHub), which includes a local Splitgraph Engine packaged as a Docker image. Splitgraph Cloud is basically a scaled-up version of that local Engine. When you query the Data Delivery Network or the REST API, we mount the relevant datasets in an Engine on our servers and execute your query on it.

It's possible to run this engine locally. You'll need a Mac, Windows or Linux system to install sgr, and a Docker installation to run the engine. You don't need to know how to actually use Docker; sgrcan manage the image, container and volume for you.

There are a few ways to ingest data into the local engine.

For external repositories (like this repository), the Splitgraph Engine can "mount" upstream data sources by using sgr mount. This feature is built around Postgres Foreign Data Wrappers (FDW). You can write custom "mount handlers" for any upstream data source. For an example, we blogged about making a custom mount handler for HackerNews stories.

For hosted datasets, where the author has pushed Splitgraph Images to the repository, you can "clone" and/or "checkout" the data using sgr cloneand sgr checkout.

Mounting Data

This repository is an external repository. It's not hosted by Splitgraph. It is hosted by data.cdc.gov, and Splitgraph indexes it. This means it is not an actual Splitgraph image, so you cannot use sgr clone to get the data. Instead, you can use the socrata adapter with the sgr mount command. Then, if you want, you can import the data and turn it into a Splitgraph image that others can clone.

First, install Splitgraph if you haven't already.

Mount the table with sgr mount

sgr mount socrata \
  "cdc-gov/places-county-data-gis-friendly-format-2023-i46a-9kgh" \
  --handler-options '{
    "domain": "data.cdc.gov",
    "tables": {
        "places_county_data_gis_friendly_format_2023": "i46a-9kgh"
    }
}'

That's it! Now you can query the data in the mounted table like any other Postgres table.

Query the data with your existing tools

Once you've loaded the data into your local Splitgraph engine, you can query it with any of your existing tools. As far as they're concerned, cdc-gov/places-county-data-gis-friendly-format-2023-i46a-9kgh is just another Postgres schema.