Skip to Content
πŸ“‹ ReferenceData Sources

Last Updated: 4/6/2026


Data Sources & File Formats

This reference documents all data files used by the β€œWhere Did They Go?” application, their formats, locations, and how the Express backend serves them.

Data File Locations

The application stores data in two primary directories:

GeoJSON Files: server/public/kansas/geojson/

Geographic boundary and point data served as static files:

County Boundaries (by decade)

  • KSCounty_1860_GeoJSON.geojson through KSCounty_2020_GeoJSON.geojson
  • Contains county borders with population data in properties

Cities and Places (by decade)

  • KSPlace1900.geojson through KSPlace2010.geojson
  • Point features for Kansas cities and towns
  • cities.geojson β€” Current major cities with β€œTop Ten” designation

Infrastructure

  • railroads.geojson β€” Railroad lines with InOpBy property (year operational)
  • KS_Interstate_Lines.geojson β€” Interstate highway routes
  • KSSchools.geojson β€” School locations

Healthcare Facilities

  • HospitalData.geojson β€” Hospital locations
  • EMSStations.geojson β€” Emergency medical service stations
  • LabsData.geojson β€” Medical laboratory locations
  • PharmacyData.geojson β€” Pharmacy locations
  • PubHealthDpts.geojson β€” Public health departments
  • UrgentCareData.geojson β€” Urgent care facilities
  • VeteranHealthFacilities.geojson β€” VA healthcare facilities
  • combined_healthcare.geojson β€” All healthcare facilities combined

Water Features

  • KS_Lakes.geojson β€” Lake boundaries
  • KS_Rivers.geojson β€” River paths
  • KS_Water_Bodies.geojson β€” Other water bodies

Census Data

  • KSTracts_2000.geojson β€” Census tract boundaries for 2000

JSON Data Files: server/public/kansas/json/

Population Data

  • city-pops.json β€” City population by name
  • KSPopulation1970-2020ByCity.json β€” Detailed city population time series

Additional Data Files: server/data/

Note: Files in server/data/ are NOT served by Express and are not accessible via HTTP. These files exist in the repository for reference or future use but cannot be fetched by the frontend application.

Crime Statistics (not currently served)

  • Kansas_Crime_Index_2010_County_Totals.json
  • Kansas_Crime_Index_2020_County_Totals.json
  • Kansas_Crime_Index_2024_County_Totals.json

Food Access (not currently served)

  • FoodAccessResearchAtlasData2010.json β€” USDA food access research data

GeoJSON File Structure

All GeoJSON files follow the standard GeoJSON FeatureCollection format:

{ "type": "FeatureCollection", "features": [ { "type": "Feature", "geometry": { "type": "Point", "coordinates": [-97.3443, 37.6895] }, "properties": { "City Name": "Wichita", "Top Ten": true } } ] }

Common Geometry Types

  • Point: Cities, healthcare facilities, schools (single coordinate pair)
  • LineString: Rivers, railroads, highways (array of coordinates)
  • Polygon: County borders, lakes, water bodies (array of coordinate rings)

Property Schemas

County GeoJSON Properties

{ "id": "county-identifier", "pop-by-year": { "1860": 19, "1870": 2, "1880": 3 } }

Railroad GeoJSON Properties

{ "InOpBy": 1880 }

City GeoJSON Properties

{ "NAME": "Wichita", "PLACE": "Wichita city", "Top Ten": true }

How the Backend Serves Data

The Express server (server/app.js) serves all files in server/public/ as static assets:

app.use(express.static(path.join(__dirname, 'public')));

This means:

  • Files in server/public/kansas/geojson/cities.geojson are accessible at /kansas/geojson/cities.geojson
  • Files in server/public/kansas/json/city-pops.json are accessible at /kansas/json/city-pops.json

Important: The server does not provide REST API endpoints. All data is served as flat files. The frontend fetches these files directly using the fetchGeojson() and fetchJson() composables.

Data Attribution

Data sources include:

  • U.S. Census Bureau β€” Population data, census tracts, demographic information
  • USDA β€” Food Access Research Atlas data
  • Kansas State Data β€” Crime statistics, infrastructure data

See the project README for complete attribution details.

Loading Data in Components

Use the fetch composables to load data files:

import { fetchGeojson, fetchJson } from '../utility/fetchers'; // Load GeoJSON const { result } = fetchGeojson('/kansas/geojson/cities.geojson'); // Load JSON const { result } = fetchJson('/kansas/json/city-pops.json');

The composables handle:

  • Automatic retry on failure (up to 3 attempts)
  • Reactive loading states
  • Error handling
  • JSON parsing

Data File Naming Conventions

Year-based files: Use four-digit years in the filename

  • KSCounty_1860_GeoJSON.geojson
  • KSPlace1900.geojson

Descriptive names: Use clear, descriptive names for static datasets

  • railroads.geojson
  • cities.geojson
  • combined_healthcare.geojson

Consistency: All GeoJSON files use .geojson extension, all JSON files use .json

Working with Feature Properties

Access GeoJSON feature properties in D3 data joins:

selection = gTag .selectAll('.city') .data(geojsonData.features, (d) => d.properties.NAME) .join( (enter) => enter .append('path') .attr('d', pathGen) .on('click', (event, d) => { console.log('City:', d.properties.NAME); console.log('Population:', d.properties['Top Ten']); }) );

Use the key function (second parameter to .data()) to ensure stable element identity across updates.

What’s Next