import type { FeatureCollection } from "geojson"; import type { GeometryCollection, Topology } from "topojson-specification"; import { geoEquirectangular, geoPath } from "d3-geo"; import { feature } from "topojson-client"; import countriesTopologyJson from "world-atlas/countries-110m.json"; import Link from "next/link"; const WIDTH = 1_000; const HEIGHT = 500; const topology = countriesTopologyJson as unknown as Topology<{ countries: GeometryCollection }>; const countries = feature(topology, topology.objects.countries) as FeatureCollection; const projection = geoEquirectangular().fitExtent([[1, 1], [WIDTH - 1, HEIGHT - 1]], { type: "Sphere" }); const countryPath = geoPath(projection); export interface UserMapLocation { userId: string; name: string; discordUsername: string; latitude: number; longitude: number; location: string; classification: string; source: string; observedAt: Date; } export function UserWorldMap({ locations, unavailableCount }: { locations: UserMapLocation[]; unavailableCount: number }) { return (

Latest known location

Community world

{locations.length} mapped · {unavailableCount} without coordinates. Locations are approximate IP intelligence, not precise device positions.

Latest approximate location for registered users An open-data world map with one linked marker for every user whose latest geolocated observation has valid coordinates. A complete text list follows. {locations.map((user) => { const projected = projection([user.longitude, user.latitude]); if (!projected) return null; const x = Math.min(WIDTH - 14, Math.max(14, projected[0])); const y = Math.min(HEIGHT - 14, Math.max(14, projected[1])); return ( {user.name} · {user.location} · {user.classification} ); })}

Map boundaries: Natural Earth, public domain

View accessible location list
{locations.map((user) => )} {!locations.length && }
Latest approximate registered-user locations
UserLocationNetworkSourceLast observed
{user.name}@{user.discordUsername}{user.location}{user.classification}{user.source}
No user observations currently include valid coordinates.
); }