Skip to main content

Visualize geometry data in the command line, along with the famous talking cow.

Project description

cowsee

"A picture is worth a thousand words." -the cow

Visualize geometry data in the command line, along with the famous talking cow.

$ cowsee hello_world.shp
╔════════════════════════════════════════════════════════════════════════════╗                    
║                                                                            ║
║                      /─\   /─┬─╴                                           ║
║              /─┬┬┬┬┬─┴─┴─┬─┴╴\──┬─╴    ╶──╴  ╶──┬┬╴╶─╴/────\   /┬┬╴        ║
║   ╷ /────┬───┴┬┼┼┼┼┼┬─┬─\\┬╴   /┴╴     /┬┬┬─\╷/┬┴┴┬┬┬─/  ╶─┴───┴┴┴─────\   ║
║   \─┼╴ ╷╷|    \┴┴┴┼┴┴┬┴┬┴╴\┬┬──/╶─╴  /┬┼┼┤├─┴┴┴/  \┴/              /┬╴//   ║
║    ╶┼──┴┴┴─┬\     \─\├╴\─\ \/      /\\┼┼┴┼┴\    /──┬\          /┬──┼┼─/    ║
║   ╶─/      \┼───────┼/ /┬┼\       ╶┴┼─┼┼┬┼┬┼\ /┬/  ╵\┬┬─────┬─┬┼┼╴╷\/      ║
║             |       \─┬┴┴/╵        /┴┬┼┼┼┼┼┴┴┬┼┼─┬┬┬─/\─────┼┬┼/├╴╵        ║
║             \─\      //        ╶╴  ├┬┴┼┼┴┼┴┬┬┴┼┴┬┴┼┼\      ╶┤\┼─/          ║
║              ╶┴┬┬─┬──┼\          ╶┬┼┤ ├┼─┼─┼┼─┼┬┼┬┼/\─┬┬\   |╶/            ║
║      ╶╴        \┴┬┴┬─┴┼┬\        //├┴┬┴┼─┼─┴┼┬┼┼/╵\\ /┴┼┼┬──┤              ║
║                  \─┴\ ├┼┼\       \┬┼┬┼─┼╴| /┴┼┼/   |///┴┼┼╴ ├\             ║
║                     \┬┴┼┼┼┬\      \┴┴┴┬┼┬┴┬┼─┼┤    ├/ \┬┼┼\/┴┤    ╶╴ ╶╴    ║
║    ╷                 ├─┼/\┴┴─\        \┼┤ ├┴┬┴/    ╵   \┼┼┴┼┬┼┬┬┬\╷   ╶╴   ║
║    ╵     ╶╴          |╶┼\    ├╴        ├┴\├\|╶╴         \┴─┴┼┴/\┼┴/╶\╷     ║
║   \╶╴  ╶╴            \─┤\\   |         ├┬┼┼┼┤/\             ├───┴\  ╵╵ ╷   ║
║   ╵      ╶╴            ├─┼\/─/         |├┼┴┼/||           /┬/    \\ ╶─╴╵   ║
║                       /┤ ├┼/           \┼/// \/           \┤ /\   |        ║
║                       ||/┴/             \─/                \─/\─┬─/   /\   ║
║                       ├┼/                                       \╴   /┴/   ║
║                       ├┼╴    ╷                                       ╵     ║
║                       \┴╴ ╷  \╴                                            ║
║                        /─┬/                  /───\  /─────────────\        ║
║          /─────────────/╶┤      /────────────/   \──/             \─┬─╴    ║   ^__^
║   /──────/               \──────/                                   \──\   ║   (oo)\_______
║   ├┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┬┤   ║   (__)\       )\/\
║                                                                            ║       ||----w |
╚════════════════════════════════════════════════════════════════════════════╝       ||     ||

[!NOTE]
cowsee requires a monospaced font to be properly displayed without looking real funky.

Setup

Package and environment management is handled by uv.

$ uv sync
$ source .venv/bin/activate   # Linux/macOS
$ .venv\Scripts\activate      # Windows

Run

To run, it is as simple as:

$ cowsee <filepath/url>

Anything that can be read by geopandas.read_file() can be handled by cowsee. This includes links! Try saying "hello world" yourself:

$ cowsee https://international.ipums.org/international/resources/gis/IPUMSI_world_release2024.zip

Supports Polygon, LineString, and Point data.

To output a larger or smaller image, the maximum width can be defined using the --width or -w flag.

Complex Line and Polygon geometries can sometimes visually benefit from some simplification before drawing. This can be achieved by adding the --simplify-ratio or -s flag.

Finally, if you don't want to see the cow (said no one, ever) you can pass the --no-cow flag.

Looking Ahead

  • Testing coverage
  • Raster data support

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cowsee-0.1.0.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cowsee-0.1.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file cowsee-0.1.0.tar.gz.

File metadata

  • Download URL: cowsee-0.1.0.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.24

File hashes

Hashes for cowsee-0.1.0.tar.gz
Algorithm Hash digest
SHA256 297c271d6c706d6d33587bcc334cf67e6f36b4d00c2a1d197210eea7b444d9fb
MD5 5b38f9269e264cf6aac103b11bb04dd4
BLAKE2b-256 2261de431795d9f764308e61143e1b7497df34aa5240d3b635dcb01defcfc67e

See more details on using hashes here.

File details

Details for the file cowsee-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cowsee-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.24

File hashes

Hashes for cowsee-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3115f2caa8621b09843adcb6a9f0db8070332a7965f399ea5ecebd003a3e0cbd
MD5 c78f075bb3ed39cec594187f527f1b99
BLAKE2b-256 4692a5faf9cc807a1c5d34b0f880e380893fcd1f132d14bc76e40a53e4d21788

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page