SlideShare a Scribd company logo
THE PYTHON CHEAT SHEET FOR
THE BUSY MARKETER
H A M L E T B A T I S T A
#INBOUND2020
Google Colaboratory
feature walkthrough
GOOGLE COLAB
Preparing your Python
notebook environment
SETUP
Publish your analysis to
Google Sheets directly
from Python
EXPORTING TO SHEETS
Convert your data
analysis into simpler to
understand formats
DATA TRANSFORMATION
Process API output to
extract insights
JSON PARSING
Run automated analysis
using Google
Lighthouse
API CALLING
AGENDA
T H E P Y T H O N C H E A T S H E E T F O R T H E
B U S Y M A R K E T E R
@hamletbatista
Fetch content from the
web
WEB SCRAPING
Basic data types,
Containers, Functions,
Classes
PYTHON BASICS
INTRODUCTION
P Y T H O N S O U R C E D D A T A S T U D I E S
Published April 7, 2020
PAGE SPEED SCORES OF EVERY
SHOPIFY THEME
Published June 23, 2020
ACCESSING ‘CORE WEB VITALS’ OF
EVERY SHOPIFY THEME
Our work in this presentation
AN SEO ASSESSMENT OF EVERY
SHOPIFY THEME
#INBOUND2020
https://bit.ly/31JXHJ1https://bit.ly/38tEixp https://bit.ly/31JXHJ1
@hamletbatista
We will run Google
Lighthouse SEO analysis
feature under mobile
emulation
GOOGLE LIGHTHOUSE
We will scrape the demo
sites of every theme
SHOPIFY THEME STORE
We will use a handy cheat
sheet spread over multiple
Python notebooks
CHEAT SHEET
PYTHON SOURCED
DATA STUDY
A M O B I L E S E O A S S E S S M E N T O F E V E R Y S H O P I F Y T H E M E
#INBOUND2020 @hamletbatista
POWERED BY GOOGLE
LIGHTHOUSE
A M O B I L E S E O A S S E S S M E N T O F E V E R Y S H O P I F Y T H E M E
#INBOUND2020 @hamletbatista
We will run Google
Lighthouse SEO analysis
feature under mobile
emulation
GOOGLE LIGHTHOUSE
We will scrape the demo
sites of every theme
SHOPIFY THEME STORE
We will use a handy cheat
sheet spread over multiple
Python notebooks
CHEAT SHEET
SETUP
1
Create a new Python notebook directly from
Google Drive
#INBOUND2020
U S I N G G O O G L E C O L A B O R A T O R Y
Getting Started:
• Overview of Colaboratory Features
@hamletbatista
GOOGLE COLAB
FEATURES
T U R N N O T E B O O K S I N T O P R O G R A M S
2
Google Colab’s includes many useful
features that simplify data acquisition,
preparation and analysis.
#INBOUND2020
Most common form fields:
input1 = “value” #@param {type:”string”}
input2 = 10 #@param {type:”integer”}
input3 = “2020-09-22” #@param {type:”date”}
@hamletbatista
PYTHON
BASICS
3
Google Colab requires Python code. Let’s
let’s review some of the basic constructs.
#INBOUND2020
T H E L A N G U A G E O F D A T A S C I E N C E
@hamletbatista
Python learning resources:
• An Introduction to Python for Technical SEO
• An Introduction to Python for SEO Pros Using Spreadsheets
• How to Use Python to Analyze SEO Data: A Reference Guide
4
#INBOUND2020 @hamletbatista
WEB
SCRAPING
In our example, we will scrape the Shopify
Theme’s Store for theme names and demo
site URLs
F E T C H C O N T E N T F R O M T H E W E B
Example Scrapy spider changes:
• start_urls
• “Next page” CSS selector
• Elements to extract (theme name and link)
Learn more:
• Scrapy.org
API CALLING
5
In our example, we will call the Page Speed
Insights API to get SEO assessment metrics
and recommendations
#INBOUND2020
R U N A U T O M A T E D A N A L Y S I S
Most common request call:
r = requests.get(api_url, headers={'Accept': 'application/json'})
if r.status_code == 200:
return r.json()
Learn more:
• Requests: HTTP for Humans
@hamletbatista
JSON PARSING
P R O C E S S I N G A P I R E S P O N S E S
6
Complex JSON API responses can be a
pain to process. We will use JSONPath to
drastically simplify this.
#INBOUND2020
Most common JSONPath recipe:
json_path = “$.lighthouseResult.categories.seo.score”
jsonpath_tree = parse(json_path)
value = [match.value for match in jsonpath_tree.find(data)]
Learn more:
JSON JSONPath Tutorial
@hamletbatista
DATA
TRANSFORMATION
7
In our example, we will use Python pandas
to reorganize our study in a way that is easy
to interpret
#INBOUND2020
D A T A I S R A R E L Y I N T H E B E S T F O R M A T
Converting a list of dictionaries to Pandas Data Frame:
import pandas as pd
new_format = [{“column1_name”: “value”},{“column2_name”: “value”} ]
df = pd.DataFrame(new_format)
Learn more:
• 10 minutes to pandas
@hamletbatista
EXPORTING TO
SHEETS
G O O G L E S H E E T S I S S I M P L E R
8
Once we produce our data in Python we
can transfer it directly to Google Sheets
for further analysis and reporting
#INBOUND2020
Transferring a Pandas Data Frame to a Google Sheet :
spread = Spread("INBOUND2020", creds=creds)
spread.df_to_sheet(df, index=False, sheet="Themes SEO audits",
start='A1', replace=True)
Learn more:
• Examples of gspread Usage
• Introduction to gspread_pandas (video)
@hamletbatista
LOCATION
33 Wood Ave South
Suite 600
Iselin, NJ 08830
USA
PHONE
CONTACT US
+1 866.882.2983
https://www.ranksense.com
#INBOUND2020
ABOUT
RANKSENSE
A U T O M A T E A N D R U N S E O E X P E R I M E N T S
F R O M G O O G L E S H E E T S
@RankSense

More Related Content

What's hot

Semantic Search Engine: Semantic Search and Query Parsing with Phrases and En...
Semantic Search Engine: Semantic Search and Query Parsing with Phrases and En...Semantic Search Engine: Semantic Search and Query Parsing with Phrases and En...
Semantic Search Engine: Semantic Search and Query Parsing with Phrases and En...
Koray Tugberk GUBUR
 
AI-powered Semantic SEO by Koray GUBUR
AI-powered Semantic SEO by Koray GUBURAI-powered Semantic SEO by Koray GUBUR
AI-powered Semantic SEO by Koray GUBUR
Anton Shulke
 
Passage indexing is likely more important than you think
Passage indexing is likely more important than you thinkPassage indexing is likely more important than you think
Passage indexing is likely more important than you think
Dawn Anderson MSc DigM
 
Keyword Research and Topic Modeling in a Semantic Web
Keyword Research and Topic Modeling in a Semantic WebKeyword Research and Topic Modeling in a Semantic Web
Keyword Research and Topic Modeling in a Semantic Web
Bill Slawski
 
Entity seo
Entity seoEntity seo
Entity seo
Dixon Jones
 
7 E-Commerce SEO Mistakes & How to Fix Them #DeepSEOCon
7 E-Commerce SEO Mistakes & How to Fix Them #DeepSEOCon7 E-Commerce SEO Mistakes & How to Fix Them #DeepSEOCon
7 E-Commerce SEO Mistakes & How to Fix Them #DeepSEOCon
Aleyda Solís
 
Antifragility in Digital Marketing
Antifragility in Digital MarketingAntifragility in Digital Marketing
Antifragility in Digital Marketing
Elias Dabbas
 
Lexical Semantics, Semantic Similarity and Relevance for SEO
Lexical Semantics, Semantic Similarity and Relevance for SEOLexical Semantics, Semantic Similarity and Relevance for SEO
Lexical Semantics, Semantic Similarity and Relevance for SEO
Koray Tugberk GUBUR
 
MozCon 2022: Why Real Expertise is the Most Important Ranking Factor of Them ...
MozCon 2022: Why Real Expertise is the Most Important Ranking Factor of Them ...MozCon 2022: Why Real Expertise is the Most Important Ranking Factor of Them ...
MozCon 2022: Why Real Expertise is the Most Important Ranking Factor of Them ...
Lily Ray
 
Opinion-based Article Ranking for Information Retrieval Systems: Factoids and...
Opinion-based Article Ranking for Information Retrieval Systems: Factoids and...Opinion-based Article Ranking for Information Retrieval Systems: Factoids and...
Opinion-based Article Ranking for Information Retrieval Systems: Factoids and...
Koray Tugberk GUBUR
 
SEOWars: Rstudio aplicado a SEO #sob22
SEOWars: Rstudio aplicado a SEO #sob22SEOWars: Rstudio aplicado a SEO #sob22
SEOWars: Rstudio aplicado a SEO #sob22
MJ Cachón Yáñez
 
SEO Low hanging Fruit: Identifying SEO Opportunities to Achieve Results Fast ...
SEO Low hanging Fruit: Identifying SEO Opportunities to Achieve Results Fast ...SEO Low hanging Fruit: Identifying SEO Opportunities to Achieve Results Fast ...
SEO Low hanging Fruit: Identifying SEO Opportunities to Achieve Results Fast ...
Aleyda Solís
 
BrightonSEO - Master Crawl Budget Optimization for Enterprise Websites
BrightonSEO - Master Crawl Budget Optimization for Enterprise WebsitesBrightonSEO - Master Crawl Budget Optimization for Enterprise Websites
BrightonSEO - Master Crawl Budget Optimization for Enterprise Websites
Manick Bhan
 
Goodbye SEO fck ups! Learn to set an SEO Quality Assurance Framework
Goodbye SEO fck ups! Learn to set an SEO Quality Assurance FrameworkGoodbye SEO fck ups! Learn to set an SEO Quality Assurance Framework
Goodbye SEO fck ups! Learn to set an SEO Quality Assurance Framework
Aleyda Solís
 
Paige Hobart - How to do GOOD Keyword Research - Search Advertising Show 2021
Paige Hobart - How to do GOOD Keyword Research - Search Advertising Show 2021Paige Hobart - How to do GOOD Keyword Research - Search Advertising Show 2021
Paige Hobart - How to do GOOD Keyword Research - Search Advertising Show 2021
Paige Hobart
 
Semantic Content Networks - Ranking Websites on Google with Semantic SEO
Semantic Content Networks - Ranking Websites on Google with Semantic SEOSemantic Content Networks - Ranking Websites on Google with Semantic SEO
Semantic Content Networks - Ranking Websites on Google with Semantic SEO
Koray Tugberk GUBUR
 
SEO Case Study - Hangikredi.com From 12 March to 24 September Core Update
SEO Case Study - Hangikredi.com From 12 March to 24 September Core UpdateSEO Case Study - Hangikredi.com From 12 March to 24 September Core Update
SEO Case Study - Hangikredi.com From 12 March to 24 September Core Update
Koray Tugberk GUBUR
 
The Reason Behind Semantic SEO: Why does Google Avoid the Word PageRank?
The Reason Behind Semantic SEO: Why does Google Avoid the Word PageRank?The Reason Behind Semantic SEO: Why does Google Avoid the Word PageRank?
The Reason Behind Semantic SEO: Why does Google Avoid the Word PageRank?
Koray Tugberk GUBUR
 
The Quickest Win in SEO – How to do Internal Linking the Right Way
The Quickest Win in SEO – How to do Internal Linking the Right WayThe Quickest Win in SEO – How to do Internal Linking the Right Way
The Quickest Win in SEO – How to do Internal Linking the Right Way
Martin Hayman
 
Beth Barnham Schema Auditing BrightonSEO Slides.pptx
Beth Barnham Schema Auditing BrightonSEO Slides.pptxBeth Barnham Schema Auditing BrightonSEO Slides.pptx
Beth Barnham Schema Auditing BrightonSEO Slides.pptx
BethBarnham1
 

What's hot (20)

Semantic Search Engine: Semantic Search and Query Parsing with Phrases and En...
Semantic Search Engine: Semantic Search and Query Parsing with Phrases and En...Semantic Search Engine: Semantic Search and Query Parsing with Phrases and En...
Semantic Search Engine: Semantic Search and Query Parsing with Phrases and En...
 
AI-powered Semantic SEO by Koray GUBUR
AI-powered Semantic SEO by Koray GUBURAI-powered Semantic SEO by Koray GUBUR
AI-powered Semantic SEO by Koray GUBUR
 
Passage indexing is likely more important than you think
Passage indexing is likely more important than you thinkPassage indexing is likely more important than you think
Passage indexing is likely more important than you think
 
Keyword Research and Topic Modeling in a Semantic Web
Keyword Research and Topic Modeling in a Semantic WebKeyword Research and Topic Modeling in a Semantic Web
Keyword Research and Topic Modeling in a Semantic Web
 
Entity seo
Entity seoEntity seo
Entity seo
 
7 E-Commerce SEO Mistakes & How to Fix Them #DeepSEOCon
7 E-Commerce SEO Mistakes & How to Fix Them #DeepSEOCon7 E-Commerce SEO Mistakes & How to Fix Them #DeepSEOCon
7 E-Commerce SEO Mistakes & How to Fix Them #DeepSEOCon
 
Antifragility in Digital Marketing
Antifragility in Digital MarketingAntifragility in Digital Marketing
Antifragility in Digital Marketing
 
Lexical Semantics, Semantic Similarity and Relevance for SEO
Lexical Semantics, Semantic Similarity and Relevance for SEOLexical Semantics, Semantic Similarity and Relevance for SEO
Lexical Semantics, Semantic Similarity and Relevance for SEO
 
MozCon 2022: Why Real Expertise is the Most Important Ranking Factor of Them ...
MozCon 2022: Why Real Expertise is the Most Important Ranking Factor of Them ...MozCon 2022: Why Real Expertise is the Most Important Ranking Factor of Them ...
MozCon 2022: Why Real Expertise is the Most Important Ranking Factor of Them ...
 
Opinion-based Article Ranking for Information Retrieval Systems: Factoids and...
Opinion-based Article Ranking for Information Retrieval Systems: Factoids and...Opinion-based Article Ranking for Information Retrieval Systems: Factoids and...
Opinion-based Article Ranking for Information Retrieval Systems: Factoids and...
 
SEOWars: Rstudio aplicado a SEO #sob22
SEOWars: Rstudio aplicado a SEO #sob22SEOWars: Rstudio aplicado a SEO #sob22
SEOWars: Rstudio aplicado a SEO #sob22
 
SEO Low hanging Fruit: Identifying SEO Opportunities to Achieve Results Fast ...
SEO Low hanging Fruit: Identifying SEO Opportunities to Achieve Results Fast ...SEO Low hanging Fruit: Identifying SEO Opportunities to Achieve Results Fast ...
SEO Low hanging Fruit: Identifying SEO Opportunities to Achieve Results Fast ...
 
BrightonSEO - Master Crawl Budget Optimization for Enterprise Websites
BrightonSEO - Master Crawl Budget Optimization for Enterprise WebsitesBrightonSEO - Master Crawl Budget Optimization for Enterprise Websites
BrightonSEO - Master Crawl Budget Optimization for Enterprise Websites
 
Goodbye SEO fck ups! Learn to set an SEO Quality Assurance Framework
Goodbye SEO fck ups! Learn to set an SEO Quality Assurance FrameworkGoodbye SEO fck ups! Learn to set an SEO Quality Assurance Framework
Goodbye SEO fck ups! Learn to set an SEO Quality Assurance Framework
 
Paige Hobart - How to do GOOD Keyword Research - Search Advertising Show 2021
Paige Hobart - How to do GOOD Keyword Research - Search Advertising Show 2021Paige Hobart - How to do GOOD Keyword Research - Search Advertising Show 2021
Paige Hobart - How to do GOOD Keyword Research - Search Advertising Show 2021
 
Semantic Content Networks - Ranking Websites on Google with Semantic SEO
Semantic Content Networks - Ranking Websites on Google with Semantic SEOSemantic Content Networks - Ranking Websites on Google with Semantic SEO
Semantic Content Networks - Ranking Websites on Google with Semantic SEO
 
SEO Case Study - Hangikredi.com From 12 March to 24 September Core Update
SEO Case Study - Hangikredi.com From 12 March to 24 September Core UpdateSEO Case Study - Hangikredi.com From 12 March to 24 September Core Update
SEO Case Study - Hangikredi.com From 12 March to 24 September Core Update
 
The Reason Behind Semantic SEO: Why does Google Avoid the Word PageRank?
The Reason Behind Semantic SEO: Why does Google Avoid the Word PageRank?The Reason Behind Semantic SEO: Why does Google Avoid the Word PageRank?
The Reason Behind Semantic SEO: Why does Google Avoid the Word PageRank?
 
The Quickest Win in SEO – How to do Internal Linking the Right Way
The Quickest Win in SEO – How to do Internal Linking the Right WayThe Quickest Win in SEO – How to do Internal Linking the Right Way
The Quickest Win in SEO – How to do Internal Linking the Right Way
 
Beth Barnham Schema Auditing BrightonSEO Slides.pptx
Beth Barnham Schema Auditing BrightonSEO Slides.pptxBeth Barnham Schema Auditing BrightonSEO Slides.pptx
Beth Barnham Schema Auditing BrightonSEO Slides.pptx
 

Similar to The Python Cheat Sheet for the Busy Marketer

Lessons Learned - Building YDN
Lessons Learned - Building YDNLessons Learned - Building YDN
Lessons Learned - Building YDN
Dan Theurer
 
From Knowledge Graphs to AI-powered SEO: Using taxonomies, schemas and knowle...
From Knowledge Graphs to AI-powered SEO: Using taxonomies, schemas and knowle...From Knowledge Graphs to AI-powered SEO: Using taxonomies, schemas and knowle...
From Knowledge Graphs to AI-powered SEO: Using taxonomies, schemas and knowle...
Connected Data World
 
AI Deeplearning Programming
AI Deeplearning ProgrammingAI Deeplearning Programming
AI Deeplearning Programming
PaulSombat
 
Google Opening up to Developers - From 2 to 55 APIs in 3 years
Google Opening up to Developers - From 2 to 55 APIs in 3 yearsGoogle Opening up to Developers - From 2 to 55 APIs in 3 years
Google Opening up to Developers - From 2 to 55 APIs in 3 years
Patrick Chanezon
 
apidays Paris 2022 - France Televisions : How we leverage API Platform for ou...
apidays Paris 2022 - France Televisions : How we leverage API Platform for ou...apidays Paris 2022 - France Televisions : How we leverage API Platform for ou...
apidays Paris 2022 - France Televisions : How we leverage API Platform for ou...
apidays
 
Developer Grade SEO
Developer Grade SEODeveloper Grade SEO
Developer Grade SEO
Phil Buckley
 
Building Beautiful REST APIs with ASP.NET Core
Building Beautiful REST APIs with ASP.NET CoreBuilding Beautiful REST APIs with ASP.NET Core
Building Beautiful REST APIs with ASP.NET Core
Stormpath
 
Solving performance issues in Django ORM
Solving performance issues in Django ORMSolving performance issues in Django ORM
Solving performance issues in Django ORM
Sian Lerk Lau
 
Resume analyst
Resume analystResume analyst
Resume analyst
Shivam Sehgal
 
Natural Language Processing sample code by Aiden
Natural Language Processing sample code by AidenNatural Language Processing sample code by Aiden
Natural Language Processing sample code by Aiden
Aiden Wu, FRM
 
Introduction to python scrapping
Introduction to python scrappingIntroduction to python scrapping
Introduction to python scrapping
n|u - The Open Security Community
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
Rajesh Rajamani
 
Velocity Conference - What do cats and APIs have in common? They are both awe...
Velocity Conference - What do cats and APIs have in common? They are both awe...Velocity Conference - What do cats and APIs have in common? They are both awe...
Velocity Conference - What do cats and APIs have in common? They are both awe...
Stephen Fishman
 
Intro To Spring Python
Intro To Spring PythonIntro To Spring Python
Intro To Spring Python
gturnquist
 
API Integration in Web Application
API Integration in Web ApplicationAPI Integration in Web Application
API Integration in Web Application
ijtsrd
 
How fiddling with GraphQL enhanced communications between our back and front ...
How fiddling with GraphQL enhanced communications between our back and front ...How fiddling with GraphQL enhanced communications between our back and front ...
How fiddling with GraphQL enhanced communications between our back and front ...
CALLR
 
Yahoo! BOSS in Bucharest
Yahoo! BOSS in BucharestYahoo! BOSS in Bucharest
Yahoo! BOSS in Bucharest
Ted Drake
 
the Spring Update from JavaOne 2013
the Spring Update from JavaOne 2013the Spring Update from JavaOne 2013
the Spring Update from JavaOne 2013
Joshua Long
 
Data Curation @ SpazioDati - NEXA Lunch Seminar
Data Curation @ SpazioDati - NEXA Lunch SeminarData Curation @ SpazioDati - NEXA Lunch Seminar
Data Curation @ SpazioDati - NEXA Lunch Seminar
SpazioDati
 
Python分享
Python分享Python分享
Python分享fangdeng
 

Similar to The Python Cheat Sheet for the Busy Marketer (20)

Lessons Learned - Building YDN
Lessons Learned - Building YDNLessons Learned - Building YDN
Lessons Learned - Building YDN
 
From Knowledge Graphs to AI-powered SEO: Using taxonomies, schemas and knowle...
From Knowledge Graphs to AI-powered SEO: Using taxonomies, schemas and knowle...From Knowledge Graphs to AI-powered SEO: Using taxonomies, schemas and knowle...
From Knowledge Graphs to AI-powered SEO: Using taxonomies, schemas and knowle...
 
AI Deeplearning Programming
AI Deeplearning ProgrammingAI Deeplearning Programming
AI Deeplearning Programming
 
Google Opening up to Developers - From 2 to 55 APIs in 3 years
Google Opening up to Developers - From 2 to 55 APIs in 3 yearsGoogle Opening up to Developers - From 2 to 55 APIs in 3 years
Google Opening up to Developers - From 2 to 55 APIs in 3 years
 
apidays Paris 2022 - France Televisions : How we leverage API Platform for ou...
apidays Paris 2022 - France Televisions : How we leverage API Platform for ou...apidays Paris 2022 - France Televisions : How we leverage API Platform for ou...
apidays Paris 2022 - France Televisions : How we leverage API Platform for ou...
 
Developer Grade SEO
Developer Grade SEODeveloper Grade SEO
Developer Grade SEO
 
Building Beautiful REST APIs with ASP.NET Core
Building Beautiful REST APIs with ASP.NET CoreBuilding Beautiful REST APIs with ASP.NET Core
Building Beautiful REST APIs with ASP.NET Core
 
Solving performance issues in Django ORM
Solving performance issues in Django ORMSolving performance issues in Django ORM
Solving performance issues in Django ORM
 
Resume analyst
Resume analystResume analyst
Resume analyst
 
Natural Language Processing sample code by Aiden
Natural Language Processing sample code by AidenNatural Language Processing sample code by Aiden
Natural Language Processing sample code by Aiden
 
Introduction to python scrapping
Introduction to python scrappingIntroduction to python scrapping
Introduction to python scrapping
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Velocity Conference - What do cats and APIs have in common? They are both awe...
Velocity Conference - What do cats and APIs have in common? They are both awe...Velocity Conference - What do cats and APIs have in common? They are both awe...
Velocity Conference - What do cats and APIs have in common? They are both awe...
 
Intro To Spring Python
Intro To Spring PythonIntro To Spring Python
Intro To Spring Python
 
API Integration in Web Application
API Integration in Web ApplicationAPI Integration in Web Application
API Integration in Web Application
 
How fiddling with GraphQL enhanced communications between our back and front ...
How fiddling with GraphQL enhanced communications between our back and front ...How fiddling with GraphQL enhanced communications between our back and front ...
How fiddling with GraphQL enhanced communications between our back and front ...
 
Yahoo! BOSS in Bucharest
Yahoo! BOSS in BucharestYahoo! BOSS in Bucharest
Yahoo! BOSS in Bucharest
 
the Spring Update from JavaOne 2013
the Spring Update from JavaOne 2013the Spring Update from JavaOne 2013
the Spring Update from JavaOne 2013
 
Data Curation @ SpazioDati - NEXA Lunch Seminar
Data Curation @ SpazioDati - NEXA Lunch SeminarData Curation @ SpazioDati - NEXA Lunch Seminar
Data Curation @ SpazioDati - NEXA Lunch Seminar
 
Python分享
Python分享Python分享
Python分享
 

More from Hamlet Batista

A Deep Dive Into SEO Tactics For Modern Javascript Frameworks
A Deep Dive Into SEO Tactics For Modern Javascript FrameworksA Deep Dive Into SEO Tactics For Modern Javascript Frameworks
A Deep Dive Into SEO Tactics For Modern Javascript Frameworks
Hamlet Batista
 
Automated Duplicate Content Consolidation with Google Cloud Functions
Automated Duplicate Content Consolidation with Google Cloud FunctionsAutomated Duplicate Content Consolidation with Google Cloud Functions
Automated Duplicate Content Consolidation with Google Cloud Functions
Hamlet Batista
 
SEO Meets Automation
SEO Meets AutomationSEO Meets Automation
SEO Meets Automation
Hamlet Batista
 
Creando una Sección de FAQS y su Marcado de Datos Estructurados en 30 Minutos
Creando una Sección de FAQS y su Marcado de Datos Estructurados en 30 MinutosCreando una Sección de FAQS y su Marcado de Datos Estructurados en 30 Minutos
Creando una Sección de FAQS y su Marcado de Datos Estructurados en 30 Minutos
Hamlet Batista
 
Doing More with Less: Automated, High-Quality Content Generation
Doing More with Less: Automated, High-Quality Content GenerationDoing More with Less: Automated, High-Quality Content Generation
Doing More with Less: Automated, High-Quality Content Generation
Hamlet Batista
 
How to scale SEO work NOBODY wants to do (including your competitors) to rapi...
How to scale SEO work NOBODY wants to do (including your competitors) to rapi...How to scale SEO work NOBODY wants to do (including your competitors) to rapi...
How to scale SEO work NOBODY wants to do (including your competitors) to rapi...
Hamlet Batista
 
Agile SEO: Faster SEO Results
Agile SEO: Faster SEO ResultsAgile SEO: Faster SEO Results
Agile SEO: Faster SEO Results
Hamlet Batista
 
Scaling Keyword Research to Find Content Gaps
Scaling Keyword Research to Find Content GapsScaling Keyword Research to Find Content Gaps
Scaling Keyword Research to Find Content Gaps
Hamlet Batista
 
Query Classification on Steroids with BERT
Query Classification on Steroids with BERTQuery Classification on Steroids with BERT
Query Classification on Steroids with BERT
Hamlet Batista
 
Solving Complex JavaScript Issues and Leveraging Semantic HTML5
Solving Complex JavaScript Issues and Leveraging Semantic HTML5Solving Complex JavaScript Issues and Leveraging Semantic HTML5
Solving Complex JavaScript Issues and Leveraging Semantic HTML5
Hamlet Batista
 
Python for Data-driven Storytelling
Python for Data-driven StorytellingPython for Data-driven Storytelling
Python for Data-driven Storytelling
Hamlet Batista
 
Scaling automated quality text generation for enterprise sites
Scaling automated quality text generation for enterprise sitesScaling automated quality text generation for enterprise sites
Scaling automated quality text generation for enterprise sites
Hamlet Batista
 
The New Renaissance of JavaScript
The New Renaissance of JavaScriptThe New Renaissance of JavaScript
The New Renaissance of JavaScript
Hamlet Batista
 
Data and Evidence-driven SEO
Data and Evidence-driven SEOData and Evidence-driven SEO
Data and Evidence-driven SEO
Hamlet Batista
 
Python for SEO
Python for SEOPython for SEO
Python for SEO
Hamlet Batista
 
Advanced Data-Driven SEO
Advanced Data-Driven SEOAdvanced Data-Driven SEO
Advanced Data-Driven SEO
Hamlet Batista
 
Technical SEO "Overoptimization"
Technical SEO "Overoptimization"Technical SEO "Overoptimization"
Technical SEO "Overoptimization"
Hamlet Batista
 
Why Pay for Performance When You Can Lead the World To Your Door for Free?
Why Pay for Performance When You Can Lead the World To Your Door for Free?Why Pay for Performance When You Can Lead the World To Your Door for Free?
Why Pay for Performance When You Can Lead the World To Your Door for Free?
Hamlet Batista
 
Gettin' It Up And Keepin' It Up in Google
Gettin' It Up And Keepin' It Up in GoogleGettin' It Up And Keepin' It Up in Google
Gettin' It Up And Keepin' It Up in Google
Hamlet Batista
 
Batista, Hamlet, Beyond The Usual Link Building
Batista, Hamlet, Beyond The Usual Link BuildingBatista, Hamlet, Beyond The Usual Link Building
Batista, Hamlet, Beyond The Usual Link Building
Hamlet Batista
 

More from Hamlet Batista (20)

A Deep Dive Into SEO Tactics For Modern Javascript Frameworks
A Deep Dive Into SEO Tactics For Modern Javascript FrameworksA Deep Dive Into SEO Tactics For Modern Javascript Frameworks
A Deep Dive Into SEO Tactics For Modern Javascript Frameworks
 
Automated Duplicate Content Consolidation with Google Cloud Functions
Automated Duplicate Content Consolidation with Google Cloud FunctionsAutomated Duplicate Content Consolidation with Google Cloud Functions
Automated Duplicate Content Consolidation with Google Cloud Functions
 
SEO Meets Automation
SEO Meets AutomationSEO Meets Automation
SEO Meets Automation
 
Creando una Sección de FAQS y su Marcado de Datos Estructurados en 30 Minutos
Creando una Sección de FAQS y su Marcado de Datos Estructurados en 30 MinutosCreando una Sección de FAQS y su Marcado de Datos Estructurados en 30 Minutos
Creando una Sección de FAQS y su Marcado de Datos Estructurados en 30 Minutos
 
Doing More with Less: Automated, High-Quality Content Generation
Doing More with Less: Automated, High-Quality Content GenerationDoing More with Less: Automated, High-Quality Content Generation
Doing More with Less: Automated, High-Quality Content Generation
 
How to scale SEO work NOBODY wants to do (including your competitors) to rapi...
How to scale SEO work NOBODY wants to do (including your competitors) to rapi...How to scale SEO work NOBODY wants to do (including your competitors) to rapi...
How to scale SEO work NOBODY wants to do (including your competitors) to rapi...
 
Agile SEO: Faster SEO Results
Agile SEO: Faster SEO ResultsAgile SEO: Faster SEO Results
Agile SEO: Faster SEO Results
 
Scaling Keyword Research to Find Content Gaps
Scaling Keyword Research to Find Content GapsScaling Keyword Research to Find Content Gaps
Scaling Keyword Research to Find Content Gaps
 
Query Classification on Steroids with BERT
Query Classification on Steroids with BERTQuery Classification on Steroids with BERT
Query Classification on Steroids with BERT
 
Solving Complex JavaScript Issues and Leveraging Semantic HTML5
Solving Complex JavaScript Issues and Leveraging Semantic HTML5Solving Complex JavaScript Issues and Leveraging Semantic HTML5
Solving Complex JavaScript Issues and Leveraging Semantic HTML5
 
Python for Data-driven Storytelling
Python for Data-driven StorytellingPython for Data-driven Storytelling
Python for Data-driven Storytelling
 
Scaling automated quality text generation for enterprise sites
Scaling automated quality text generation for enterprise sitesScaling automated quality text generation for enterprise sites
Scaling automated quality text generation for enterprise sites
 
The New Renaissance of JavaScript
The New Renaissance of JavaScriptThe New Renaissance of JavaScript
The New Renaissance of JavaScript
 
Data and Evidence-driven SEO
Data and Evidence-driven SEOData and Evidence-driven SEO
Data and Evidence-driven SEO
 
Python for SEO
Python for SEOPython for SEO
Python for SEO
 
Advanced Data-Driven SEO
Advanced Data-Driven SEOAdvanced Data-Driven SEO
Advanced Data-Driven SEO
 
Technical SEO "Overoptimization"
Technical SEO "Overoptimization"Technical SEO "Overoptimization"
Technical SEO "Overoptimization"
 
Why Pay for Performance When You Can Lead the World To Your Door for Free?
Why Pay for Performance When You Can Lead the World To Your Door for Free?Why Pay for Performance When You Can Lead the World To Your Door for Free?
Why Pay for Performance When You Can Lead the World To Your Door for Free?
 
Gettin' It Up And Keepin' It Up in Google
Gettin' It Up And Keepin' It Up in GoogleGettin' It Up And Keepin' It Up in Google
Gettin' It Up And Keepin' It Up in Google
 
Batista, Hamlet, Beyond The Usual Link Building
Batista, Hamlet, Beyond The Usual Link BuildingBatista, Hamlet, Beyond The Usual Link Building
Batista, Hamlet, Beyond The Usual Link Building
 

Recently uploaded

De-risk Your Digital Evolution - Hannah Grap
De-risk Your Digital Evolution - Hannah GrapDe-risk Your Digital Evolution - Hannah Grap
20221005110010_633d63baa84f6_learn___week_3_ch._5.pdf
20221005110010_633d63baa84f6_learn___week_3_ch._5.pdf20221005110010_633d63baa84f6_learn___week_3_ch._5.pdf
20221005110010_633d63baa84f6_learn___week_3_ch._5.pdf
levuag
 
The Old Oak - Press Kit - Cannes Film Festival 2023
The Old Oak - Press Kit - Cannes Film Festival 2023The Old Oak - Press Kit - Cannes Film Festival 2023
The Old Oak - Press Kit - Cannes Film Festival 2023
Pascal Fintoni
 
Your Path to Profits - The Game-Changing Power of a Marketing - Daniel Bussius
Your Path to Profits - The Game-Changing Power of a Marketing - Daniel BussiusYour Path to Profits - The Game-Changing Power of a Marketing - Daniel Bussius
Your Path to Profits - The Game-Changing Power of a Marketing - Daniel Bussius
DigiMarCon - Digital Marketing, Media and Advertising Conferences & Exhibitions
 
Your Path to Profits - The Game-Changing Power of a Marketing OS for Your Bus...
Your Path to Profits - The Game-Changing Power of a Marketing OS for Your Bus...Your Path to Profits - The Game-Changing Power of a Marketing OS for Your Bus...
Your Path to Profits - The Game-Changing Power of a Marketing OS for Your Bus...
DigiMarCon - Digital Marketing, Media and Advertising Conferences & Exhibitions
 
Adapt or Die - Jon Lakefish, Lakefish Group LLC
Adapt or Die - Jon Lakefish, Lakefish Group LLCAdapt or Die - Jon Lakefish, Lakefish Group LLC
Unknown to Unforgettable - The Art and Science to Being Irresistible on Camer...
Unknown to Unforgettable - The Art and Science to Being Irresistible on Camer...Unknown to Unforgettable - The Art and Science to Being Irresistible on Camer...
Unknown to Unforgettable - The Art and Science to Being Irresistible on Camer...
DigiMarCon - Digital Marketing, Media and Advertising Conferences & Exhibitions
 
Digital Marketing Trends - Experts Insights on How
Digital Marketing Trends - Experts Insights on HowDigital Marketing Trends - Experts Insights on How
Generative AI - Unleash Creative Opportunity - Peter Weltman
Generative AI - Unleash Creative Opportunity - Peter WeltmanGenerative AI - Unleash Creative Opportunity - Peter Weltman
Generative AI - Unleash Creative Opportunity - Peter Weltman
DigiMarCon - Digital Marketing, Media and Advertising Conferences & Exhibitions
 
Winning local SEO in the Age of AI - Dennis Yu
Winning local SEO in the Age of AI - Dennis YuWinning local SEO in the Age of AI - Dennis Yu
Marketing Management Notes Philip Kotler
Marketing Management Notes Philip KotlerMarketing Management Notes Philip Kotler
Marketing Management Notes Philip Kotler
LaveenaShanker
 
Winning local SEO in the Age of AI - Dennis Yu
Winning local SEO in the Age of AI - Dennis YuWinning local SEO in the Age of AI - Dennis Yu
Digital Marketing Trends - Experts Insights on How to Gain a Competitive Edge
Digital Marketing Trends - Experts Insights on How to Gain a Competitive EdgeDigital Marketing Trends - Experts Insights on How to Gain a Competitive Edge
Digital Marketing Trends - Experts Insights on How to Gain a Competitive Edge
DigiMarCon - Digital Marketing, Media and Advertising Conferences & Exhibitions
 
5 Big Bets for 2024 - Jamie A. Lee, Stripes Co
5 Big Bets for 2024 - Jamie A. Lee, Stripes Co5 Big Bets for 2024 - Jamie A. Lee, Stripes Co
Turn Digital Reputation Threats into Offense Tactics - Daniel Lemin
Turn Digital Reputation Threats into Offense Tactics - Daniel LeminTurn Digital Reputation Threats into Offense Tactics - Daniel Lemin
Turn Digital Reputation Threats into Offense Tactics - Daniel Lemin
DigiMarCon - Digital Marketing, Media and Advertising Conferences & Exhibitions
 
The New Era Of SEO - How AI Has Changed SEO Forever - Danny Leibrandt
The New Era Of SEO - How AI Has Changed SEO Forever - Danny LeibrandtThe New Era Of SEO - How AI Has Changed SEO Forever - Danny Leibrandt
The New Era Of SEO - How AI Has Changed SEO Forever - Danny Leibrandt
DigiMarCon - Digital Marketing, Media and Advertising Conferences & Exhibitions
 
Digital Money Maker Club – von Gunnar Kessler digital.
Digital Money Maker Club – von Gunnar Kessler digital.Digital Money Maker Club – von Gunnar Kessler digital.
Digital Money Maker Club – von Gunnar Kessler digital.
focsh890
 
SEO as the Backbone of Digital Marketing
SEO as the Backbone of Digital MarketingSEO as the Backbone of Digital Marketing
SEO as the Backbone of Digital Marketing
Felipe Bazon
 
Offissa Dizayn - Otel, Kafe, Restoran Kataloqu_240603_011042.pdf
Offissa Dizayn - Otel, Kafe, Restoran Kataloqu_240603_011042.pdfOffissa Dizayn - Otel, Kafe, Restoran Kataloqu_240603_011042.pdf
Offissa Dizayn - Otel, Kafe, Restoran Kataloqu_240603_011042.pdf
offisadizayn
 

Recently uploaded (20)

De-risk Your Digital Evolution - Hannah Grap
De-risk Your Digital Evolution - Hannah GrapDe-risk Your Digital Evolution - Hannah Grap
De-risk Your Digital Evolution - Hannah Grap
 
20221005110010_633d63baa84f6_learn___week_3_ch._5.pdf
20221005110010_633d63baa84f6_learn___week_3_ch._5.pdf20221005110010_633d63baa84f6_learn___week_3_ch._5.pdf
20221005110010_633d63baa84f6_learn___week_3_ch._5.pdf
 
The Old Oak - Press Kit - Cannes Film Festival 2023
The Old Oak - Press Kit - Cannes Film Festival 2023The Old Oak - Press Kit - Cannes Film Festival 2023
The Old Oak - Press Kit - Cannes Film Festival 2023
 
Metaverse Marketing in the Generation of the Internet - Eugene Capon
Metaverse Marketing in the Generation of the Internet - Eugene CaponMetaverse Marketing in the Generation of the Internet - Eugene Capon
Metaverse Marketing in the Generation of the Internet - Eugene Capon
 
Your Path to Profits - The Game-Changing Power of a Marketing - Daniel Bussius
Your Path to Profits - The Game-Changing Power of a Marketing - Daniel BussiusYour Path to Profits - The Game-Changing Power of a Marketing - Daniel Bussius
Your Path to Profits - The Game-Changing Power of a Marketing - Daniel Bussius
 
Your Path to Profits - The Game-Changing Power of a Marketing OS for Your Bus...
Your Path to Profits - The Game-Changing Power of a Marketing OS for Your Bus...Your Path to Profits - The Game-Changing Power of a Marketing OS for Your Bus...
Your Path to Profits - The Game-Changing Power of a Marketing OS for Your Bus...
 
Adapt or Die - Jon Lakefish, Lakefish Group LLC
Adapt or Die - Jon Lakefish, Lakefish Group LLCAdapt or Die - Jon Lakefish, Lakefish Group LLC
Adapt or Die - Jon Lakefish, Lakefish Group LLC
 
Unknown to Unforgettable - The Art and Science to Being Irresistible on Camer...
Unknown to Unforgettable - The Art and Science to Being Irresistible on Camer...Unknown to Unforgettable - The Art and Science to Being Irresistible on Camer...
Unknown to Unforgettable - The Art and Science to Being Irresistible on Camer...
 
Digital Marketing Trends - Experts Insights on How
Digital Marketing Trends - Experts Insights on HowDigital Marketing Trends - Experts Insights on How
Digital Marketing Trends - Experts Insights on How
 
Generative AI - Unleash Creative Opportunity - Peter Weltman
Generative AI - Unleash Creative Opportunity - Peter WeltmanGenerative AI - Unleash Creative Opportunity - Peter Weltman
Generative AI - Unleash Creative Opportunity - Peter Weltman
 
Winning local SEO in the Age of AI - Dennis Yu
Winning local SEO in the Age of AI - Dennis YuWinning local SEO in the Age of AI - Dennis Yu
Winning local SEO in the Age of AI - Dennis Yu
 
Marketing Management Notes Philip Kotler
Marketing Management Notes Philip KotlerMarketing Management Notes Philip Kotler
Marketing Management Notes Philip Kotler
 
Winning local SEO in the Age of AI - Dennis Yu
Winning local SEO in the Age of AI - Dennis YuWinning local SEO in the Age of AI - Dennis Yu
Winning local SEO in the Age of AI - Dennis Yu
 
Digital Marketing Trends - Experts Insights on How to Gain a Competitive Edge
Digital Marketing Trends - Experts Insights on How to Gain a Competitive EdgeDigital Marketing Trends - Experts Insights on How to Gain a Competitive Edge
Digital Marketing Trends - Experts Insights on How to Gain a Competitive Edge
 
5 Big Bets for 2024 - Jamie A. Lee, Stripes Co
5 Big Bets for 2024 - Jamie A. Lee, Stripes Co5 Big Bets for 2024 - Jamie A. Lee, Stripes Co
5 Big Bets for 2024 - Jamie A. Lee, Stripes Co
 
Turn Digital Reputation Threats into Offense Tactics - Daniel Lemin
Turn Digital Reputation Threats into Offense Tactics - Daniel LeminTurn Digital Reputation Threats into Offense Tactics - Daniel Lemin
Turn Digital Reputation Threats into Offense Tactics - Daniel Lemin
 
The New Era Of SEO - How AI Has Changed SEO Forever - Danny Leibrandt
The New Era Of SEO - How AI Has Changed SEO Forever - Danny LeibrandtThe New Era Of SEO - How AI Has Changed SEO Forever - Danny Leibrandt
The New Era Of SEO - How AI Has Changed SEO Forever - Danny Leibrandt
 
Digital Money Maker Club – von Gunnar Kessler digital.
Digital Money Maker Club – von Gunnar Kessler digital.Digital Money Maker Club – von Gunnar Kessler digital.
Digital Money Maker Club – von Gunnar Kessler digital.
 
SEO as the Backbone of Digital Marketing
SEO as the Backbone of Digital MarketingSEO as the Backbone of Digital Marketing
SEO as the Backbone of Digital Marketing
 
Offissa Dizayn - Otel, Kafe, Restoran Kataloqu_240603_011042.pdf
Offissa Dizayn - Otel, Kafe, Restoran Kataloqu_240603_011042.pdfOffissa Dizayn - Otel, Kafe, Restoran Kataloqu_240603_011042.pdf
Offissa Dizayn - Otel, Kafe, Restoran Kataloqu_240603_011042.pdf
 

The Python Cheat Sheet for the Busy Marketer

  • 1. THE PYTHON CHEAT SHEET FOR THE BUSY MARKETER H A M L E T B A T I S T A #INBOUND2020
  • 2. Google Colaboratory feature walkthrough GOOGLE COLAB Preparing your Python notebook environment SETUP Publish your analysis to Google Sheets directly from Python EXPORTING TO SHEETS Convert your data analysis into simpler to understand formats DATA TRANSFORMATION Process API output to extract insights JSON PARSING Run automated analysis using Google Lighthouse API CALLING AGENDA T H E P Y T H O N C H E A T S H E E T F O R T H E B U S Y M A R K E T E R @hamletbatista Fetch content from the web WEB SCRAPING Basic data types, Containers, Functions, Classes PYTHON BASICS
  • 3. INTRODUCTION P Y T H O N S O U R C E D D A T A S T U D I E S Published April 7, 2020 PAGE SPEED SCORES OF EVERY SHOPIFY THEME Published June 23, 2020 ACCESSING ‘CORE WEB VITALS’ OF EVERY SHOPIFY THEME Our work in this presentation AN SEO ASSESSMENT OF EVERY SHOPIFY THEME #INBOUND2020 https://bit.ly/31JXHJ1https://bit.ly/38tEixp https://bit.ly/31JXHJ1 @hamletbatista
  • 4. We will run Google Lighthouse SEO analysis feature under mobile emulation GOOGLE LIGHTHOUSE We will scrape the demo sites of every theme SHOPIFY THEME STORE We will use a handy cheat sheet spread over multiple Python notebooks CHEAT SHEET PYTHON SOURCED DATA STUDY A M O B I L E S E O A S S E S S M E N T O F E V E R Y S H O P I F Y T H E M E #INBOUND2020 @hamletbatista
  • 5. POWERED BY GOOGLE LIGHTHOUSE A M O B I L E S E O A S S E S S M E N T O F E V E R Y S H O P I F Y T H E M E #INBOUND2020 @hamletbatista We will run Google Lighthouse SEO analysis feature under mobile emulation GOOGLE LIGHTHOUSE We will scrape the demo sites of every theme SHOPIFY THEME STORE We will use a handy cheat sheet spread over multiple Python notebooks CHEAT SHEET
  • 6. SETUP 1 Create a new Python notebook directly from Google Drive #INBOUND2020 U S I N G G O O G L E C O L A B O R A T O R Y Getting Started: • Overview of Colaboratory Features @hamletbatista
  • 7. GOOGLE COLAB FEATURES T U R N N O T E B O O K S I N T O P R O G R A M S 2 Google Colab’s includes many useful features that simplify data acquisition, preparation and analysis. #INBOUND2020 Most common form fields: input1 = “value” #@param {type:”string”} input2 = 10 #@param {type:”integer”} input3 = “2020-09-22” #@param {type:”date”} @hamletbatista
  • 8. PYTHON BASICS 3 Google Colab requires Python code. Let’s let’s review some of the basic constructs. #INBOUND2020 T H E L A N G U A G E O F D A T A S C I E N C E @hamletbatista Python learning resources: • An Introduction to Python for Technical SEO • An Introduction to Python for SEO Pros Using Spreadsheets • How to Use Python to Analyze SEO Data: A Reference Guide
  • 9. 4 #INBOUND2020 @hamletbatista WEB SCRAPING In our example, we will scrape the Shopify Theme’s Store for theme names and demo site URLs F E T C H C O N T E N T F R O M T H E W E B Example Scrapy spider changes: • start_urls • “Next page” CSS selector • Elements to extract (theme name and link) Learn more: • Scrapy.org
  • 10. API CALLING 5 In our example, we will call the Page Speed Insights API to get SEO assessment metrics and recommendations #INBOUND2020 R U N A U T O M A T E D A N A L Y S I S Most common request call: r = requests.get(api_url, headers={'Accept': 'application/json'}) if r.status_code == 200: return r.json() Learn more: • Requests: HTTP for Humans @hamletbatista
  • 11. JSON PARSING P R O C E S S I N G A P I R E S P O N S E S 6 Complex JSON API responses can be a pain to process. We will use JSONPath to drastically simplify this. #INBOUND2020 Most common JSONPath recipe: json_path = “$.lighthouseResult.categories.seo.score” jsonpath_tree = parse(json_path) value = [match.value for match in jsonpath_tree.find(data)] Learn more: JSON JSONPath Tutorial @hamletbatista
  • 12. DATA TRANSFORMATION 7 In our example, we will use Python pandas to reorganize our study in a way that is easy to interpret #INBOUND2020 D A T A I S R A R E L Y I N T H E B E S T F O R M A T Converting a list of dictionaries to Pandas Data Frame: import pandas as pd new_format = [{“column1_name”: “value”},{“column2_name”: “value”} ] df = pd.DataFrame(new_format) Learn more: • 10 minutes to pandas @hamletbatista
  • 13. EXPORTING TO SHEETS G O O G L E S H E E T S I S S I M P L E R 8 Once we produce our data in Python we can transfer it directly to Google Sheets for further analysis and reporting #INBOUND2020 Transferring a Pandas Data Frame to a Google Sheet : spread = Spread("INBOUND2020", creds=creds) spread.df_to_sheet(df, index=False, sheet="Themes SEO audits", start='A1', replace=True) Learn more: • Examples of gspread Usage • Introduction to gspread_pandas (video) @hamletbatista
  • 14. LOCATION 33 Wood Ave South Suite 600 Iselin, NJ 08830 USA PHONE CONTACT US +1 866.882.2983 https://www.ranksense.com #INBOUND2020 ABOUT RANKSENSE A U T O M A T E A N D R U N S E O E X P E R I M E N T S F R O M G O O G L E S H E E T S @RankSense