{"id":14035899,"url":"https://github.com/spencermountain/somehow-maps","last_synced_at":"2025-10-11T22:02:11.575Z","repository":{"id":34844155,"uuid":"162335530","full_name":"spencermountain/somehow-maps","owner":"spencermountain","description":"make a map without thinking","archived":false,"fork":false,"pushed_at":"2023-03-04T03:38:42.000Z","size":21493,"stargazers_count":5,"open_issues_count":8,"forks_count":0,"subscribers_count":2,"default_branch":"gh-pages","last_synced_at":"2025-07-06T05:42:36.027Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://spencermounta.in/somehow-maps","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spencermountain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2018-12-18T19:23:55.000Z","updated_at":"2023-07-29T21:26:21.000Z","dependencies_parsed_at":"2024-04-09T11:39:42.152Z","dependency_job_id":"0fe0fbf6-b939-4fad-ba02-82f82e9fb3b4","html_url":"https://github.com/spencermountain/somehow-maps","commit_stats":null,"previous_names":["spencermountain/somehow-geo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/spencermountain/somehow-maps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spencermountain%2Fsomehow-maps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spencermountain%2Fsomehow-maps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spencermountain%2Fsomehow-maps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spencermountain%2Fsomehow-maps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spencermountain","download_url":"https://codeload.github.com/spencermountain/somehow-maps/tar.gz/refs/heads/gh-pages","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spencermountain%2Fsomehow-maps/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265360327,"owners_count":23752682,"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":[],"created_at":"2024-08-12T03:01:45.653Z","updated_at":"2025-10-11T22:02:11.488Z","avatar_url":"https://github.com/spencermountain.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003cdiv\u003e\u003cb\u003esomehow-maps\u003c/b\u003e\u003c/div\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/399657/68222691-6597f180-ffb9-11e9-8a32-a7f38aa8bded.png\"/\u003e\n  \u003cdiv\u003e— part of \u003ca href=\"https://github.com/spencermountain/somehow\"\u003esomehow\u003c/a\u003e —\u003c/div\u003e\n  \u003cdiv\u003eWIP svelte infographics\u003c/div\u003e\n  \u003cdiv align=\"center\"\u003e\n    \u003csub\u003e\n      by\n      \u003ca href=\"https://spencermounta.in/\"\u003eSpencer Kelly\u003c/a\u003e \n    \u003c/sub\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n\u003cdiv align=\"right\"\u003e\n  \u003ca href=\"https://npmjs.org/package/somehow-maps\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/somehow-maps.svg?style=flat-square\" /\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\u003cimg height=\"25px\" src=\"https://user-images.githubusercontent.com/399657/68221862-17ceb980-ffb8-11e9-87d4-7b30b6488f16.png\"/\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ccode\u003enpm install somehow-maps\u003c/code\u003e\n\u003c/div\u003e\n\nthis library just hoodwinks some d3 projection methods into Svelte components -\n\n- so that basic SVG maps can be made in a leisurely way.\n- **work-in-progress!**\n\n```js\n\u003cscript\u003e\n  import { Globe, Line, Graticule, Dot, Latitude } from 'somehow-map'\n\u003c/script\u003e\n\n\u003cGlobe rotate={30} tilt={-10}\u003e\n  \u003cGraticule /\u003e\n  \u003cCountries stroke=\"grey\" /\u003e\n  \u003cLatitude at={40} /\u003e\n  \u003cLine from=\"toronto\" to='jamaica' /\u003e\n  \u003cDot at={[90, 0]} color=\"lightblue\" radius={50} /\u003e\n\u003c/Globe\u003e\n```\n\n![image](https://user-images.githubusercontent.com/399657/92409352-494f6e80-f10e-11ea-82cf-51c8bdc8e4c0.png)\n\n### Components\n\nthese two are the containers, and should be mostly interchangeable\n\n- `\u003cGlobe/\u003e`\n- `\u003cMap/\u003e`\n  both of these accept a 'focus' param, what zooms the map projection to fit a geojson object.\n\nthese are the basic primitives\n\n- `\u003cLine from={[lat, lng]} to={'city-name'}/\u003e`\n- `\u003cShape shape={geojson}/\u003e`\n- `\u003cDot radius={4} at={'chicago'}/\u003e`\n\n  these are continual lines around the whole world:\n\n- `\u003cLatitude/\u003e`\n- `\u003cLongitude/\u003e`\n\n  these are some helpers\n\n- `\u003cCountries/\u003e`\n- `\u003cGraticule/\u003e`\n- `\u003cIntersections/\u003e`\n\n### Misc\n\nto generate ad-hoc topojson shapes (without using QGIS):\n\n- grab shapefiles from [natural earth](https://www.naturalearthdata.com/downloads/)\n- draw a new shape in [geojson.io](http://geojson.io)\n- add them both to [mapshaper.org](https://mapshaper.org/)\n- run `mapshaper -clip myshape.geojson`\n- export as **topojson**\n\n---\n\nto generate ad-hoc topojson shapes from openstreetmap:\n\n- download some pbf data from [geofabrik.de](http://download.geofabrik.de/)\n\n- use James Halliday's nodejs [pbf parser](https://github.com/substack/osm-pbf-parser) to filter down [specific tags](https://wiki.openstreetmap.org/wiki/Key:amenity)\n\n### See also\n\n- [somehow](https://github.com/spencermountain/somehow)\n- [thensome.how](https://thensome.how)\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspencermountain%2Fsomehow-maps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspencermountain%2Fsomehow-maps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspencermountain%2Fsomehow-maps/lists"}