Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bradoyler/atlas-magic
A magic hat full of map making tricks
https://github.com/bradoyler/atlas-magic
Last synced: 11 days ago
JSON representation
A magic hat full of map making tricks
- Host: GitHub
- URL: https://github.com/bradoyler/atlas-magic
- Owner: bradoyler
- Created: 2017-07-21T02:19:33.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-08-02T21:34:33.000Z (over 7 years ago)
- Last Synced: 2024-10-11T01:14:18.887Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 159 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Atlas-Magic :sparkles:
This tool will:
-> download a shp file from CDN
-> apply an optional filter
-> converts to topojson
-> simplify geometries while preserving topology### Run it
```
npx atlas-magic us-rivers > newtopojson.json
```Watch the magic happen...
## Command Line Reference
#atlas-magic <command> [options…] [`<>`](https://github.com/bradoyler/atlas-magic/blob/master/bin/atlas-magic.js "Source")
where __<command>__ is:
`us-counties, us-cities, us-rivers, us-states, combine-topo`__[options...]__
| key | default | example
|--------|--------|---------
| --listfile | | `myFIPScodes.csv` (used for filtering)
| --filterkey | `FIPS` |
| --max | `100000` | for population (when applied)
| --simplify | `0.006` |
| --quantize | `1e6` |### Examples
##### US Cities with population over 250k
```sh
$ atlas-magic us-cities --max 250000 > cities_over_250k.json
```##### US Counties filtered by a newline delimited list
```sh
$ atlas-magic us-counties --listfile fips_codes.csv > my-us-counties.json
```##### US Rivers
```sh
$ atlas-magic us-rivers > us-rivers.json
```##### US States
```sh
$ atlas-magic us-states > us-states.json
```##### Combine topologies (not merge)
```sh
$ atlas-magic us-states > us-states.json
$ atlas-magic us-counties --listfile fips_codes.csv > us-counties.json
$ atlas-magic combine-topo us-states.json us-counties.json > us-states-with-counties.json
```