~bduggan/leafpad

View CSVs that have geojson columns

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~bduggan/leafpad
read/write
git@git.sr.ht:~bduggan/leafpad

You can also use your local clone with git send-email.

#leafpad

Leafpad is a simple way of viewing csv files that contain geojson columns.

image

#How it works

  1. Start a local web server
  2. Put a csv file into the data directory (demo.csv is there by default)
  3. Open a browser to http://localhost:3000/show/csv/demo (where "demo" is the base filename)
  4. Columns whose names end in _geojson will be displayed as geojsons
  5. Columns named "lat" or "lon" (or latitude or longitude) will be markers
  6. That's it!

But wait, there's more!

  • click on geojson columns in the csv to fly there on the map
  • put multiple csv files into a directory, and view them all at once
  • use the mouse to scroll/pan
  • type "l" to generate a link with the current zoom and lat/lon
  • okay, that's really it

#Installation and running

  1. Clone this repo

    git clone https://git.sr.ht/~bduggan/leafpad
    
  2. Install a recent Perl and cpanminus (cpanm) See https://perlbrew.pl/ or use a package manager for your distribution.

  3. Install Mojolicious and Text::CSV_XS:

    cpanm Mojolicious
    cpanm Text::CSV_XS
    
  4. Start the web server

    ./leafpad daemon
    
  5. Open a browser at http://localhost:3000 and click on "demo" to go to http://localhost:3000/show/csv/demo

  6. Enjoy!