{"id":28001160,"url":"https://github.com/sanand0/antipodes","last_synced_at":"2025-07-17T01:35:21.520Z","repository":{"id":288729006,"uuid":"969021805","full_name":"sanand0/antipodes","owner":"sanand0","description":"Show what's on the other side of the Earth. Pure LLM code by O3","archived":false,"fork":false,"pushed_at":"2025-04-19T08:15:43.000Z","size":314,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-08T23:57:44.517Z","etag":null,"topics":["data-visualization","llm"],"latest_commit_sha":null,"homepage":"https://geojson.io/#data=data:text/x-url,https%3A%2F%2Fraw.githubusercontent.com%2Fsanand0%2Fantipodes%2Frefs%2Fheads%2Fmain%2Fantipodal_ocean.geojson","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sanand0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-19T07:49:24.000Z","updated_at":"2025-04-19T08:38:51.000Z","dependencies_parsed_at":"2025-04-19T14:31:55.300Z","dependency_job_id":"0ab09b65-dd4c-4f31-a5e5-bc7371a6aff9","html_url":"https://github.com/sanand0/antipodes","commit_stats":null,"previous_names":["sanand0/antipodes"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sanand0/antipodes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanand0%2Fantipodes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanand0%2Fantipodes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanand0%2Fantipodes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanand0%2Fantipodes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sanand0","download_url":"https://codeload.github.com/sanand0/antipodes/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sanand0%2Fantipodes/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265558724,"owners_count":23787969,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-visualization","llm"],"created_at":"2025-05-08T23:57:43.498Z","updated_at":"2025-07-17T01:35:21.500Z","avatar_url":"https://github.com/sanand0.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Antipodal countries\n\nDavid McCandless shared a [post](https://www.linkedin.com/posts/david-mccandless-4641b54_which-country-is-across-the-ocean-activity-7317621545374265344-V303): \"Which country is across the ocean?\"\n\n![Visualization of which country is across the ocean - Eastern Hemisphere](across-east.webp)\n\nThis was cool! It shows which country you would reach if you traveled east or west across the ocean in a straight line.\n\nI was curious which country you would reach if you tunneled below in a straight line. This is called the [antipode](https://en.wikipedia.org/wiki/Antipodes) and there are several visualizations of it.\n\n![Antipodes visualization](https://upload.wikimedia.org/wikipedia/commons/6/64/Antipodes_LAEA.png)\n\nI wanted an interactive one. Since LLMs are _so_ good, and O3 was just released, [I asked O3](https://chatgpt.com/share/6803528e-3a04-800c-a8df-8693aa1714d5):\n\n\u003e Write a program that shows each country projected to the opposite side of the globe, but only the parts that overlap the ocean.\n\u003e\n\u003e Figure out where to get the geospatial data for countries online and get it yourself\n\u003e\n\u003e I don't need you to visualize it. I need the output in an open format that can be visualized in popular open-source or online geo-tools where I can rotate the globe, click on the countries' opposites and see which country is where.\n\u003e\n\u003e At the end allow me to download the file and tell me where I can view it.\n\nThe attempt was not bad at all, but there was a problem:\n\n![Countries straddling the prime meridian had errors.](error.webp)\n\nSo, I started again, using ChatGPT's own prompt suggestion, and adding my description of the error. [Here's the chat](https://chatgpt.com/share/68034776-8cec-800c-a85b-7d6bc94411c0):\n\n\u003e Build a _single_ GeoJSON (EPSG:4326) that shows, for each country, only the parts of its antipode that lie over ocean.\n\u003e Carefully handle countries that straddle the prime meridian - UK, France, Algeria, etc.\n\nThe result is this [`antipodes.py`](antipodes.py) and [`antipodal_ocean.geojson`](antipodal_ocean.geojson) that it generates.\nClick the link below to [view the interactive visualization on geojson.io](https://geojson.io/#data=data:text/x-url,https%3A%2F%2Fraw.githubusercontent.com%2Fsanand0%2Fantipodes%2Frefs%2Fheads%2Fmain%2Fantipodal_ocean.geojson):\n\n[![View the file on a map](result.webp)](https://geojson.io/#data=data:text/x-url,https%3A%2F%2Fraw.githubusercontent.com%2Fsanand0%2Fantipodes%2Frefs%2Fheads%2Fmain%2Fantipodal_ocean.geojson)\n\nI didn't change O3's script except to add the `uv` dependencies and switch from the 1:10m to 1:110m maps for speed.\nTo run the script:\n\n```bash\nwget https://naciscdn.org/naturalearth/110m/cultural/ne_110m_admin_0_countries.zip\nunzip ne_110m_admin_0_countries.zip -d ne_110m_admin_0_countries\nuv run antipodes.py\n```\n\nA few things I learnt from this:\n\n**Ask for the output, not the code**. Models like [O3](https://platform.openai.com/docs/models/o3) and [O4 Mini](https://platform.openai.com/docs/models/o4-mini) can run code, search, reason, read images, etc. while thinking. The models _are_ the environment, now! Let's stop asking for code and ask for the result instead.\n\n**Edge cases are everywhere**. If all goes well, you get AI-speed results. But when something goes wrong (because UK, France, Algeria, etc. straddle the prime meridian, for example), fixing it takes an expert and human-speed results. In fact, the current output is far from perfect (e.g. Indonesia appears in Brazil which is clearly not an ocean.) Programmers under-estimate edge cases, so compensate for this.\n\n**Geospatial analysis is mature**. I was surprised to see `.difference()` in shapes, which made the core part of the code (`build_antipodal_ocean()`) very concise. Libraries like [`fiona`](https://pypi.org/project/fiona) and [`shapely`](https://pypi.org/project/shapely/) have made a big impact.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanand0%2Fantipodes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsanand0%2Fantipodes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsanand0%2Fantipodes/lists"}