Nature · Making-of

Seoul Otter Map

About this project

What it is

The Seoul Otter Map is a data map that presents the 27 otters identified by DNA in the Han River system, as a map and a story. It builds on a survey announced on 3 September 2026 by Korea's Ministry of Climate, Energy and Environment and the National Institute of Biological Resources: 106 scat samples analyzed from 27 points along the Han River between January and April 2026. It also places that result in sequence with the 2016 otter sighting at the Tan Stream, the four otters confirmed in 2017, and the 15 confirmed in 2022. It is not a republication of the official results but a reorganization of public material for map-based browsing, and the screens keep saying where that line lies.

How to use it

Data and method

There are three sources. The first is the announcement above. Its 27 survey points were 13 on the main river and 14 on tributaries; 27 individuals had genetic data (16 female, 11 male), 21 on the main river and 6 on tributaries, and all were related, forming five parent-and-offspring families. The second is press coverage of the 2022 Seoul survey (17 points, 15 individuals). The third is the Seoul Open Data Plaza's river-zone register, used to understand stream names and places. Each value in the data file carries a provenance label that separates facts confirmed directly by the official announcement, press reports that supplement it, values the service derived, and separate records kept by the service.

Limits and caveats

Individual codes like OT-001 and family codes F01 to F05 are not official names; they are internal labels invented to tell the 27 animals apart on the map. Only 12 of the 27 carry a family code and the other 15 are not assigned to a family; that mapping is the service's arrangement of a published summary. The map's 13 areas are not the same unit as the 27 official survey points, and coordinates are generalized public display positions, not survey sites or otter routes. The number 27 is how many individuals had genetic data in that survey, not the total number of otters in Seoul, and the yearly figures (4, 15, 27) should not be read as growth because survey coverage and methods differ. The two camera records are separate and are not added to the 27. Exact survey points are not shown on screen. The making-of article describes admin login and map-tile authentication as unfinished; that reflects the time of writing, and connection work has continued since.

Related

The build story is in the making-of article. For another nature map, see the Korea Tree Map.

The request was a Seoul otter map. More precisely, the map and data had already been made elsewhere, and the job was to put it on the internet and make citizen sightings and admin review actually work. It meant turning a local version that ran from a single file into a service where GitHub, Vercel, Supabase and Google sign-in mesh together. I went step by step, and the further I got, the more of the work was lining up accounts and settings rather than code.

Not a catch-all

I wrote the API route as a single file, api/[...path].js. In Next.js that is a catch-all pattern that takes every path under /api/. But this project was plain Vercel serverless functions, not Next.js, and there [...path] matches only a single segment. So one-level paths like /api/health worked, while paths two or more levels deep such as /api/observations/public or /api/auth/me returned 404 from the platform. Most of the API fell in that group. I fixed it by changing to api/handler.js and adding a rewrite in vercel.json that sends /api/(.*) to /api/handler.

Keys and tokens

Admin features were first opened with a single ADMIN_TOKEN value. When it was pointed out that this value reaches the browser, I switched to a flow where you sign in with a Google account and the server checks each time that the email is on an allow list (OIDC). Registering the Google OAuth client is not finished, so as of this writing admin sign-in is not fully on.

Map background tiles come from CARTO. I had put the API key straight into the source, and after the same kind of comment it moved to a Vercel environment variable. The code keeps only the name carto_api_key and reads the value from server settings. But moving the code and filling in the environment variable are separate jobs. Vercel production does not have the value yet, so opening the map covers the whole screen with CARTO's "API KEY REQUIRED" watermark instead of tiles. The map is the whole point of this service, and this part is not finished.

A server without Python

The code that processes report photos originally called python3 and Pillow as a subprocess. Serverless environments have no Python, so I rewrote it with the Node.js package sharp. While doing that I found a bug where uploaded photos were never recorded in the photo_assets table, which would have blown up on a foreign key violation with a real PostgreSQL. I caught it during local testing.

What is not done

Beyond Google sign-in and the map tile key, some jobs remain: shared rate limiting for the admin API (Redis based), malware checks on uploaded photos, monitoring that alerts on outages, and a real browser run through report, sign-in and review from start to finish. These four have not been done. Instead of reporting everything finished, I wrote in the handoff document what was done and where it stops.

Try Seoul Otter Map (in Korean) Go to sudal.ghmun.com →