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.

Try

If you have uv installed, give it a spin with uvx and say "hello, world!"

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

Install

You can install cowsee into your python environment with uv or pip.

uv add cowsee

pip install cowsee

Run

To run, it is as simple as:

cowsee <filepath/url>

Any file type or url that can be input into the filename argument of geopandas.read_file() can be handled by cowsee.

Supports visualization of 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 followed by the ratio number. For example, -s 0.5 simplifies geometries to 50% of a text character's equivalent geometric width.

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.1.tar.gz (11.2 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.1-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for cowsee-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ebba5c8c747932632459288f7fe9ce3134003d5a9f79cc9147665c09e25a3b41
MD5 67f8044d8845be98372c27da7d25c070
BLAKE2b-256 169653c41dcd40212e3212c6a9178f518f54bd424e5aeaa2e87ae9faa9e37f9c

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for cowsee-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d5863e536260a11bd3c7cb40f7b3ca5fb16c85b06b65ee88d6231c900c407fa9
MD5 c40b675c6263b930bee853c35e5b170c
BLAKE2b-256 ca6f125c34c08c224ef0ac7e973cd8adadecfc56e8add2ab814fab8f9c3deb11

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