Unlocking Geospatial Analytics Use Cases with CARTO and Databricks
The document discusses how Carto and Databricks enhance spatial analysis by enabling data scientists to perform analytics on large datasets through direct SQL connections and interactive visualizations. It outlines various use cases across industries such as logistics, telecommunications, finance, consumer goods, and healthcare, emphasizing the importance of spatial analysis in optimizing operations and driving decision-making. Additionally, it highlights the functionalities of the CartoFrames library for data visualization and geospatial analysis within Databricks notebooks.
CARTO — Unlockthe power of spatial analysis
● Business Analysts
● Product Managers
● Data Scientists
● Decision Makers
Why does spatial analysis matter?
New End Users New Analysis
● Human Mobility
● Transactions
● IoT Hardware
● Connected Devices
● Census or Open Data
● CRM or Loyalty Data
New Data Streams
● Optimization
● Spatial Prediction
● Visual Inference
● Spatial Data Science
4.
CARTO — Unlockthe power of spatial analysis
CARTO + Databricks
Spatial Analytics at Scale
Increased Collaboration and
Access to Data
Interactive Exploration of
your Spatial Data
Data Science teams often have
to perform spatial analytics
over very large datasets
With CARTO’s spatial analysis
functionality and the
Databricks unified analytics
platform, data scientists can
run spatial analysis on very
large datasets
The CARTO Direct SQL
Connection feature allows you
to access your spatial data
from the Databricks platform
and combine it with your Delta
Lake
Data is stored in siloed
database systems, making it
challenging to enrich and
combine your datasets
When you are working with a
dataset with spatial
information, you need to have
a way to explore the data
interactively on a map
The use of CARTOframes
within Databricks notebooks
allows you to generate
insightful map visualizations
from your spatial data
Current
Challenge
Joint Value
Propositio
n
5.
CARTO — Unlockthe power of spatial analysis
Architecture
Transformation
Storage
Model/Job Processing
Direct SQL
Connection
CARTO Spatial
Database
Direct SQL
Connection
CARTO Spatial
Database
Visualization,
Enrichment,
Analysis
CARTOframes
6.
CARTO — Unlockthe power of spatial analysis
Direct SQL
Connection
Connect to CARTO database from
Databricks cluster and read/write
data using Spark DataFrames
CARTOframes
Python library to enrich, analyze and
visualize geospatial data within your
Databricks notebooks
7.
CARTO — Unlockthe power of spatial analysis
➔ Create a Spark DataFrame
from a CARTO dataset.
Need to allow access to the CARTO
database from the Databricks
cluster.
Direct SQL
Connectionremote_table =
spark.read.format("jdbc")
.option("url",
"jdbc:postgresql://<SERVER>:5432/carto
db")
.option("dbtable", "<TABLE>")
.option("user", "<USERNAME>")
.option("password", "<API_KEY>")
.option("ssl", True)
.option("sslmode", "require" )
.load()
8.
CARTO — Unlockthe power of spatial analysis
➔ Install CARTOframes as any
other Python library
➔ Set your CARTO credentials
➔ Read from a CARTO dataset
into a GeoPandas
GeoDataFrame
CARTOframesdbutils.library.installPyPI('cartofram
es', version='1.0.0')
set_default_credentials(
username=username,
api_key=api_key
)
target = read_carto('SELECT * FROM
target_stores', decode_geom=True)
9.
CARTO — Unlockthe power of spatial analysis
Direct SQL
Connection
Use it when:
● You need to perform data
engineering tasks not suitable
for relational databases
● Scalability is an issue
CARTOframes
Use it when:
● You want to visualize your
geospatial data
● You want to enrich your data
with premium datasets
● You want to perform spatial
analysis (i.e. isochrones)
10.
CARTO — Unlockthe power of spatial analysis
Generic Use Cases
Use Databricks for
collecting and
preparing your
datasets for
visualization and/or
spatial analysis with
CARTO
Data
Engineerin
g
Data
Visualizatio
n
Data
Analysis
Visualize in a CARTO
map within your
Databricks notebook
the data you are
working with
Take advantage of
CARTO features for
spatial data science
within your
Databricks
notebooks
11.
CARTO — Unlockthe power of spatial analysis
Logistics firms can reduce costs &
increase visibility by applying spatial
analysis to use cases such as:
● Route Optimization
● Pick Up & Drop Off Site Planning
● Fleet Management
● Territory Analysis
● Address Optimization
Logistics
Replace this image
12.
CARTO — Unlockthe power of spatial analysis
Telcos are leverage Location
Intelligence to find new revenues across
their business, focusing on use cases
such as:
● Data Monetization
● 4G / 5G deployment planning
● Smart Cities and IoT
● Churn Reduction
● Geomarketing
● Site Planning
Telcos
Replace this image
13.
CARTO — Unlockthe power of spatial analysis
Consumer & investment banks are
using spatial analysis for use cases such
as:
● Site Selection
● Branch Consolidation
● ATM Location Optimization
Credit card providers use spatial
analysis for a range of use cases
including:
● Data monetization
● Transaction analysis & geocoding
● Consumer profiling
Financial Services
Replace this image
14.
CARTO — Unlockthe power of spatial analysis
Consumer packaged goods companies
use Location Intelligence for:
● Distribution Management
● Supply Chain Network Design
● Geomarketing
● Territory Management
● Customer Behaviour Analytics
CPG / FMCG
Replace this image
15.
CARTO — Unlockthe power of spatial analysis
A patient’s location directly influences
their health. Considering spatial in
healthcare analytics can support use
cases such as:
● Healthcare Factor Analysis
● Site Planning (for clinics or
vaccination centres)
● Territory Management
● Supply Chain Network Design
Healthcare &
Pharma
Replace this image
16.
CARTO — Unlockthe power of spatial analysis
It’s time for a real world example!