I live in Madrid and I'm an engineer at Vizzuality.
Vizzuality builds amazing mapping and dataviz projects., most of them for NGOs.
We are about great user experiences and telling stories with complex datasets.
We mostly have a web-based approach to GIS.
Leaflet, Google Maps, D3, Carto(DB).js, PostGIS...
React, Redux, Backbone, Webpack...
Ruby on Rails, Python, Postgre...
Aaaaaand we are !
So, I'm a front-end engineer
This talk is about developer-friendly tools to do GIS web mapping
xkcd
Summary:
- tools of the trade
- a starter kit
- CARTO on the command line
- Atom for webmapping
- geocoding
- bonus track: emoji maps
Define Carto:
Empower organizations to optimize operational performance, strategic investments, and everyday decisions with CARTO Engine
Improve customer satisfaction by 15%
CARTO is brilliant
Carto is basically:
- a PaaS Postgres/PostGIS instance
- a supercharged Postgres/PostGIS instance: geocoding, routing, basemaps, curated open datasets...
- a set of REST APIs
- a semi-WYSIWYG GIS piece of software (the Builder)
Why Carto?
- kind learning curve
- serves as a cheap and convenient back-office (downside: you need connectivity)
- the Builder is amazing for prototyping
Disclaimer: I previously worked at Carto
Disclaimer 2 / fun fact: Carto(DB) is originally a Vizzuality spin-off
Chrome + Electron
Chrome + Electron
Tools of the trade: a shell and a terminal
Namely:
- zsh
- oh-my-zsh
- iTerm 2
- node.js, npm, python, etc...
- bonus: the Input Mono font
«A beginning is a very delicate time»
Vizzuality strong suit:
- dedicated exploration phase for each project:
data + interactivity
- client is heavily involved in it (co-creation)
We need an efficient tool for bootstrapping prototypes/projects.
Enter
Yeoman + Carto
$ npm i -g yo generator-cartodb
$ yo cartodb
$ sudo npm i -g yo generator-cartodb
$ sudo yo cartodb
local server
liveReload
eslint
yo cartodb
Uses NPM as a task runner
(add gulp, grunt when needed)
Uses cat to bundle JS
(use webpack, browserify when needed)
Tries to be a compromise between too simple and overly complicated toolchains
(1000 lines gulpfiles, obscure webpack config, etc)
CARTO on the command line
Python
- SQL and Import APIs
- The "official" client
- Has one contributor inside CARTO (Dani Carrion)
Ruby
Node.js
- SQL and Import APIs
- Named maps API
- CLI access
a simple select (JSON)
the -f (--format) option
CSVKIT: csvlook
CSVKIT: csvcut, csvstat
GeoJSON output
piping to geojsonio
username (-u) not enough for write ops
specify api key (-a / --api_key)
shapefile -> carto
--url
Improve customer satisfaction by 15% !
Atom for GIS
Atom for GIS
Atom for webmapping
APM
Yay! An integrated package manager! (merely an NPM wrapper, actually)
$ apm install linter
$ apm install highlight-selected
$ apm install emmet
$ apm install pretty-json
$ apm install pigments
$ apm install color-picker
$ apm install language-carto
$ apm install carto-api
linter
highlight-selected
emmet
color-picker
pigments
language-carto
Remember CARTO APIS? Now in Atom!
run a SQL query, get some CSV
let's feed some GeoJSON to L
and some SVG, because why not
file import from the tree view
Some heavy customer satisfaction going on here !
apm install carto-api
PRs and insults -> @nerik
CARTO provides geocoding
for various entities, points and polys
CARTO provides geocoding and routing
at SQL level
which means, also in your beloved terminal - here, a named place
street-level
carto-geocode-sql
turns location strings to SQL queries
using it in a subshell, for the carto cli
mötley crüe geocoding
geocoding in Atom
gj2ascii
"Render spatial vector data as ASCII or emoji with Python on the commandline."
cartodb | gj2ascii (heed the "-" !)
Remember
Thanks!
@nerik
soundtrack: Ibrahim Ferrer, Ólafur Arnalds, Jordi Savall, The Cure, Bill Withers