SlideShare ist ein Scribd-Unternehmen logo
1 von 52
Downloaden Sie, um offline zu lesen
CARTO en 5 pasos:
del dato a la toma de decisiones
SIGUE A @CARTO EN TWITTER
Cuáles de las siguientes descripciones
describen mejor tu trabajo:
● Desarrollador de Aplicaciones (backend o frontend)
● Analista de Datos
● Educación / Investigación
● Comercial / Ingeniería de Ventas / Soporte
CARTO en 5 pasos
Facilitadores para hoy
Jaime Sánchez Arias Jorge Sanz
Customer Success Engineer Solutions Engineer & Support Manager
CARTO en 5 pasos
As an organization, we have defined 5
steps that, together, create a holistic
Location Intelligence approach.
Our goal is to empower organizations as
they traverse each of these 5 steps.
The Complete
Journey
CARTO en 5 pasos
The Complete
Journey
1. Data
2. Enrichment
3. Analysis
4. Solutions
5. Integration
The Journey - Data & Enrichment
Augment any data
with demographic
data from around
the globe with easeData
Observatory
Data Services
API
Routing &
Traffic
Geocoding
ETL
Develop robust ETL
processes and
update
mechanisms so
your data is always
enriched
Mastercard Human
Mobility
POI
The Journey - Analysis
Bring CARTO maps and data into
your data science workflows and
the Python data science
ecosystem to work with Pandas,
PySal,PyMC3, scikit-learn, etc.
CARTOFrames
Machine learning embedded in
CARTO as simple SQL calls for
clustering, outliers analysis, time
series predictions, and geospatial
weighted regression.
Crankshaft
Use the power of PostGIS and our APIs to
productionalize analysis workflows in your
CARTO platform.
PostGIS by
CARTO
SQL API Python
SDK
The Journey - Solutions
Builder Dashboard
CARTO.js Airship CARTO VL
Analysis tools for creating
lightweight spatial data science
dashboards and sharing insights
with your team
Develop and build custom spatial
data science applications with a full
suite of frontend libraries
The Journey - Integration
Using CARTO’s APIs and
SDKs, connect your
analysis into the places
that matter most for
you and your team
Let’s apply the journey to
a real world business
question!
How can we analyze and
understand real estate sales
in Los Angeles?
Pains
1. “Disconnected experiences to consume data - it is broken into
separate tools, teams DBs, excels.”
2. “Limited developer time in our team.”
3. “Current data science workflow doesn’t have a geo focus. and Spatial
modeling is cumbersome because I have to export results to XYZ
tool in order to visualize and test my model effectively.”
4. “Having trouble handling and visualizing big datasets.“
Outline the Process
1. Integrate spatial data of past home sales and property locations
in Los Angeles county
2. Enrich the data with a spatial context using a variety of relevant
resources (demographics, mastercard transactions, OSM)
3. Clean and analyze the data, and create a predictive model for
homes that have not sold
4. Present the results in a Location Intelligence solution for users
5. Integrate and deploy the model into current workflows for day
to day use
1. Data
Integrate LA Housing Data
The Los Angeles County Assessor's office provides two different datasets
which we can use for this analysis:
● All Property Parcels in Los Angeles County for Record Year 2018
● All Property Sales from 2017 to Present
2018 Parcel Data
2018 Parcel Data
Import this data into CARTO
using the Sync via Import API
or the COPY command via the
SQL API for efficient streaming
of long CSV data into CARTO.
Past Sales Data
Past Sales Data
Import this data into CARTO
using the built in ArcGIS
Connector, and Sync the
results to keep them up to data
as they are added.
CREATE TABLE la_join AS
SELECT s.*,
p.zipcode as zipcode_p,
p.taxratearea_city,
p.ain as ain_p,
p.rollyear,
p.taxratearea,
p.assessorid,
p.propertylocation,
p.propertytype,
p.propertyusecode,
p.generalusetype,
p.specificusetype,
p.specificusedetail1,
p.specificusedetail2,
p.totbuildingdatalines,
p.yearbuilt as yearbuilt_p,
p.effectiveyearbuilt,
p.sqftmain,
p.bedrooms as bedrooms_p,
p.bathrooms as bathrooms_p,
p.units,
p.recordingdate,
p.landvalue,
p.landbaseyear,
p.improvementvalue,
p.impbaseyear,
p.the_geom as centroid
FROM sales_parcels s
LEFT JOIN assessor_parcels_data_2018 p ON s.ain::numeric = p.ain
Clean and join the data on unique
identifier using a SQL statement in Builder
or via SQL API.
2. Enrichment
Integrate LA Housing Data
Next we want to add spatial context to our housing data to
understand more about the areas around:
● Demographics
● Mastercard (Scores and Merchants) (Nearest 5 Areas)
● Nearby Grocery Stores and Restaurants
● Proximity to Roads
Demographics
Add total population and median income from the US Census via the
Data Observatory in CARTOframes.
query_obs = '''
CREATE TABLE obs_la_half_mile AS
SELECT *,
OBS_GetMeasure(the_geom, 'us.census.acs.B01003001','predenominated','us.census.tiger.census_tract', '2011 -
2015') as total_pop_2011_2015,
OBS_GetMeasure(the_geom, 'us.census.acs.B19013001','predenominated','us.census.tiger.census_tract', '2011 -
2015') as median_income_2011_2015
FROM la_half_mile
'''
# Apply JOB query
batch_job_obs= batchSQLClient.create(query_obs)
# Check status of the Batch Job
status_obs = check_status(batch_job_obs)
# cartodbfy table when table is created
if status_obs == 'done':
cc.query("SELECT cdb_cartodbfytable('obs_la_half_mile')")
Mastercard
Find the merchants and sales/growth scores in the five nearest block
groups to the home via Mastercard Retail Location Insights data
and SQL API
(
SELECT AVG(sales_metro_score)
FROM (
SELECT sales_metro_score
FROM mc_blocks
ORDER BY la_eval_clean.the_geom <-> mc_blocks.the_geom
LIMIT 5
) a
) as sale_metro_score_knn,
(
SELECT AVG(growth_metro_score)
FROM (
SELECT growth_metro_score
FROM mc_blocks
ORDER BY la_eval_clean.the_geom <-> mc_blocks.the_geom
LIMIT 5
) a
) as growth_metro_score_knn
Grocery Stores/Restaurants
Find the number of grocery stores and restaurants using
OpenStreetMap Data and the SQL API.
(
SELECT count(restaurants_la.*)
FROM restaurants_la
WHERE ST_DWithin(
ST_Centroid(la_eval_clean.the_geom_webmercator),
restaurants_la.the_geom_webmercator,
1609 / cos(radians(ST_y(ST_Centroid(la_eval_clean.the_geom)))))
) as restaurants,
(
SELECT count(grocery_la.*)
FROM grocery_la
WHERE ST_DWithin(
ST_Centroid(la_eval_clean.the_geom_webmercator),
grocery_la.the_geom_webmercator,
1609 / cos(radians(ST_y(ST_Centroid(la_eval_clean.the_geom)))))
) as grocery_stores
Roads
See if a home is within one mile of a major highway or trunk highway
using the SQL API and major roads from OpenStreetMap.
(
SELECT CASE WHEN COUNT(la_roads.*) > 0 THEN 1 ELSE 0 END
FROM la_roads
WHERE ST_DWithin(
la_eval_clean.the_geom_webmercator,
la_roads.the_geom_webmercator,
1609 / cos(radians(ST_y(ST_Centroid(la_eval_clean.the_geom)))))
AND highway in ('motorway', 'trunk')
) as highways_in_1mile
3. Analysis
Analysis
The analysis for this project followed the following steps:
● Moran’s I Clusters & Outliers (Exploratory Data Analysis)
● Neighbor Homes Analysis (Spatial Feature Engineering)
● Predictive Modeling & Hyperparameter Tuning (using XGBoost)
Moran’s I
Using Moran’s I to evaluate spatial clusters and outliers via the PySAL
package, we can see these groupings and visualize them in
CARTOframes.
import esda
moran = esda.Moran_Local(sfr_ps.saleprice, W, transformation = "r")
lag = libpysal.weights.lag_spatial(W, sfr_ps.saleprice)
data = sfr_ps.saleprice
sig = 1 * (moran.p_sim < 0.05)
HH = 1 * (sig * moran.q==1)
LL = 3 * (sig * moran.q==3)
LH = 2 * (sig * moran.q==2)
HL = 4 * (sig * moran.q==4)
spots = HH + LL + LH + HL
spots
spot_labels = [ '0 Non-Significant', 'HH - Hot Spot', 'LH - Donut', 'LL - Cold Spot', 'HL -
Diamond']
labels = [spot_labels[i] for i in spots]
moran_to_carto = sfr_ps.assign(cl=labels, p_sim = moran.p_sim, p_z_sim = moran.p_z_sim)
moran_to_carto.head(2)
CARTO en 5 pasos
Moran’s I
CARTO en 5 pasos
Neighbor Analysis
Evaluate the attributes of
neighbor properties using
k-nearest neighbor spatial
weights in PySAL to perform
spatial feature engineering.
CARTO en 5 pasos
W = libpysal.weights.KNN.from_dataframe(neighbors, k=10, ids='plot_id')
# Given a target, get the average value for a selected list of KPIs of its neighbors
def evalNeighbors(data, target, neighbors):
sample_target_neighbors = neighbors[target]
if len(sample_target_neighbors) == 0:
pass
else:
d = data[data['plot_id'].isin(sample_target_neighbors)].loc[:,['median_income_2011_2015',
'merchants_in_1m', 'total_pop_2011_2015', 'restaurants', 'grocery_stores', 'highways_in_1mile',
'sale_metro_score_knn', 'growth_metro_score_knn']].mean()
d['plot_id'] = target
return d
# Generate the full Dataframe with properties and neighbors data
def buildDataframe(targetlist, **args):
newdf = pd.DataFrame(columns = ['plot_id', 'median_income_2011_2015', 'merchants_in_1m',
'total_pop_2011_2015', 'restaurants', 'grocery_stores', 'highways_in_1mile', 'sale_metro_score_knn',
'growth_metro_score_knn'])
for i in targetlist:
try:
newdf = newdf.append(pd.DataFrame(evalNeighbors(neighbors, i, W.neighbors)).T)
except KeyError:
pass
return newdf
CARTO en 5 pasos
CARTO en 5 pasos
CARTO en 5 pasos
Predictive Modeling
Using XGBoost we can use this data to create a regression model to
predict housing prices and push that data back to CARTO using
CARTOframes, never leaving the notebook environment.
CARTO en 5 pasos
CARTO en 5 pasos
Predictive Modeling
After hyperparameter tuning the model, we can reduce the Mean
Average Error down to $58,179.78.
CARTO en 5 pasos
Feature Importance
4. Solutions
CARTO en 5 pasos
Solutions
To present the data and predictive analysis, both on data from the
model that has a sales price and for homes that have not sold, we
can develop a location intelligence application to showcase these
results.
CARTO — Turn Location Data into Business Outcomes
Application Development
Using CARTO VL we can
quickly visualize our data
layers and add a user interface
with Airship, in less than 400
lines of code.
CARTO — Turn Location Data into Business Outcomes
Los-Angeles
Prediction
Explorer
5. Integration
CARTO — Turn Location Data into Business Outcomes
Application Development
Deploy the model via a Python
based API and sync to CARTO
data via the Python SDK to
perform on the fly predictions
for specific properties.
CARTO — Turn Location Data into Business Outcomes
Los Angeles
Property Sales
Prediction
App
CARTO en 5 pasos
Other Use Cases
Predicting revenue from different physical retail locations
Identify clusters and groups of specific patterns to optimize
activities such as sales outreach or site selection
Classify property types or buying patterns in a city
Review spatial feature importance for site performance, and
modify models using different spatial
¡Muchas gracias!
¿Preguntas?
Solicita una demo en CARTO.COM
Jaime Sánchez Arias
Customer Success Manager // jsanchez@carto.com
Jorge Sanz
Solutions Engineer & Support Manager // jsanz@carto.com

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Market analysis through Consumer Behavior Pattern Insights
Market analysis through Consumer Behavior Pattern InsightsMarket analysis through Consumer Behavior Pattern Insights
Market analysis through Consumer Behavior Pattern Insights
 
Location Intelligence for All: Enabling Individuals to Use Spatial Analysis [...
Location Intelligence for All: Enabling Individuals to Use Spatial Analysis [...Location Intelligence for All: Enabling Individuals to Use Spatial Analysis [...
Location Intelligence for All: Enabling Individuals to Use Spatial Analysis [...
 
Think Spatial: Don't Ignore Location in your Models! [CARTOframes]
Think Spatial: Don't Ignore Location in your Models! [CARTOframes]Think Spatial: Don't Ignore Location in your Models! [CARTOframes]
Think Spatial: Don't Ignore Location in your Models! [CARTOframes]
 
Using Geospatial to Innovate in Last-Mile Logistics
Using Geospatial to Innovate in Last-Mile LogisticsUsing Geospatial to Innovate in Last-Mile Logistics
Using Geospatial to Innovate in Last-Mile Logistics
 
Le rôle de l’intelligence géospatiale dans la reprise économique
Le rôle de l’intelligence géospatiale dans la reprise économiqueLe rôle de l’intelligence géospatiale dans la reprise économique
Le rôle de l’intelligence géospatiale dans la reprise économique
 
How to become a Spatial Data Scientist?
How to become a Spatial Data Scientist?How to become a Spatial Data Scientist?
How to become a Spatial Data Scientist?
 
Scaling Spatial Analytics with Google Cloud & CARTO
Scaling Spatial Analytics with Google Cloud & CARTOScaling Spatial Analytics with Google Cloud & CARTO
Scaling Spatial Analytics with Google Cloud & CARTO
 
Understanding Retail Catchment Areas with Human Mobility Data
Understanding Retail Catchment Areas with Human Mobility DataUnderstanding Retail Catchment Areas with Human Mobility Data
Understanding Retail Catchment Areas with Human Mobility Data
 
Google Analytics location data visualised with CARTO & BigQuery
Google Analytics location data visualised with CARTO & BigQueryGoogle Analytics location data visualised with CARTO & BigQuery
Google Analytics location data visualised with CARTO & BigQuery
 
The geography of geospatial
The geography of  geospatialThe geography of  geospatial
The geography of geospatial
 
Supercharging Site Planning in Retail & Real Estate [CARTO Reveal]
Supercharging Site Planning in Retail & Real Estate [CARTO Reveal]Supercharging Site Planning in Retail & Real Estate [CARTO Reveal]
Supercharging Site Planning in Retail & Real Estate [CARTO Reveal]
 
Applying Spatial Analysis to Real Estate Decision-Making
Applying Spatial Analysis to Real Estate Decision-MakingApplying Spatial Analysis to Real Estate Decision-Making
Applying Spatial Analysis to Real Estate Decision-Making
 
Can Kanye West Save Gap? Real-Time Consumer Social Media Segmentation On CARTO
Can Kanye West Save Gap? Real-Time Consumer Social Media Segmentation On CARTOCan Kanye West Save Gap? Real-Time Consumer Social Media Segmentation On CARTO
Can Kanye West Save Gap? Real-Time Consumer Social Media Segmentation On CARTO
 
How retail analytics help monitor big box stores performance
How retail analytics help monitor big box stores performanceHow retail analytics help monitor big box stores performance
How retail analytics help monitor big box stores performance
 
Embedding Location Intelligence in Web Apps that Enhance User Experience [Air...
Embedding Location Intelligence in Web Apps that Enhance User Experience [Air...Embedding Location Intelligence in Web Apps that Enhance User Experience [Air...
Embedding Location Intelligence in Web Apps that Enhance User Experience [Air...
 
Stepping up your Spatial Analysis with Mastercard Retail Location insights 3.0
Stepping up your Spatial Analysis with Mastercard Retail Location insights 3.0Stepping up your Spatial Analysis with Mastercard Retail Location insights 3.0
Stepping up your Spatial Analysis with Mastercard Retail Location insights 3.0
 
Using Location Data to Adapt to the New normal
Using Location Data to Adapt to the New normalUsing Location Data to Adapt to the New normal
Using Location Data to Adapt to the New normal
 
How to Use Geospatial Data to Identify CPG Demnd Hotspots
How to Use Geospatial Data to Identify CPG Demnd HotspotsHow to Use Geospatial Data to Identify CPG Demnd Hotspots
How to Use Geospatial Data to Identify CPG Demnd Hotspots
 
What Spatial Analytics Tells Us About the Future of the UK High Street
What Spatial Analytics Tells Us About the Future of the UK High StreetWhat Spatial Analytics Tells Us About the Future of the UK High Street
What Spatial Analytics Tells Us About the Future of the UK High Street
 
Why High-Resolution Spatial Data on Population Matters
 Why High-Resolution Spatial Data on Population Matters Why High-Resolution Spatial Data on Population Matters
Why High-Resolution Spatial Data on Population Matters
 

Ähnlich wie CARTO en 5 Pasos: del Dato a la Toma de Decisiones [CARTO]

Logistics Data Analyst Internship RRD
Logistics Data Analyst Internship RRDLogistics Data Analyst Internship RRD
Logistics Data Analyst Internship RRD
Katie Harvey
 

Ähnlich wie CARTO en 5 Pasos: del Dato a la Toma de Decisiones [CARTO] (20)

Data infrastructure for the other 90% of companies
Data infrastructure for the other 90% of companiesData infrastructure for the other 90% of companies
Data infrastructure for the other 90% of companies
 
Dwbi Project
Dwbi ProjectDwbi Project
Dwbi Project
 
Move Out of Excel and into a Pre-Lead Workspace by Dan Donin
Move Out of Excel and into a Pre-Lead Workspace by Dan DoninMove Out of Excel and into a Pre-Lead Workspace by Dan Donin
Move Out of Excel and into a Pre-Lead Workspace by Dan Donin
 
Logistics Data Analyst Internship RRD
Logistics Data Analyst Internship RRDLogistics Data Analyst Internship RRD
Logistics Data Analyst Internship RRD
 
Portfolio of gian mohammad arvin
Portfolio of gian mohammad arvinPortfolio of gian mohammad arvin
Portfolio of gian mohammad arvin
 
Deepak.Gangam (2)
Deepak.Gangam (2)Deepak.Gangam (2)
Deepak.Gangam (2)
 
AIRBNB DATA WAREHOUSE & GRAPH DATABASE
AIRBNB DATA WAREHOUSE & GRAPH DATABASEAIRBNB DATA WAREHOUSE & GRAPH DATABASE
AIRBNB DATA WAREHOUSE & GRAPH DATABASE
 
Digital analytics with R - Sydney Users of R Forum - May 2015
Digital analytics with R - Sydney Users of R Forum - May 2015Digital analytics with R - Sydney Users of R Forum - May 2015
Digital analytics with R - Sydney Users of R Forum - May 2015
 
Mml micro project Building a Basic statistic calculator using r programming ...
Mml micro project Building a Basic statistic calculator  using r programming ...Mml micro project Building a Basic statistic calculator  using r programming ...
Mml micro project Building a Basic statistic calculator using r programming ...
 
TabPy Presentation
TabPy PresentationTabPy Presentation
TabPy Presentation
 
Benefits of Using MongoDB Over RDBMSs
Benefits of Using MongoDB Over RDBMSsBenefits of Using MongoDB Over RDBMSs
Benefits of Using MongoDB Over RDBMSs
 
Data Warehousing with Python
Data Warehousing with PythonData Warehousing with Python
Data Warehousing with Python
 
Why R? A Brief Introduction to the Open Source Statistics Platform
Why R? A Brief Introduction to the Open Source Statistics PlatformWhy R? A Brief Introduction to the Open Source Statistics Platform
Why R? A Brief Introduction to the Open Source Statistics Platform
 
Benefits of Using MongoDB Over RDBMS (At An Evening with MongoDB Minneapolis ...
Benefits of Using MongoDB Over RDBMS (At An Evening with MongoDB Minneapolis ...Benefits of Using MongoDB Over RDBMS (At An Evening with MongoDB Minneapolis ...
Benefits of Using MongoDB Over RDBMS (At An Evening with MongoDB Minneapolis ...
 
Unlocking Geospatial Analytics Use Cases with CARTO and Databricks
Unlocking Geospatial Analytics Use Cases with CARTO and DatabricksUnlocking Geospatial Analytics Use Cases with CARTO and Databricks
Unlocking Geospatial Analytics Use Cases with CARTO and Databricks
 
GluskinValery_BI_v4
GluskinValery_BI_v4GluskinValery_BI_v4
GluskinValery_BI_v4
 
6015575
60155756015575
6015575
 
Cio summit 20170223_v20
Cio summit 20170223_v20Cio summit 20170223_v20
Cio summit 20170223_v20
 
Silicon valleycodecamp2013
Silicon valleycodecamp2013Silicon valleycodecamp2013
Silicon valleycodecamp2013
 
Microsoft Office Performance Point
Microsoft Office Performance PointMicrosoft Office Performance Point
Microsoft Office Performance Point
 

Mehr von CARTO

Mehr von CARTO (19)

4 Ways Telecoms are Using GIS & Location Intelligence.pdf
4 Ways Telecoms are Using GIS & Location Intelligence.pdf4 Ways Telecoms are Using GIS & Location Intelligence.pdf
4 Ways Telecoms are Using GIS & Location Intelligence.pdf
 
How to Analyze & Optimize Mobility with Geospatial Data (Snowflake).pdf
How to Analyze & Optimize Mobility with Geospatial Data (Snowflake).pdfHow to Analyze & Optimize Mobility with Geospatial Data (Snowflake).pdf
How to Analyze & Optimize Mobility with Geospatial Data (Snowflake).pdf
 
Understanding Residential Energy Usage with CARTO & Doorda.pdf
Understanding Residential Energy Usage with CARTO & Doorda.pdfUnderstanding Residential Energy Usage with CARTO & Doorda.pdf
Understanding Residential Energy Usage with CARTO & Doorda.pdf
 
How to Use Spatial Data to Create a Wildfire Risk Index.pdf
How to Use Spatial Data to Create a Wildfire Risk Index.pdfHow to Use Spatial Data to Create a Wildfire Risk Index.pdf
How to Use Spatial Data to Create a Wildfire Risk Index.pdf
 
CARTO for Retail: Driving Site Selection Decisions with Advanced Spatial Anal...
CARTO for Retail: Driving Site Selection Decisions with Advanced Spatial Anal...CARTO for Retail: Driving Site Selection Decisions with Advanced Spatial Anal...
CARTO for Retail: Driving Site Selection Decisions with Advanced Spatial Anal...
 
Winning Market Expansion Strategies for CPG brands, Using Spatial Data and An...
Winning Market Expansion Strategies for CPG brands, Using Spatial Data and An...Winning Market Expansion Strategies for CPG brands, Using Spatial Data and An...
Winning Market Expansion Strategies for CPG brands, Using Spatial Data and An...
 
Advancing Spatial Analysis in BigQuery using CARTO Analytics Toolbox
Advancing Spatial Analysis in BigQuery using CARTO Analytics ToolboxAdvancing Spatial Analysis in BigQuery using CARTO Analytics Toolbox
Advancing Spatial Analysis in BigQuery using CARTO Analytics Toolbox
 
Developing Spatial Applications with Google Maps and CARTO
Developing Spatial Applications with Google Maps and CARTODeveloping Spatial Applications with Google Maps and CARTO
Developing Spatial Applications with Google Maps and CARTO
 
Location Intelligence: The Secret Sauce for OOH Advertising
Location Intelligence: The Secret Sauce for OOH AdvertisingLocation Intelligence: The Secret Sauce for OOH Advertising
Location Intelligence: The Secret Sauce for OOH Advertising
 
Developing Spatial Applications with CARTO for React v1.1
Developing Spatial Applications with CARTO for React v1.1Developing Spatial Applications with CARTO for React v1.1
Developing Spatial Applications with CARTO for React v1.1
 
Sentiment, Popularity & Potentiality: 3 Unique KPIs to add to your Site Selec...
Sentiment, Popularity & Potentiality: 3 Unique KPIs to add to your Site Selec...Sentiment, Popularity & Potentiality: 3 Unique KPIs to add to your Site Selec...
Sentiment, Popularity & Potentiality: 3 Unique KPIs to add to your Site Selec...
 
Spatial Analytics in the Cloud Using Snowflake & CARTO
Spatial Analytics in the Cloud Using Snowflake & CARTOSpatial Analytics in the Cloud Using Snowflake & CARTO
Spatial Analytics in the Cloud Using Snowflake & CARTO
 
CARTO Cloud Native – An Introduction to the Spatial Extension for BigQuery
CARTO Cloud Native – An Introduction to the Spatial Extension for BigQueryCARTO Cloud Native – An Introduction to the Spatial Extension for BigQuery
CARTO Cloud Native – An Introduction to the Spatial Extension for BigQuery
 
Using Spatial Analysis to Drive Post-Pandemic Site Selection in Retail
Using Spatial Analysis to Drive Post-Pandemic Site Selection in RetailUsing Spatial Analysis to Drive Post-Pandemic Site Selection in Retail
Using Spatial Analysis to Drive Post-Pandemic Site Selection in Retail
 
6 Ways CPG Brands are Using Location Data to Prepare for the "Post-Pandemic"
6 Ways CPG Brands are Using Location Data to Prepare for the "Post-Pandemic"6 Ways CPG Brands are Using Location Data to Prepare for the "Post-Pandemic"
6 Ways CPG Brands are Using Location Data to Prepare for the "Post-Pandemic"
 
Using Places (POI) Data for QSR Site Selection
Using Places (POI) Data for QSR Site SelectionUsing Places (POI) Data for QSR Site Selection
Using Places (POI) Data for QSR Site Selection
 
5 Ways to Strategize for Emerging Short-Term Rental Trends
5 Ways to Strategize for Emerging Short-Term Rental Trends5 Ways to Strategize for Emerging Short-Term Rental Trends
5 Ways to Strategize for Emerging Short-Term Rental Trends
 
7 Reasons Why CPG Marketers Are Turning To Location Analytics
7 Reasons Why CPG Marketers Are Turning To Location Analytics7 Reasons Why CPG Marketers Are Turning To Location Analytics
7 Reasons Why CPG Marketers Are Turning To Location Analytics
 
Analyzing the Rise of the Staycation during COVID-19
Analyzing the Rise of the Staycation during COVID-19Analyzing the Rise of the Staycation during COVID-19
Analyzing the Rise of the Staycation during COVID-19
 

Kürzlich hochgeladen

Call Girls In Shivaji Nagar ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Shivaji Nagar ☎ 7737669865 🥵 Book Your One night StandCall Girls In Shivaji Nagar ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Shivaji Nagar ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
amitlee9823
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
amitlee9823
 
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
karishmasinghjnh
 
Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...
Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...
Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...
gajnagarg
 
➥🔝 7737669865 🔝▻ Ongole Call-girls in Women Seeking Men 🔝Ongole🔝 Escorts S...
➥🔝 7737669865 🔝▻ Ongole Call-girls in Women Seeking Men  🔝Ongole🔝   Escorts S...➥🔝 7737669865 🔝▻ Ongole Call-girls in Women Seeking Men  🔝Ongole🔝   Escorts S...
➥🔝 7737669865 🔝▻ Ongole Call-girls in Women Seeking Men 🔝Ongole🔝 Escorts S...
amitlee9823
 
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...
amitlee9823
 
Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...
Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...
Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...
gajnagarg
 
➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men 🔝Dindigul🔝 Escor...
➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men  🔝Dindigul🔝   Escor...➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men  🔝Dindigul🔝   Escor...
➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men 🔝Dindigul🔝 Escor...
amitlee9823
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
amitlee9823
 
Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...
gajnagarg
 
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night StandCall Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
amitlee9823
 

Kürzlich hochgeladen (20)

Call Girls In Shivaji Nagar ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Shivaji Nagar ☎ 7737669865 🥵 Book Your One night StandCall Girls In Shivaji Nagar ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Shivaji Nagar ☎ 7737669865 🥵 Book Your One night Stand
 
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
SAC 25 Final National, Regional & Local Angel Group Investing Insights 2024 0...
 
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bellandur ☎ 7737669865 🥵 Book Your One night Stand
 
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service BangaloreCall Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
Call Girls Begur Just Call 👗 7737669865 👗 Top Class Call Girl Service Bangalore
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
 
Detecting Credit Card Fraud: A Machine Learning Approach
Detecting Credit Card Fraud: A Machine Learning ApproachDetecting Credit Card Fraud: A Machine Learning Approach
Detecting Credit Card Fraud: A Machine Learning Approach
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
 
Anomaly detection and data imputation within time series
Anomaly detection and data imputation within time seriesAnomaly detection and data imputation within time series
Anomaly detection and data imputation within time series
 
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
👉 Amritsar Call Girl 👉📞 6367187148 👉📞 Just📲 Call Ruhi Call Girl Phone No Amri...
 
Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...
Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...
Just Call Vip call girls Mysore Escorts ☎️9352988975 Two shot with one girl (...
 
➥🔝 7737669865 🔝▻ Ongole Call-girls in Women Seeking Men 🔝Ongole🔝 Escorts S...
➥🔝 7737669865 🔝▻ Ongole Call-girls in Women Seeking Men  🔝Ongole🔝   Escorts S...➥🔝 7737669865 🔝▻ Ongole Call-girls in Women Seeking Men  🔝Ongole🔝   Escorts S...
➥🔝 7737669865 🔝▻ Ongole Call-girls in Women Seeking Men 🔝Ongole🔝 Escorts S...
 
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men  🔝Mathura🔝   Escorts...
➥🔝 7737669865 🔝▻ Mathura Call-girls in Women Seeking Men 🔝Mathura🔝 Escorts...
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
 
Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...
Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...
Just Call Vip call girls Erode Escorts ☎️9352988975 Two shot with one girl (E...
 
➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men 🔝Dindigul🔝 Escor...
➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men  🔝Dindigul🔝   Escor...➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men  🔝Dindigul🔝   Escor...
➥🔝 7737669865 🔝▻ Dindigul Call-girls in Women Seeking Men 🔝Dindigul🔝 Escor...
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
 
Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...
Just Call Vip call girls roorkee Escorts ☎️9352988975 Two shot with one girl ...
 
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night StandCall Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
 
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
Thane Call Girls 7091864438 Call Girls in Thane Escort service book now -
 

CARTO en 5 Pasos: del Dato a la Toma de Decisiones [CARTO]

  • 1. CARTO en 5 pasos: del dato a la toma de decisiones SIGUE A @CARTO EN TWITTER
  • 2. Cuáles de las siguientes descripciones describen mejor tu trabajo: ● Desarrollador de Aplicaciones (backend o frontend) ● Analista de Datos ● Educación / Investigación ● Comercial / Ingeniería de Ventas / Soporte
  • 3. CARTO en 5 pasos Facilitadores para hoy Jaime Sánchez Arias Jorge Sanz Customer Success Engineer Solutions Engineer & Support Manager
  • 4. CARTO en 5 pasos As an organization, we have defined 5 steps that, together, create a holistic Location Intelligence approach. Our goal is to empower organizations as they traverse each of these 5 steps. The Complete Journey
  • 5. CARTO en 5 pasos The Complete Journey 1. Data 2. Enrichment 3. Analysis 4. Solutions 5. Integration
  • 6. The Journey - Data & Enrichment Augment any data with demographic data from around the globe with easeData Observatory Data Services API Routing & Traffic Geocoding ETL Develop robust ETL processes and update mechanisms so your data is always enriched Mastercard Human Mobility POI
  • 7. The Journey - Analysis Bring CARTO maps and data into your data science workflows and the Python data science ecosystem to work with Pandas, PySal,PyMC3, scikit-learn, etc. CARTOFrames Machine learning embedded in CARTO as simple SQL calls for clustering, outliers analysis, time series predictions, and geospatial weighted regression. Crankshaft Use the power of PostGIS and our APIs to productionalize analysis workflows in your CARTO platform. PostGIS by CARTO SQL API Python SDK
  • 8. The Journey - Solutions Builder Dashboard CARTO.js Airship CARTO VL Analysis tools for creating lightweight spatial data science dashboards and sharing insights with your team Develop and build custom spatial data science applications with a full suite of frontend libraries
  • 9. The Journey - Integration Using CARTO’s APIs and SDKs, connect your analysis into the places that matter most for you and your team
  • 10. Let’s apply the journey to a real world business question!
  • 11. How can we analyze and understand real estate sales in Los Angeles?
  • 12. Pains 1. “Disconnected experiences to consume data - it is broken into separate tools, teams DBs, excels.” 2. “Limited developer time in our team.” 3. “Current data science workflow doesn’t have a geo focus. and Spatial modeling is cumbersome because I have to export results to XYZ tool in order to visualize and test my model effectively.” 4. “Having trouble handling and visualizing big datasets.“
  • 13. Outline the Process 1. Integrate spatial data of past home sales and property locations in Los Angeles county 2. Enrich the data with a spatial context using a variety of relevant resources (demographics, mastercard transactions, OSM) 3. Clean and analyze the data, and create a predictive model for homes that have not sold 4. Present the results in a Location Intelligence solution for users 5. Integrate and deploy the model into current workflows for day to day use
  • 15. Integrate LA Housing Data The Los Angeles County Assessor's office provides two different datasets which we can use for this analysis: ● All Property Parcels in Los Angeles County for Record Year 2018 ● All Property Sales from 2017 to Present
  • 17. 2018 Parcel Data Import this data into CARTO using the Sync via Import API or the COPY command via the SQL API for efficient streaming of long CSV data into CARTO.
  • 19. Past Sales Data Import this data into CARTO using the built in ArcGIS Connector, and Sync the results to keep them up to data as they are added.
  • 20. CREATE TABLE la_join AS SELECT s.*, p.zipcode as zipcode_p, p.taxratearea_city, p.ain as ain_p, p.rollyear, p.taxratearea, p.assessorid, p.propertylocation, p.propertytype, p.propertyusecode, p.generalusetype, p.specificusetype, p.specificusedetail1, p.specificusedetail2, p.totbuildingdatalines, p.yearbuilt as yearbuilt_p, p.effectiveyearbuilt, p.sqftmain, p.bedrooms as bedrooms_p, p.bathrooms as bathrooms_p, p.units, p.recordingdate, p.landvalue, p.landbaseyear, p.improvementvalue, p.impbaseyear, p.the_geom as centroid FROM sales_parcels s LEFT JOIN assessor_parcels_data_2018 p ON s.ain::numeric = p.ain Clean and join the data on unique identifier using a SQL statement in Builder or via SQL API.
  • 22. Integrate LA Housing Data Next we want to add spatial context to our housing data to understand more about the areas around: ● Demographics ● Mastercard (Scores and Merchants) (Nearest 5 Areas) ● Nearby Grocery Stores and Restaurants ● Proximity to Roads
  • 23. Demographics Add total population and median income from the US Census via the Data Observatory in CARTOframes.
  • 24. query_obs = ''' CREATE TABLE obs_la_half_mile AS SELECT *, OBS_GetMeasure(the_geom, 'us.census.acs.B01003001','predenominated','us.census.tiger.census_tract', '2011 - 2015') as total_pop_2011_2015, OBS_GetMeasure(the_geom, 'us.census.acs.B19013001','predenominated','us.census.tiger.census_tract', '2011 - 2015') as median_income_2011_2015 FROM la_half_mile ''' # Apply JOB query batch_job_obs= batchSQLClient.create(query_obs) # Check status of the Batch Job status_obs = check_status(batch_job_obs) # cartodbfy table when table is created if status_obs == 'done': cc.query("SELECT cdb_cartodbfytable('obs_la_half_mile')")
  • 25. Mastercard Find the merchants and sales/growth scores in the five nearest block groups to the home via Mastercard Retail Location Insights data and SQL API
  • 26. ( SELECT AVG(sales_metro_score) FROM ( SELECT sales_metro_score FROM mc_blocks ORDER BY la_eval_clean.the_geom <-> mc_blocks.the_geom LIMIT 5 ) a ) as sale_metro_score_knn, ( SELECT AVG(growth_metro_score) FROM ( SELECT growth_metro_score FROM mc_blocks ORDER BY la_eval_clean.the_geom <-> mc_blocks.the_geom LIMIT 5 ) a ) as growth_metro_score_knn
  • 27. Grocery Stores/Restaurants Find the number of grocery stores and restaurants using OpenStreetMap Data and the SQL API.
  • 28. ( SELECT count(restaurants_la.*) FROM restaurants_la WHERE ST_DWithin( ST_Centroid(la_eval_clean.the_geom_webmercator), restaurants_la.the_geom_webmercator, 1609 / cos(radians(ST_y(ST_Centroid(la_eval_clean.the_geom))))) ) as restaurants, ( SELECT count(grocery_la.*) FROM grocery_la WHERE ST_DWithin( ST_Centroid(la_eval_clean.the_geom_webmercator), grocery_la.the_geom_webmercator, 1609 / cos(radians(ST_y(ST_Centroid(la_eval_clean.the_geom))))) ) as grocery_stores
  • 29. Roads See if a home is within one mile of a major highway or trunk highway using the SQL API and major roads from OpenStreetMap.
  • 30. ( SELECT CASE WHEN COUNT(la_roads.*) > 0 THEN 1 ELSE 0 END FROM la_roads WHERE ST_DWithin( la_eval_clean.the_geom_webmercator, la_roads.the_geom_webmercator, 1609 / cos(radians(ST_y(ST_Centroid(la_eval_clean.the_geom))))) AND highway in ('motorway', 'trunk') ) as highways_in_1mile
  • 32. Analysis The analysis for this project followed the following steps: ● Moran’s I Clusters & Outliers (Exploratory Data Analysis) ● Neighbor Homes Analysis (Spatial Feature Engineering) ● Predictive Modeling & Hyperparameter Tuning (using XGBoost)
  • 33. Moran’s I Using Moran’s I to evaluate spatial clusters and outliers via the PySAL package, we can see these groupings and visualize them in CARTOframes.
  • 34. import esda moran = esda.Moran_Local(sfr_ps.saleprice, W, transformation = "r") lag = libpysal.weights.lag_spatial(W, sfr_ps.saleprice) data = sfr_ps.saleprice sig = 1 * (moran.p_sim < 0.05) HH = 1 * (sig * moran.q==1) LL = 3 * (sig * moran.q==3) LH = 2 * (sig * moran.q==2) HL = 4 * (sig * moran.q==4) spots = HH + LL + LH + HL spots spot_labels = [ '0 Non-Significant', 'HH - Hot Spot', 'LH - Donut', 'LL - Cold Spot', 'HL - Diamond'] labels = [spot_labels[i] for i in spots] moran_to_carto = sfr_ps.assign(cl=labels, p_sim = moran.p_sim, p_z_sim = moran.p_z_sim) moran_to_carto.head(2)
  • 35. CARTO en 5 pasos Moran’s I
  • 36. CARTO en 5 pasos Neighbor Analysis Evaluate the attributes of neighbor properties using k-nearest neighbor spatial weights in PySAL to perform spatial feature engineering.
  • 37. CARTO en 5 pasos W = libpysal.weights.KNN.from_dataframe(neighbors, k=10, ids='plot_id') # Given a target, get the average value for a selected list of KPIs of its neighbors def evalNeighbors(data, target, neighbors): sample_target_neighbors = neighbors[target] if len(sample_target_neighbors) == 0: pass else: d = data[data['plot_id'].isin(sample_target_neighbors)].loc[:,['median_income_2011_2015', 'merchants_in_1m', 'total_pop_2011_2015', 'restaurants', 'grocery_stores', 'highways_in_1mile', 'sale_metro_score_knn', 'growth_metro_score_knn']].mean() d['plot_id'] = target return d # Generate the full Dataframe with properties and neighbors data def buildDataframe(targetlist, **args): newdf = pd.DataFrame(columns = ['plot_id', 'median_income_2011_2015', 'merchants_in_1m', 'total_pop_2011_2015', 'restaurants', 'grocery_stores', 'highways_in_1mile', 'sale_metro_score_knn', 'growth_metro_score_knn']) for i in targetlist: try: newdf = newdf.append(pd.DataFrame(evalNeighbors(neighbors, i, W.neighbors)).T) except KeyError: pass return newdf
  • 38. CARTO en 5 pasos
  • 39. CARTO en 5 pasos
  • 40. CARTO en 5 pasos Predictive Modeling Using XGBoost we can use this data to create a regression model to predict housing prices and push that data back to CARTO using CARTOframes, never leaving the notebook environment.
  • 41. CARTO en 5 pasos
  • 42. CARTO en 5 pasos Predictive Modeling After hyperparameter tuning the model, we can reduce the Mean Average Error down to $58,179.78.
  • 43. CARTO en 5 pasos Feature Importance
  • 45. CARTO en 5 pasos Solutions To present the data and predictive analysis, both on data from the model that has a sales price and for homes that have not sold, we can develop a location intelligence application to showcase these results.
  • 46. CARTO — Turn Location Data into Business Outcomes Application Development Using CARTO VL we can quickly visualize our data layers and add a user interface with Airship, in less than 400 lines of code.
  • 47. CARTO — Turn Location Data into Business Outcomes Los-Angeles Prediction Explorer
  • 49. CARTO — Turn Location Data into Business Outcomes Application Development Deploy the model via a Python based API and sync to CARTO data via the Python SDK to perform on the fly predictions for specific properties.
  • 50. CARTO — Turn Location Data into Business Outcomes Los Angeles Property Sales Prediction App
  • 51. CARTO en 5 pasos Other Use Cases Predicting revenue from different physical retail locations Identify clusters and groups of specific patterns to optimize activities such as sales outreach or site selection Classify property types or buying patterns in a city Review spatial feature importance for site performance, and modify models using different spatial
  • 52. ¡Muchas gracias! ¿Preguntas? Solicita una demo en CARTO.COM Jaime Sánchez Arias Customer Success Manager // jsanchez@carto.com Jorge Sanz Solutions Engineer & Support Manager // jsanz@carto.com