Mapping Diversity: Race Demographics by ZIP Code with GeoRace

mapping-diversity-race-demographics-by-zip-code-with-georace

Overview

GeoRace delivers ZIP Code–level population statistics by race, based on Census 2010 ZIP Code Tabulation Areas. Simply supply your API key, the target U.S. ZIP Code, and desired output format, and receive counts and percentages for Asian, Black/African‑American, American Indian & Alaska Native, Native Hawaiian & Pacific Islander, White, and other race groups in one concise response.

Key Business Use Cases

1. Inclusive Marketing & Outreach

Identify ZIP Codes with diverse racial compositions to tailor multicultural campaigns, allocate ad spend, and ensure messaging resonates across communities.

2. Public Policy & Community Planning

Inform social programs and resource allocation by analyzing racial demographics at the ZIP Code level—supporting equitable access to healthcare, education, and services.

3. Academic & Nonprofit Research

Enrich research datasets with race distribution metrics for studies in sociology, public health, or urban development, without manual census lookups.

Developer Spotlight: C# Code Snippet


// GeoRace C# example
using System;
using System.Net.Http;
using System.Text.Json;
using System.Threading.Tasks;

namespace CDXGeoDataSample
{
    class Program
    {
        static async Task Main()
        {
            var apiKey = Environment.GetEnvironmentVariable("CDX_GEO_KEY");
            var zip    = "30301";  // Atlanta, GA
            var url    = $"https://geodata.cdxtech.com/api/georace?key={apiKey}&zipcode={zip}&format=json";

            using var client   = new HttpClient();
            var response       = await client.GetAsync(url);
            response.EnsureSuccessStatusCode();

            var json   = await response.Content.ReadAsStringAsync();
            var root   = JsonDocument.Parse(json).RootElement;
            var data   = root.GetProperty("results")[0];

            Console.WriteLine($"White %: {data.GetProperty("Whitepercentage").GetDouble():P1}");
            Console.WriteLine($"Black %: {data.GetProperty("Blackpercentage").GetDouble():P1}");
            Console.WriteLine($"Asian %: {data.GetProperty("Asianpercentage").GetDouble():P1}");
            Console.WriteLine($"Other %: {data.GetProperty("Otherpercentage").GetDouble():P1}");
        }
    }
}
  

Sample Response

{
  "service": "GeoRace",
  "results": [
    {
      "zipCode": "30301",
      "AsianPopulation": 1200,
      "BlackPopulation": 8500,
      "IndianPopulation": 300,
      "HawaiianPopulation": 50,
      "WhitePopulation": 16000,
      "Otherpercentage": 0.05,
      "Asianpercentage": 0.05,
      "Blackpercentage": 0.23,
      "Indianpercentage": 0.01,
      "Hawaiianpercentage": 0.00,
      "Whitepercentage": 0.71,
      "Remainingpercentage": 0.00,
      "Totalpercentage": 1.00
    }
  ],
  "tokenCharge": 5
}
  

Getting Started

  1. Sign up for a free CDXGeoData account and grab your API key.
  2. Invoke GET /api/georace with key, zipcode, and format parameters.
  3. Parse the results array to access both counts and percentage fields for each race category.
Comments are closed