Alberto Romeu

Happy PostGIS day!

At CARTO we <3 PostGIS. And we love PostGIS not only because it’s a fully-fledged geospatial analytics engine but because being at the roots of our technology it helps us building tools to help companies and individuals better understand their geospatial data through Location Intelligence.

Recently, we have found out Franchise. Franchise is a SQL tool with a notebook interface, built by some colleagues at MIT. It is used to explore your data in PostgreSQL, BigQuery, MySQL and other databases by means of SQL queries.

Wouldn’t it be cool having a SQL notebook not only to explore, but also to visualise and style your geospatial analysis against PostGIS using CARTO?

It is, and celebrating the PostGIS day, as part of our leapfrog Fridays we are adding support for CARTO in Franchise.

How it works

It’s dead simple.

  1. Connect to CARTO with your user credentials. It works both with personal or enterprise accounts.
  2. Choose one of your CARTO datasets and write your analysis in the SQL console.
  3. Open the CARTO View, style and visualise

You can of course nest queries, export and share your SQL notebooks.

How it’s done

There are a couple of cool things to remark about this integration of CARTO in Franchise.

First of all this is an example on the power of CARTO Engine. For this specific case we are using our SQL and Maps APIs to leverage the power of CARTO via a SQL notebook.

That means there’s a fully functional PostGIS SQL console and CartoCSS panel embedded, so you can take the most not only of PostGIS functions, but also of our Data Services API or Data Observatory

And second, Franchise is a React application, and you know what that means. We have taken the opportunity to integrate CARTO.js as a React component.

About this, there’s still some work to do to have a general purpose CARTO.js React component, but serve this as an example on how to integrate CARTO.js in your own React applications.

Stay tunned for more news about this in the following weeks ;)

Where to start

Again, dead simple, if you have a CARTO account just use your credentials, otherwise you can sign up for an account here

Then, just run locally an instance of Franchise with this Docker image or if you prefer use our cloud instance.

And that’s it, happy PostGIS day!

If you liked this post you might be interested in joining us.

Kudos to Guillermo Webster for bringing Franchise to life.

About the author
Alberto Romeu

With a background in computer science and data analytics, Alberto has been developing geospatial applications since 2007. At CARTO he helps companies all over the world to solve their geospatial problems.
After more than 10 years as a developer he still considers himself as an apprentice who loves sharing experiences and continue improving.

More posts from Alberto Romeu

Related Posts

Ready to optimize your territories with Location Intelligence?

Close circle icon

Contact us

Please fill out the below form and we'll be in touch real soon.