Created
October 10, 2024 08:13
-
-
Save natzir/e4f683f078410198b27c655eacff7585 to your computer and use it in GitHub Desktop.
Fuzzy Booster by Natzir - MLforSEO
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"nbformat": 4, | |
"nbformat_minor": 0, | |
"metadata": { | |
"colab": { | |
"provenance": [], | |
"authorship_tag": "ABX9TyM+DDySwtYFacGAkkiOZkWx", | |
"include_colab_link": true | |
}, | |
"kernelspec": { | |
"name": "python3", | |
"display_name": "Python 3" | |
}, | |
"language_info": { | |
"name": "python" | |
} | |
}, | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"id": "view-in-github", | |
"colab_type": "text" | |
}, | |
"source": [ | |
"<a href=\"https://colab.research.google.com/gist/natzir/e4f683f078410198b27c655eacff7585/fuzzy-booster-by-natzir-mlforseo.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": { | |
"collapsed": true, | |
"id": "qpzl-4fXn48E", | |
"colab": { | |
"base_uri": "https://localhost:8080/" | |
}, | |
"outputId": "faa844d7-29a7-4846-cae6-f54463a94f88" | |
}, | |
"outputs": [ | |
{ | |
"output_type": "stream", | |
"name": "stderr", | |
"text": [ | |
"[nltk_data] Downloading package stopwords to /root/nltk_data...\n", | |
"[nltk_data] Package stopwords is already up-to-date!\n" | |
] | |
}, | |
{ | |
"output_type": "stream", | |
"name": "stdout", | |
"text": [ | |
"Requirement already satisfied: fuzzywuzzy in /usr/local/lib/python3.10/dist-packages (0.18.0)\n", | |
"Collecting openai\n", | |
" Downloading openai-1.37.1-py3-none-any.whl.metadata (22 kB)\n", | |
"Requirement already satisfied: anyio<5,>=3.5.0 in /usr/local/lib/python3.10/dist-packages (from openai) (3.7.1)\n", | |
"Requirement already satisfied: distro<2,>=1.7.0 in /usr/lib/python3/dist-packages (from openai) (1.7.0)\n", | |
"Collecting httpx<1,>=0.23.0 (from openai)\n", | |
" Downloading httpx-0.27.0-py3-none-any.whl.metadata (7.2 kB)\n", | |
"Requirement already satisfied: pydantic<3,>=1.9.0 in /usr/local/lib/python3.10/dist-packages (from openai) (2.8.2)\n", | |
"Requirement already satisfied: sniffio in /usr/local/lib/python3.10/dist-packages (from openai) (1.3.1)\n", | |
"Requirement already satisfied: tqdm>4 in /usr/local/lib/python3.10/dist-packages (from openai) (4.66.4)\n", | |
"Requirement already satisfied: typing-extensions<5,>=4.7 in /usr/local/lib/python3.10/dist-packages (from openai) (4.12.2)\n", | |
"Requirement already satisfied: idna>=2.8 in /usr/local/lib/python3.10/dist-packages (from anyio<5,>=3.5.0->openai) (3.7)\n", | |
"Requirement already satisfied: exceptiongroup in /usr/local/lib/python3.10/dist-packages (from anyio<5,>=3.5.0->openai) (1.2.2)\n", | |
"Requirement already satisfied: certifi in /usr/local/lib/python3.10/dist-packages (from httpx<1,>=0.23.0->openai) (2024.7.4)\n", | |
"Collecting httpcore==1.* (from httpx<1,>=0.23.0->openai)\n", | |
" Downloading httpcore-1.0.5-py3-none-any.whl.metadata (20 kB)\n", | |
"Collecting h11<0.15,>=0.13 (from httpcore==1.*->httpx<1,>=0.23.0->openai)\n", | |
" Downloading h11-0.14.0-py3-none-any.whl.metadata (8.2 kB)\n", | |
"Requirement already satisfied: annotated-types>=0.4.0 in /usr/local/lib/python3.10/dist-packages (from pydantic<3,>=1.9.0->openai) (0.7.0)\n", | |
"Requirement already satisfied: pydantic-core==2.20.1 in /usr/local/lib/python3.10/dist-packages (from pydantic<3,>=1.9.0->openai) (2.20.1)\n", | |
"Downloading openai-1.37.1-py3-none-any.whl (337 kB)\n", | |
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m337.0/337.0 kB\u001b[0m \u001b[31m8.9 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", | |
"\u001b[?25hDownloading httpx-0.27.0-py3-none-any.whl (75 kB)\n", | |
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m75.6/75.6 kB\u001b[0m \u001b[31m4.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", | |
"\u001b[?25hDownloading httpcore-1.0.5-py3-none-any.whl (77 kB)\n", | |
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m77.9/77.9 kB\u001b[0m \u001b[31m5.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", | |
"\u001b[?25hDownloading h11-0.14.0-py3-none-any.whl (58 kB)\n", | |
"\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m58.3/58.3 kB\u001b[0m \u001b[31m4.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", | |
"\u001b[?25hInstalling collected packages: h11, httpcore, httpx, openai\n", | |
"Successfully installed h11-0.14.0 httpcore-1.0.5 httpx-0.27.0 openai-1.37.1\n" | |
] | |
} | |
], | |
"source": [ | |
"import os\n", | |
"import json\n", | |
"import google.auth\n", | |
"from google.auth.transport.requests import Request\n", | |
"from google.oauth2.credentials import Credentials\n", | |
"from google_auth_oauthlib.flow import InstalledAppFlow\n", | |
"from googleapiclient.discovery import build\n", | |
"from google.colab import files\n", | |
"import datetime\n", | |
"from dateutil import relativedelta\n", | |
"import pandas as pd\n", | |
"from collections import defaultdict\n", | |
"from bs4 import BeautifulSoup\n", | |
"import requests\n", | |
"import chardet\n", | |
"import nltk\n", | |
"nltk.download('stopwords')\n", | |
"from nltk.corpus import stopwords\n", | |
"import re\n", | |
"import unicodedata\n", | |
"!pip install fuzzywuzzy\n", | |
"from fuzzywuzzy import fuzz\n", | |
"!pip install openai\n", | |
"from openai import OpenAI" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"# Select the date range\n", | |
"end_date = datetime.date.today()\n", | |
"start_date = end_date - relativedelta.relativedelta(months=16)\n", | |
"\n", | |
"# Select the site\n", | |
"site = 'https://www.analistaseo.es/' # https://www.example.com/ for a URL-prefix property or sc-domain:example.com for a Domain property\n", | |
"\n", | |
"home = \"^\"+site+\"$\" # Regex to match the home page\n", | |
"\n", | |
"branded_queries = 'natzir|analistaseo|analista seo' # Branded queries to exclude\n", | |
"\n", | |
"# Request payload for Google Search Console API\n", | |
"request = {\n", | |
" 'startDate': datetime.datetime.strftime(start_date,'%Y-%m-%d'),\n", | |
" 'endDate': datetime.datetime.strftime(end_date,'%Y-%m-%d'),\n", | |
" 'dimensions': ['page','query'],\n", | |
" 'dimensionFilterGroups': [\n", | |
" {\n", | |
" 'filters': [\n", | |
" { # Excluding home page\n", | |
" 'dimension': 'page',\n", | |
" 'operator': 'excludingRegex',\n", | |
" 'expression': home\n", | |
" },\n", | |
" { # Excluding branded queries\n", | |
" 'dimension': 'query',\n", | |
" 'operator': 'excludingRegex',\n", | |
" 'expression': branded_queries\n", | |
" }\n", | |
" ]\n", | |
" }\n", | |
" ],\n", | |
" 'rowLimit': 25000 # Up to 25.000 urls\n", | |
"}\n", | |
"\n", | |
"# Upload credentials file\n", | |
"uploaded = files.upload()\n", | |
"\n", | |
"# Save the credentials file\n", | |
"with open('credentials.json', 'wb') as f:\n", | |
" f.write(uploaded[list(uploaded.keys())[0]])\n", | |
"\n", | |
"# Set the scope for Google API\n", | |
"SCOPES = ['https://www.googleapis.com/auth/webmasters.readonly']\n", | |
"\n", | |
"# Load credentials\n", | |
"creds = None\n", | |
"if os.path.exists('token.json'):\n", | |
" creds = Credentials.from_authorized_user_file('token.json', SCOPES)\n", | |
"if not creds or not creds.valid:\n", | |
" if creds and creds.expired and creds.refresh_token:\n", | |
" creds.refresh(Request())\n", | |
" else:\n", | |
" flow = InstalledAppFlow.from_client_secrets_file(\n", | |
" 'credentials.json', SCOPES)\n", | |
" flow.redirect_uri = 'urn:ietf:wg:oauth:2.0:oob'\n", | |
" auth_url, _ = flow.authorization_url(prompt='consent')\n", | |
"\n", | |
" print(f'Please verify your account at the following URL: {auth_url}')\n", | |
"\n", | |
" # Wait for the verification code\n", | |
" code = input('Enter the verification code: ')\n", | |
" flow.fetch_token(code=code)\n", | |
" creds = flow.credentials\n", | |
"\n", | |
" with open('token.json', 'w') as token:\n", | |
" token.write(creds.to_json())\n", | |
"\n", | |
"# Build the Search Console service\n", | |
"service = build('webmasters', 'v3', credentials=creds)\n", | |
"\n", | |
"# Execute the request to the Search Console API\n", | |
"response = service.searchanalytics().query(siteUrl=site, body=request).execute()\n", | |
"print(\"Getting Google Search Console data...\")\n", | |
"\n", | |
"# Parse the JSON response\n", | |
"scDict = defaultdict(list)\n", | |
"\n", | |
"for row in response['rows']:\n", | |
" scDict['page'].append(row['keys'][0] or 0)\n", | |
" scDict['query'].append(row['keys'][1] or 0)\n", | |
" scDict['clicks'].append(row['clicks'] or 0)\n", | |
" scDict['ctr'].append(row['ctr'] or 0)\n", | |
" scDict['impressions'].append(row['impressions'] or 0)\n", | |
" scDict['position'].append(row['position'] or 0)\n", | |
"\n", | |
"# Create a DataFrame from the parsed data\n", | |
"df = pd.DataFrame(data = scDict)\n", | |
"\n", | |
"# Convert data types and adjust values\n", | |
"df['clicks'] = df['clicks'].astype('int')\n", | |
"df['ctr'] = df['ctr']*100\n", | |
"df['impressions'] = df['impressions'].astype('int')\n", | |
"df['position'] = df['position'].round(2)\n", | |
"df.sort_values('clicks', inplace = True, ascending = False)\n", | |
"\n", | |
"# Get the most clicked query for each page\n", | |
"df = df.drop_duplicates(subset=['page'], keep='first')\n", | |
"df" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/", | |
"height": 554 | |
}, | |
"id": "ZLcaJ89NGlF1", | |
"outputId": "1ad54f36-588c-4964-9081-f3a48f0f1743" | |
}, | |
"execution_count": null, | |
"outputs": [ | |
{ | |
"output_type": "display_data", | |
"data": { | |
"text/plain": [ | |
"<IPython.core.display.HTML object>" | |
], | |
"text/html": [ | |
"\n", | |
" <input type=\"file\" id=\"files-6df705b1-230c-4cd9-aeaf-c4f831282161\" name=\"files[]\" multiple disabled\n", | |
" style=\"border:none\" />\n", | |
" <output id=\"result-6df705b1-230c-4cd9-aeaf-c4f831282161\">\n", | |
" Upload widget is only available when the cell has been executed in the\n", | |
" current browser session. Please rerun this cell to enable.\n", | |
" </output>\n", | |
" <script>// Copyright 2017 Google LLC\n", | |
"//\n", | |
"// Licensed under the Apache License, Version 2.0 (the \"License\");\n", | |
"// you may not use this file except in compliance with the License.\n", | |
"// You may obtain a copy of the License at\n", | |
"//\n", | |
"// http://www.apache.org/licenses/LICENSE-2.0\n", | |
"//\n", | |
"// Unless required by applicable law or agreed to in writing, software\n", | |
"// distributed under the License is distributed on an \"AS IS\" BASIS,\n", | |
"// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n", | |
"// See the License for the specific language governing permissions and\n", | |
"// limitations under the License.\n", | |
"\n", | |
"/**\n", | |
" * @fileoverview Helpers for google.colab Python module.\n", | |
" */\n", | |
"(function(scope) {\n", | |
"function span(text, styleAttributes = {}) {\n", | |
" const element = document.createElement('span');\n", | |
" element.textContent = text;\n", | |
" for (const key of Object.keys(styleAttributes)) {\n", | |
" element.style[key] = styleAttributes[key];\n", | |
" }\n", | |
" return element;\n", | |
"}\n", | |
"\n", | |
"// Max number of bytes which will be uploaded at a time.\n", | |
"const MAX_PAYLOAD_SIZE = 100 * 1024;\n", | |
"\n", | |
"function _uploadFiles(inputId, outputId) {\n", | |
" const steps = uploadFilesStep(inputId, outputId);\n", | |
" const outputElement = document.getElementById(outputId);\n", | |
" // Cache steps on the outputElement to make it available for the next call\n", | |
" // to uploadFilesContinue from Python.\n", | |
" outputElement.steps = steps;\n", | |
"\n", | |
" return _uploadFilesContinue(outputId);\n", | |
"}\n", | |
"\n", | |
"// This is roughly an async generator (not supported in the browser yet),\n", | |
"// where there are multiple asynchronous steps and the Python side is going\n", | |
"// to poll for completion of each step.\n", | |
"// This uses a Promise to block the python side on completion of each step,\n", | |
"// then passes the result of the previous step as the input to the next step.\n", | |
"function _uploadFilesContinue(outputId) {\n", | |
" const outputElement = document.getElementById(outputId);\n", | |
" const steps = outputElement.steps;\n", | |
"\n", | |
" const next = steps.next(outputElement.lastPromiseValue);\n", | |
" return Promise.resolve(next.value.promise).then((value) => {\n", | |
" // Cache the last promise value to make it available to the next\n", | |
" // step of the generator.\n", | |
" outputElement.lastPromiseValue = value;\n", | |
" return next.value.response;\n", | |
" });\n", | |
"}\n", | |
"\n", | |
"/**\n", | |
" * Generator function which is called between each async step of the upload\n", | |
" * process.\n", | |
" * @param {string} inputId Element ID of the input file picker element.\n", | |
" * @param {string} outputId Element ID of the output display.\n", | |
" * @return {!Iterable<!Object>} Iterable of next steps.\n", | |
" */\n", | |
"function* uploadFilesStep(inputId, outputId) {\n", | |
" const inputElement = document.getElementById(inputId);\n", | |
" inputElement.disabled = false;\n", | |
"\n", | |
" const outputElement = document.getElementById(outputId);\n", | |
" outputElement.innerHTML = '';\n", | |
"\n", | |
" const pickedPromise = new Promise((resolve) => {\n", | |
" inputElement.addEventListener('change', (e) => {\n", | |
" resolve(e.target.files);\n", | |
" });\n", | |
" });\n", | |
"\n", | |
" const cancel = document.createElement('button');\n", | |
" inputElement.parentElement.appendChild(cancel);\n", | |
" cancel.textContent = 'Cancel upload';\n", | |
" const cancelPromise = new Promise((resolve) => {\n", | |
" cancel.onclick = () => {\n", | |
" resolve(null);\n", | |
" };\n", | |
" });\n", | |
"\n", | |
" // Wait for the user to pick the files.\n", | |
" const files = yield {\n", | |
" promise: Promise.race([pickedPromise, cancelPromise]),\n", | |
" response: {\n", | |
" action: 'starting',\n", | |
" }\n", | |
" };\n", | |
"\n", | |
" cancel.remove();\n", | |
"\n", | |
" // Disable the input element since further picks are not allowed.\n", | |
" inputElement.disabled = true;\n", | |
"\n", | |
" if (!files) {\n", | |
" return {\n", | |
" response: {\n", | |
" action: 'complete',\n", | |
" }\n", | |
" };\n", | |
" }\n", | |
"\n", | |
" for (const file of files) {\n", | |
" const li = document.createElement('li');\n", | |
" li.append(span(file.name, {fontWeight: 'bold'}));\n", | |
" li.append(span(\n", | |
" `(${file.type || 'n/a'}) - ${file.size} bytes, ` +\n", | |
" `last modified: ${\n", | |
" file.lastModifiedDate ? file.lastModifiedDate.toLocaleDateString() :\n", | |
" 'n/a'} - `));\n", | |
" const percent = span('0% done');\n", | |
" li.appendChild(percent);\n", | |
"\n", | |
" outputElement.appendChild(li);\n", | |
"\n", | |
" const fileDataPromise = new Promise((resolve) => {\n", | |
" const reader = new FileReader();\n", | |
" reader.onload = (e) => {\n", | |
" resolve(e.target.result);\n", | |
" };\n", | |
" reader.readAsArrayBuffer(file);\n", | |
" });\n", | |
" // Wait for the data to be ready.\n", | |
" let fileData = yield {\n", | |
" promise: fileDataPromise,\n", | |
" response: {\n", | |
" action: 'continue',\n", | |
" }\n", | |
" };\n", | |
"\n", | |
" // Use a chunked sending to avoid message size limits. See b/62115660.\n", | |
" let position = 0;\n", | |
" do {\n", | |
" const length = Math.min(fileData.byteLength - position, MAX_PAYLOAD_SIZE);\n", | |
" const chunk = new Uint8Array(fileData, position, length);\n", | |
" position += length;\n", | |
"\n", | |
" const base64 = btoa(String.fromCharCode.apply(null, chunk));\n", | |
" yield {\n", | |
" response: {\n", | |
" action: 'append',\n", | |
" file: file.name,\n", | |
" data: base64,\n", | |
" },\n", | |
" };\n", | |
"\n", | |
" let percentDone = fileData.byteLength === 0 ?\n", | |
" 100 :\n", | |
" Math.round((position / fileData.byteLength) * 100);\n", | |
" percent.textContent = `${percentDone}% done`;\n", | |
"\n", | |
" } while (position < fileData.byteLength);\n", | |
" }\n", | |
"\n", | |
" // All done.\n", | |
" yield {\n", | |
" response: {\n", | |
" action: 'complete',\n", | |
" }\n", | |
" };\n", | |
"}\n", | |
"\n", | |
"scope.google = scope.google || {};\n", | |
"scope.google.colab = scope.google.colab || {};\n", | |
"scope.google.colab._files = {\n", | |
" _uploadFiles,\n", | |
" _uploadFilesContinue,\n", | |
"};\n", | |
"})(self);\n", | |
"</script> " | |
] | |
}, | |
"metadata": {} | |
}, | |
{ | |
"output_type": "stream", | |
"name": "stdout", | |
"text": [ | |
"Saving client_secret_847187862506-4v0hjb96mkgqmb35d9gs6e4cb7l1c1sp.apps.googleusercontent.com.json to client_secret_847187862506-4v0hjb96mkgqmb35d9gs6e4cb7l1c1sp.apps.googleusercontent.com.json\n", | |
"Verifica tu cuenta en el siguiente enlace: https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=847187862506-4v0hjb96mkgqmb35d9gs6e4cb7l1c1sp.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fwebmasters.readonly&state=e3V7l8aJf30mvDLDNd8dSNPjBQwv3g&prompt=consent&access_type=offline\n", | |
"Introduce el código de verificación: 4/1AcvDMrCyN6XgaTEahrSs0zvKUSyEN6t5QgreBpKYqvCnrviFuOuHGi5_b3o\n", | |
"Getting Google Search Console...\n" | |
] | |
}, | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
" page \\\n", | |
"0 https://www.analistaseo.es/conversion/modelo-p... \n", | |
"1 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"5 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"6 https://www.analistaseo.es/google-api-indexing... \n", | |
"7 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"... ... \n", | |
"1399 https://www.analistaseo.es/conversion/neuromar... \n", | |
"1497 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"1728 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"1773 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"1560 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"\n", | |
" query clicks ctr impressions \\\n", | |
"0 modelo de probabilidad de elaboración 76 7.826982 971 \n", | |
"1 buscador semantico 50 7.485030 668 \n", | |
"5 navboost 25 4.901961 510 \n", | |
"6 google colab indexing api 21 0.264517 7939 \n", | |
"7 cynefin 16 0.410572 3897 \n", | |
"... ... ... ... ... \n", | |
"1399 neuromarketing barcelona 0 0.000000 3 \n", | |
"1497 análisis seo 0 0.000000 1 \n", | |
"1728 logeados 0 0.000000 1 \n", | |
"1773 link rel alternate hreflang 0 0.000000 60 \n", | |
"1560 ctr organico 0 0.000000 5 \n", | |
"\n", | |
" position \n", | |
"0 2.74 \n", | |
"1 2.46 \n", | |
"5 37.94 \n", | |
"6 7.90 \n", | |
"7 9.30 \n", | |
"... ... \n", | |
"1399 77.00 \n", | |
"1497 9.00 \n", | |
"1728 78.00 \n", | |
"1773 64.42 \n", | |
"1560 90.00 \n", | |
"\n", | |
"[89 rows x 6 columns]" | |
], | |
"text/html": [ | |
"\n", | |
" <div id=\"df-c45c98bd-dae2-4706-b057-e372e9e34c0d\" class=\"colab-df-container\">\n", | |
" <div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>page</th>\n", | |
" <th>query</th>\n", | |
" <th>clicks</th>\n", | |
" <th>ctr</th>\n", | |
" <th>impressions</th>\n", | |
" <th>position</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>https://www.analistaseo.es/conversion/modelo-p...</td>\n", | |
" <td>modelo de probabilidad de elaboración</td>\n", | |
" <td>76</td>\n", | |
" <td>7.826982</td>\n", | |
" <td>971</td>\n", | |
" <td>2.74</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>buscador semantico</td>\n", | |
" <td>50</td>\n", | |
" <td>7.485030</td>\n", | |
" <td>668</td>\n", | |
" <td>2.46</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>5</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>navboost</td>\n", | |
" <td>25</td>\n", | |
" <td>4.901961</td>\n", | |
" <td>510</td>\n", | |
" <td>37.94</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>6</th>\n", | |
" <td>https://www.analistaseo.es/google-api-indexing...</td>\n", | |
" <td>google colab indexing api</td>\n", | |
" <td>21</td>\n", | |
" <td>0.264517</td>\n", | |
" <td>7939</td>\n", | |
" <td>7.90</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>7</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>cynefin</td>\n", | |
" <td>16</td>\n", | |
" <td>0.410572</td>\n", | |
" <td>3897</td>\n", | |
" <td>9.30</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>...</th>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1399</th>\n", | |
" <td>https://www.analistaseo.es/conversion/neuromar...</td>\n", | |
" <td>neuromarketing barcelona</td>\n", | |
" <td>0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>3</td>\n", | |
" <td>77.00</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1497</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>análisis seo</td>\n", | |
" <td>0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>1</td>\n", | |
" <td>9.00</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1728</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>logeados</td>\n", | |
" <td>0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>1</td>\n", | |
" <td>78.00</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1773</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>link rel alternate hreflang</td>\n", | |
" <td>0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>60</td>\n", | |
" <td>64.42</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1560</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>ctr organico</td>\n", | |
" <td>0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>5</td>\n", | |
" <td>90.00</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"<p>89 rows × 6 columns</p>\n", | |
"</div>\n", | |
" <div class=\"colab-df-buttons\">\n", | |
"\n", | |
" <div class=\"colab-df-container\">\n", | |
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-c45c98bd-dae2-4706-b057-e372e9e34c0d')\"\n", | |
" title=\"Convert this dataframe to an interactive table.\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n", | |
" <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n", | |
" </svg>\n", | |
" </button>\n", | |
"\n", | |
" <style>\n", | |
" .colab-df-container {\n", | |
" display:flex;\n", | |
" gap: 12px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-convert {\n", | |
" background-color: #E8F0FE;\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: #1967D2;\n", | |
" height: 32px;\n", | |
" padding: 0 0 0 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-convert:hover {\n", | |
" background-color: #E2EBFA;\n", | |
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: #174EA6;\n", | |
" }\n", | |
"\n", | |
" .colab-df-buttons div {\n", | |
" margin-bottom: 4px;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-convert {\n", | |
" background-color: #3B4455;\n", | |
" fill: #D2E3FC;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-convert:hover {\n", | |
" background-color: #434B5C;\n", | |
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n", | |
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n", | |
" fill: #FFFFFF;\n", | |
" }\n", | |
" </style>\n", | |
"\n", | |
" <script>\n", | |
" const buttonEl =\n", | |
" document.querySelector('#df-c45c98bd-dae2-4706-b057-e372e9e34c0d button.colab-df-convert');\n", | |
" buttonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
"\n", | |
" async function convertToInteractive(key) {\n", | |
" const element = document.querySelector('#df-c45c98bd-dae2-4706-b057-e372e9e34c0d');\n", | |
" const dataTable =\n", | |
" await google.colab.kernel.invokeFunction('convertToInteractive',\n", | |
" [key], {});\n", | |
" if (!dataTable) return;\n", | |
"\n", | |
" const docLinkHtml = 'Like what you see? Visit the ' +\n", | |
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n", | |
" + ' to learn more about interactive tables.';\n", | |
" element.innerHTML = '';\n", | |
" dataTable['output_type'] = 'display_data';\n", | |
" await google.colab.output.renderOutput(dataTable, element);\n", | |
" const docLink = document.createElement('div');\n", | |
" docLink.innerHTML = docLinkHtml;\n", | |
" element.appendChild(docLink);\n", | |
" }\n", | |
" </script>\n", | |
" </div>\n", | |
"\n", | |
"\n", | |
"<div id=\"df-118d31d6-1f49-40b4-8686-8fcd044ad24f\">\n", | |
" <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-118d31d6-1f49-40b4-8686-8fcd044ad24f')\"\n", | |
" title=\"Suggest charts\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
"<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n", | |
" width=\"24px\">\n", | |
" <g>\n", | |
" <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n", | |
" </g>\n", | |
"</svg>\n", | |
" </button>\n", | |
"\n", | |
"<style>\n", | |
" .colab-df-quickchart {\n", | |
" --bg-color: #E8F0FE;\n", | |
" --fill-color: #1967D2;\n", | |
" --hover-bg-color: #E2EBFA;\n", | |
" --hover-fill-color: #174EA6;\n", | |
" --disabled-fill-color: #AAA;\n", | |
" --disabled-bg-color: #DDD;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-quickchart {\n", | |
" --bg-color: #3B4455;\n", | |
" --fill-color: #D2E3FC;\n", | |
" --hover-bg-color: #434B5C;\n", | |
" --hover-fill-color: #FFFFFF;\n", | |
" --disabled-bg-color: #3B4455;\n", | |
" --disabled-fill-color: #666;\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart {\n", | |
" background-color: var(--bg-color);\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: var(--fill-color);\n", | |
" height: 32px;\n", | |
" padding: 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart:hover {\n", | |
" background-color: var(--hover-bg-color);\n", | |
" box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: var(--button-hover-fill-color);\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart-complete:disabled,\n", | |
" .colab-df-quickchart-complete:disabled:hover {\n", | |
" background-color: var(--disabled-bg-color);\n", | |
" fill: var(--disabled-fill-color);\n", | |
" box-shadow: none;\n", | |
" }\n", | |
"\n", | |
" .colab-df-spinner {\n", | |
" border: 2px solid var(--fill-color);\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" animation:\n", | |
" spin 1s steps(1) infinite;\n", | |
" }\n", | |
"\n", | |
" @keyframes spin {\n", | |
" 0% {\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" border-left-color: var(--fill-color);\n", | |
" }\n", | |
" 20% {\n", | |
" border-color: transparent;\n", | |
" border-left-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" }\n", | |
" 30% {\n", | |
" border-color: transparent;\n", | |
" border-left-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" border-right-color: var(--fill-color);\n", | |
" }\n", | |
" 40% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" }\n", | |
" 60% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" }\n", | |
" 80% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" }\n", | |
" 90% {\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" }\n", | |
" }\n", | |
"</style>\n", | |
"\n", | |
" <script>\n", | |
" async function quickchart(key) {\n", | |
" const quickchartButtonEl =\n", | |
" document.querySelector('#' + key + ' button');\n", | |
" quickchartButtonEl.disabled = true; // To prevent multiple clicks.\n", | |
" quickchartButtonEl.classList.add('colab-df-spinner');\n", | |
" try {\n", | |
" const charts = await google.colab.kernel.invokeFunction(\n", | |
" 'suggestCharts', [key], {});\n", | |
" } catch (error) {\n", | |
" console.error('Error during call to suggestCharts:', error);\n", | |
" }\n", | |
" quickchartButtonEl.classList.remove('colab-df-spinner');\n", | |
" quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n", | |
" }\n", | |
" (() => {\n", | |
" let quickchartButtonEl =\n", | |
" document.querySelector('#df-118d31d6-1f49-40b4-8686-8fcd044ad24f button');\n", | |
" quickchartButtonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
" })();\n", | |
" </script>\n", | |
"</div>\n", | |
"\n", | |
" <div id=\"id_389f97f4-cfa3-4fb9-96b7-f0ae4b3c45eb\">\n", | |
" <style>\n", | |
" .colab-df-generate {\n", | |
" background-color: #E8F0FE;\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: #1967D2;\n", | |
" height: 32px;\n", | |
" padding: 0 0 0 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-generate:hover {\n", | |
" background-color: #E2EBFA;\n", | |
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: #174EA6;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-generate {\n", | |
" background-color: #3B4455;\n", | |
" fill: #D2E3FC;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-generate:hover {\n", | |
" background-color: #434B5C;\n", | |
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n", | |
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n", | |
" fill: #FFFFFF;\n", | |
" }\n", | |
" </style>\n", | |
" <button class=\"colab-df-generate\" onclick=\"generateWithVariable('df')\"\n", | |
" title=\"Generate code using this dataframe.\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n", | |
" width=\"24px\">\n", | |
" <path d=\"M7,19H8.4L18.45,9,17,7.55,7,17.6ZM5,21V16.75L18.45,3.32a2,2,0,0,1,2.83,0l1.4,1.43a1.91,1.91,0,0,1,.58,1.4,1.91,1.91,0,0,1-.58,1.4L9.25,21ZM18.45,9,17,7.55Zm-12,3A5.31,5.31,0,0,0,4.9,8.1,5.31,5.31,0,0,0,1,6.5,5.31,5.31,0,0,0,4.9,4.9,5.31,5.31,0,0,0,6.5,1,5.31,5.31,0,0,0,8.1,4.9,5.31,5.31,0,0,0,12,6.5,5.46,5.46,0,0,0,6.5,12Z\"/>\n", | |
" </svg>\n", | |
" </button>\n", | |
" <script>\n", | |
" (() => {\n", | |
" const buttonEl =\n", | |
" document.querySelector('#id_389f97f4-cfa3-4fb9-96b7-f0ae4b3c45eb button.colab-df-generate');\n", | |
" buttonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
"\n", | |
" buttonEl.onclick = () => {\n", | |
" google.colab.notebook.generateWithVariable('df');\n", | |
" }\n", | |
" })();\n", | |
" </script>\n", | |
" </div>\n", | |
"\n", | |
" </div>\n", | |
" </div>\n" | |
], | |
"application/vnd.google.colaboratory.intrinsic+json": { | |
"type": "dataframe", | |
"variable_name": "df", | |
"summary": "{\n \"name\": \"df\",\n \"rows\": 89,\n \"fields\": [\n {\n \"column\": \"page\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 89,\n \"samples\": [\n \"https://www.analistaseo.es/conversion/campanas-marketing-conductismo/\",\n \"https://www.analistaseo.es/analitica-web/comparativa-de-las-mejores-herramientas-para-medir-apps-moviles/\",\n \"https://www.analistaseo.es/posicionamiento-buscadores/seo-https/\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"query\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 86,\n \"samples\": [\n \"delcro\",\n \"modelo de probabilidad de elaboraci\\u00f3n\",\n \"xavier colomes\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"clicks\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 10,\n \"min\": 0,\n \"max\": 76,\n \"num_unique_values\": 14,\n \"samples\": [\n 4,\n 2,\n 76\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"ctr\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 15.025523422750847,\n \"min\": 0.0,\n \"max\": 100.0,\n \"num_unique_values\": 21,\n \"samples\": [\n 7.826982492276004,\n 0.2557544757033248,\n 100.0\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"impressions\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 937,\n \"min\": 1,\n \"max\": 7939,\n \"num_unique_values\": 43,\n \"samples\": [\n 7,\n 5,\n 3\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"position\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 34.170848457350296,\n \"min\": 1.0,\n \"max\": 132.57,\n \"num_unique_values\": 79,\n \"samples\": [\n 68.33,\n 2.74,\n 44.0\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}" | |
} | |
}, | |
"metadata": {}, | |
"execution_count": 5 | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"# Function to extract metadata from a URL\n", | |
"def get_meta(url):\n", | |
" try:\n", | |
" response = requests.get(url)\n", | |
" encoding = chardet.detect(response.content)['encoding']\n", | |
" if encoding:\n", | |
" page_content = response.content.decode(encoding)\n", | |
" else:\n", | |
" page_content = response.content\n", | |
" soup = BeautifulSoup(page_content, 'html.parser')\n", | |
" title = soup.find('title').get_text() if soup.find('title') else 'No title' # Get the title\n", | |
" meta = soup.select('meta[name=\"description\"]')[0].attrs[\"content\"] if soup.select('meta[name=\"description\"]') else 'No meta description' # Get the meta description\n", | |
" h1 = soup.find('h1').get_text() if soup.find('h1') else 'No h1' # Get the first h1\n", | |
" return title, meta, h1\n", | |
" except Exception as e:\n", | |
" return 'Error', 'Error', 'Error'\n", | |
"\n", | |
"# Apply the function and add the results to the DataFrame\n", | |
"df['title'], df['meta'], df['h1'] = zip(*df['page'].apply(get_meta))\n", | |
"df" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/", | |
"height": 597 | |
}, | |
"id": "uku2VWuqips-", | |
"outputId": "ead9cc8e-e4b9-4eb4-bfd0-a2c8f25aa86a" | |
}, | |
"execution_count": null, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
" page \\\n", | |
"0 https://www.analistaseo.es/conversion/modelo-p... \n", | |
"1 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"5 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"6 https://www.analistaseo.es/google-api-indexing... \n", | |
"7 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"... ... \n", | |
"1399 https://www.analistaseo.es/conversion/neuromar... \n", | |
"1497 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"1728 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"1773 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"1560 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"\n", | |
" query clicks ctr impressions \\\n", | |
"0 modelo de probabilidad de elaboración 76 7.826982 971 \n", | |
"1 buscador semantico 50 7.485030 668 \n", | |
"5 navboost 25 4.901961 510 \n", | |
"6 google colab indexing api 21 0.264517 7939 \n", | |
"7 cynefin 16 0.410572 3897 \n", | |
"... ... ... ... ... \n", | |
"1399 neuromarketing barcelona 0 0.000000 3 \n", | |
"1497 análisis seo 0 0.000000 1 \n", | |
"1728 logeados 0 0.000000 1 \n", | |
"1773 link rel alternate hreflang 0 0.000000 60 \n", | |
"1560 ctr organico 0 0.000000 5 \n", | |
"\n", | |
" position title \\\n", | |
"0 2.74 Modelo de Probabilidad de Elaboración y Persua... \n", | |
"1 2.46 Qué es un buscador semántico \n", | |
"5 37.94 Los algoritmos de Google al descubierto. Cómo ... \n", | |
"6 7.90 API Indexing Test with Google Colab \n", | |
"7 9.30 Aplicando el marco de Cynefin en la toma de de... \n", | |
"... ... ... \n", | |
"1399 77.00 Neuromarketing en eShow Barcelona 2014 \n", | |
"1497 9.00 Artículos de Posicionamiento en Buscadores (SEO) \n", | |
"1728 78.00 Búsqueda Segura en Google (SSL Search) \n", | |
"1773 64.42 Caso de éxito SEO Internacional con HrefLang \n", | |
"1560 90.00 Google AdWords y SEO - ¿Por qué sube el tráfic... \n", | |
"\n", | |
" meta \\\n", | |
"0 El Modelo de la Probabilidad de Elaboración, t... \n", | |
"1 Un buscador semántico es aquel que no da enlac... \n", | |
"5 \\nEn este artículo nos adentramos en el funcio... \n", | |
"6 No meta description \n", | |
"7 \\nTomar decisiones acertadas en el volátil mun... \n", | |
"... ... \n", | |
"1399 El 95% de nuestros pensamientos, emociones y a... \n", | |
"1497 No meta description \n", | |
"1728 Desde ayer todos los usuarios que se identifiq... \n", | |
"1773 El caso de éxito SEO que os enseño a continuac... \n", | |
"1560 ¿Por qué sube el tráfico orgánico cuando invie... \n", | |
"\n", | |
" h1 \n", | |
"0 Cómo usar el Modelo de la Probabilidad de Elab... \n", | |
"1 Qué es un buscador semántico \n", | |
"5 Los algoritmos de Google al descubierto. Cómo ... \n", | |
"6 API Indexing Test \n", | |
"7 Aplicando el marco de Cynefin en la toma de de... \n", | |
"... ... \n", | |
"1399 Neuromarketing en eShow Barcelona 2014 \n", | |
"1497 Artículos de SEO \n", | |
"1728 Búsqueda Segura en Google (SSL Search) \n", | |
"1773 Caso de éxito SEO Internacional con HrefLang \n", | |
"1560 Google AdWords y SEO ¿Por qué sube el tráfico ... \n", | |
"\n", | |
"[89 rows x 9 columns]" | |
], | |
"text/html": [ | |
"\n", | |
" <div id=\"df-12392039-d5f9-4ab0-b42f-31946515594a\" class=\"colab-df-container\">\n", | |
" <div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>page</th>\n", | |
" <th>query</th>\n", | |
" <th>clicks</th>\n", | |
" <th>ctr</th>\n", | |
" <th>impressions</th>\n", | |
" <th>position</th>\n", | |
" <th>title</th>\n", | |
" <th>meta</th>\n", | |
" <th>h1</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>https://www.analistaseo.es/conversion/modelo-p...</td>\n", | |
" <td>modelo de probabilidad de elaboración</td>\n", | |
" <td>76</td>\n", | |
" <td>7.826982</td>\n", | |
" <td>971</td>\n", | |
" <td>2.74</td>\n", | |
" <td>Modelo de Probabilidad de Elaboración y Persua...</td>\n", | |
" <td>El Modelo de la Probabilidad de Elaboración, t...</td>\n", | |
" <td>Cómo usar el Modelo de la Probabilidad de Elab...</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>buscador semantico</td>\n", | |
" <td>50</td>\n", | |
" <td>7.485030</td>\n", | |
" <td>668</td>\n", | |
" <td>2.46</td>\n", | |
" <td>Qué es un buscador semántico</td>\n", | |
" <td>Un buscador semántico es aquel que no da enlac...</td>\n", | |
" <td>Qué es un buscador semántico</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>5</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>navboost</td>\n", | |
" <td>25</td>\n", | |
" <td>4.901961</td>\n", | |
" <td>510</td>\n", | |
" <td>37.94</td>\n", | |
" <td>Los algoritmos de Google al descubierto. Cómo ...</td>\n", | |
" <td>\\nEn este artículo nos adentramos en el funcio...</td>\n", | |
" <td>Los algoritmos de Google al descubierto. Cómo ...</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>6</th>\n", | |
" <td>https://www.analistaseo.es/google-api-indexing...</td>\n", | |
" <td>google colab indexing api</td>\n", | |
" <td>21</td>\n", | |
" <td>0.264517</td>\n", | |
" <td>7939</td>\n", | |
" <td>7.90</td>\n", | |
" <td>API Indexing Test with Google Colab</td>\n", | |
" <td>No meta description</td>\n", | |
" <td>API Indexing Test</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>7</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>cynefin</td>\n", | |
" <td>16</td>\n", | |
" <td>0.410572</td>\n", | |
" <td>3897</td>\n", | |
" <td>9.30</td>\n", | |
" <td>Aplicando el marco de Cynefin en la toma de de...</td>\n", | |
" <td>\\nTomar decisiones acertadas en el volátil mun...</td>\n", | |
" <td>Aplicando el marco de Cynefin en la toma de de...</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>...</th>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1399</th>\n", | |
" <td>https://www.analistaseo.es/conversion/neuromar...</td>\n", | |
" <td>neuromarketing barcelona</td>\n", | |
" <td>0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>3</td>\n", | |
" <td>77.00</td>\n", | |
" <td>Neuromarketing en eShow Barcelona 2014</td>\n", | |
" <td>El 95% de nuestros pensamientos, emociones y a...</td>\n", | |
" <td>Neuromarketing en eShow Barcelona 2014</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1497</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>análisis seo</td>\n", | |
" <td>0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>1</td>\n", | |
" <td>9.00</td>\n", | |
" <td>Artículos de Posicionamiento en Buscadores (SEO)</td>\n", | |
" <td>No meta description</td>\n", | |
" <td>Artículos de SEO</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1728</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>logeados</td>\n", | |
" <td>0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>1</td>\n", | |
" <td>78.00</td>\n", | |
" <td>Búsqueda Segura en Google (SSL Search)</td>\n", | |
" <td>Desde ayer todos los usuarios que se identifiq...</td>\n", | |
" <td>Búsqueda Segura en Google (SSL Search)</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1773</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>link rel alternate hreflang</td>\n", | |
" <td>0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>60</td>\n", | |
" <td>64.42</td>\n", | |
" <td>Caso de éxito SEO Internacional con HrefLang</td>\n", | |
" <td>El caso de éxito SEO que os enseño a continuac...</td>\n", | |
" <td>Caso de éxito SEO Internacional con HrefLang</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1560</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>ctr organico</td>\n", | |
" <td>0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>5</td>\n", | |
" <td>90.00</td>\n", | |
" <td>Google AdWords y SEO - ¿Por qué sube el tráfic...</td>\n", | |
" <td>¿Por qué sube el tráfico orgánico cuando invie...</td>\n", | |
" <td>Google AdWords y SEO ¿Por qué sube el tráfico ...</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"<p>89 rows × 9 columns</p>\n", | |
"</div>\n", | |
" <div class=\"colab-df-buttons\">\n", | |
"\n", | |
" <div class=\"colab-df-container\">\n", | |
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-12392039-d5f9-4ab0-b42f-31946515594a')\"\n", | |
" title=\"Convert this dataframe to an interactive table.\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n", | |
" <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n", | |
" </svg>\n", | |
" </button>\n", | |
"\n", | |
" <style>\n", | |
" .colab-df-container {\n", | |
" display:flex;\n", | |
" gap: 12px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-convert {\n", | |
" background-color: #E8F0FE;\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: #1967D2;\n", | |
" height: 32px;\n", | |
" padding: 0 0 0 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-convert:hover {\n", | |
" background-color: #E2EBFA;\n", | |
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: #174EA6;\n", | |
" }\n", | |
"\n", | |
" .colab-df-buttons div {\n", | |
" margin-bottom: 4px;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-convert {\n", | |
" background-color: #3B4455;\n", | |
" fill: #D2E3FC;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-convert:hover {\n", | |
" background-color: #434B5C;\n", | |
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n", | |
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n", | |
" fill: #FFFFFF;\n", | |
" }\n", | |
" </style>\n", | |
"\n", | |
" <script>\n", | |
" const buttonEl =\n", | |
" document.querySelector('#df-12392039-d5f9-4ab0-b42f-31946515594a button.colab-df-convert');\n", | |
" buttonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
"\n", | |
" async function convertToInteractive(key) {\n", | |
" const element = document.querySelector('#df-12392039-d5f9-4ab0-b42f-31946515594a');\n", | |
" const dataTable =\n", | |
" await google.colab.kernel.invokeFunction('convertToInteractive',\n", | |
" [key], {});\n", | |
" if (!dataTable) return;\n", | |
"\n", | |
" const docLinkHtml = 'Like what you see? Visit the ' +\n", | |
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n", | |
" + ' to learn more about interactive tables.';\n", | |
" element.innerHTML = '';\n", | |
" dataTable['output_type'] = 'display_data';\n", | |
" await google.colab.output.renderOutput(dataTable, element);\n", | |
" const docLink = document.createElement('div');\n", | |
" docLink.innerHTML = docLinkHtml;\n", | |
" element.appendChild(docLink);\n", | |
" }\n", | |
" </script>\n", | |
" </div>\n", | |
"\n", | |
"\n", | |
"<div id=\"df-5e768d7f-6db4-4504-b56f-f184c5e4bbb7\">\n", | |
" <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-5e768d7f-6db4-4504-b56f-f184c5e4bbb7')\"\n", | |
" title=\"Suggest charts\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
"<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n", | |
" width=\"24px\">\n", | |
" <g>\n", | |
" <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n", | |
" </g>\n", | |
"</svg>\n", | |
" </button>\n", | |
"\n", | |
"<style>\n", | |
" .colab-df-quickchart {\n", | |
" --bg-color: #E8F0FE;\n", | |
" --fill-color: #1967D2;\n", | |
" --hover-bg-color: #E2EBFA;\n", | |
" --hover-fill-color: #174EA6;\n", | |
" --disabled-fill-color: #AAA;\n", | |
" --disabled-bg-color: #DDD;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-quickchart {\n", | |
" --bg-color: #3B4455;\n", | |
" --fill-color: #D2E3FC;\n", | |
" --hover-bg-color: #434B5C;\n", | |
" --hover-fill-color: #FFFFFF;\n", | |
" --disabled-bg-color: #3B4455;\n", | |
" --disabled-fill-color: #666;\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart {\n", | |
" background-color: var(--bg-color);\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: var(--fill-color);\n", | |
" height: 32px;\n", | |
" padding: 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart:hover {\n", | |
" background-color: var(--hover-bg-color);\n", | |
" box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: var(--button-hover-fill-color);\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart-complete:disabled,\n", | |
" .colab-df-quickchart-complete:disabled:hover {\n", | |
" background-color: var(--disabled-bg-color);\n", | |
" fill: var(--disabled-fill-color);\n", | |
" box-shadow: none;\n", | |
" }\n", | |
"\n", | |
" .colab-df-spinner {\n", | |
" border: 2px solid var(--fill-color);\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" animation:\n", | |
" spin 1s steps(1) infinite;\n", | |
" }\n", | |
"\n", | |
" @keyframes spin {\n", | |
" 0% {\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" border-left-color: var(--fill-color);\n", | |
" }\n", | |
" 20% {\n", | |
" border-color: transparent;\n", | |
" border-left-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" }\n", | |
" 30% {\n", | |
" border-color: transparent;\n", | |
" border-left-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" border-right-color: var(--fill-color);\n", | |
" }\n", | |
" 40% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" }\n", | |
" 60% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" }\n", | |
" 80% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" }\n", | |
" 90% {\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" }\n", | |
" }\n", | |
"</style>\n", | |
"\n", | |
" <script>\n", | |
" async function quickchart(key) {\n", | |
" const quickchartButtonEl =\n", | |
" document.querySelector('#' + key + ' button');\n", | |
" quickchartButtonEl.disabled = true; // To prevent multiple clicks.\n", | |
" quickchartButtonEl.classList.add('colab-df-spinner');\n", | |
" try {\n", | |
" const charts = await google.colab.kernel.invokeFunction(\n", | |
" 'suggestCharts', [key], {});\n", | |
" } catch (error) {\n", | |
" console.error('Error during call to suggestCharts:', error);\n", | |
" }\n", | |
" quickchartButtonEl.classList.remove('colab-df-spinner');\n", | |
" quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n", | |
" }\n", | |
" (() => {\n", | |
" let quickchartButtonEl =\n", | |
" document.querySelector('#df-5e768d7f-6db4-4504-b56f-f184c5e4bbb7 button');\n", | |
" quickchartButtonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
" })();\n", | |
" </script>\n", | |
"</div>\n", | |
"\n", | |
" <div id=\"id_4f83d3fe-de24-4624-b178-a20db5b2ee69\">\n", | |
" <style>\n", | |
" .colab-df-generate {\n", | |
" background-color: #E8F0FE;\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: #1967D2;\n", | |
" height: 32px;\n", | |
" padding: 0 0 0 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-generate:hover {\n", | |
" background-color: #E2EBFA;\n", | |
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: #174EA6;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-generate {\n", | |
" background-color: #3B4455;\n", | |
" fill: #D2E3FC;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-generate:hover {\n", | |
" background-color: #434B5C;\n", | |
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n", | |
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n", | |
" fill: #FFFFFF;\n", | |
" }\n", | |
" </style>\n", | |
" <button class=\"colab-df-generate\" onclick=\"generateWithVariable('df')\"\n", | |
" title=\"Generate code using this dataframe.\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n", | |
" width=\"24px\">\n", | |
" <path d=\"M7,19H8.4L18.45,9,17,7.55,7,17.6ZM5,21V16.75L18.45,3.32a2,2,0,0,1,2.83,0l1.4,1.43a1.91,1.91,0,0,1,.58,1.4,1.91,1.91,0,0,1-.58,1.4L9.25,21ZM18.45,9,17,7.55Zm-12,3A5.31,5.31,0,0,0,4.9,8.1,5.31,5.31,0,0,0,1,6.5,5.31,5.31,0,0,0,4.9,4.9,5.31,5.31,0,0,0,6.5,1,5.31,5.31,0,0,0,8.1,4.9,5.31,5.31,0,0,0,12,6.5,5.46,5.46,0,0,0,6.5,12Z\"/>\n", | |
" </svg>\n", | |
" </button>\n", | |
" <script>\n", | |
" (() => {\n", | |
" const buttonEl =\n", | |
" document.querySelector('#id_4f83d3fe-de24-4624-b178-a20db5b2ee69 button.colab-df-generate');\n", | |
" buttonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
"\n", | |
" buttonEl.onclick = () => {\n", | |
" google.colab.notebook.generateWithVariable('df');\n", | |
" }\n", | |
" })();\n", | |
" </script>\n", | |
" </div>\n", | |
"\n", | |
" </div>\n", | |
" </div>\n" | |
], | |
"application/vnd.google.colaboratory.intrinsic+json": { | |
"type": "dataframe", | |
"variable_name": "df", | |
"summary": "{\n \"name\": \"df\",\n \"rows\": 89,\n \"fields\": [\n {\n \"column\": \"page\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 89,\n \"samples\": [\n \"https://www.analistaseo.es/conversion/campanas-marketing-conductismo/\",\n \"https://www.analistaseo.es/analitica-web/comparativa-de-las-mejores-herramientas-para-medir-apps-moviles/\",\n \"https://www.analistaseo.es/posicionamiento-buscadores/seo-https/\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"query\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 86,\n \"samples\": [\n \"delcro\",\n \"modelo de probabilidad de elaboraci\\u00f3n\",\n \"xavier colomes\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"clicks\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 10,\n \"min\": 0,\n \"max\": 76,\n \"num_unique_values\": 14,\n \"samples\": [\n 4,\n 2,\n 76\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"ctr\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 15.025523422750847,\n \"min\": 0.0,\n \"max\": 100.0,\n \"num_unique_values\": 21,\n \"samples\": [\n 7.826982492276004,\n 0.2557544757033248,\n 100.0\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"impressions\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 937,\n \"min\": 1,\n \"max\": 7939,\n \"num_unique_values\": 43,\n \"samples\": [\n 7,\n 5,\n 3\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"position\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 34.170848457350296,\n \"min\": 1.0,\n \"max\": 132.57,\n \"num_unique_values\": 79,\n \"samples\": [\n 68.33,\n 2.74,\n 44.0\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"title\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 89,\n \"samples\": [\n \"Mejora tus campa\\u00c3\\u00b1as de marketing mediante el conductismo\",\n \"Comparativa de las mejores herramientas para medir Apps m\\u00f3viles\",\n \"SEO, HTTPS y la desinformaci\\u00f3n\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"meta\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 85,\n \"samples\": [\n \"El cerebro toma decisiones de dos formas distintas: consciente e inconscientemente. Se sabe que entre el 85% y el 95% de las decisiones que tomamos son de \",\n \"El Modelo de la Probabilidad de Elaboraci\\u00f3n, tambi\\u00e9n conocido como Elaboration Likelihood Model (ELM), trata de\\u00a0c\\u00f3mo tenemos que comunicar para persuad\",\n \"En la cuarta edici\\u00f3n del Clinic SEO analizaron TopRural, la web l\\u00edder en turismo rural. Para ello contamos con la presencia de los ponentes:\\n-\\u00a0\\u00a0\\u00a0\\u00a0\\u00a0\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"h1\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 89,\n \"samples\": [\n \"Mejora tus campa\\u00c3\\u00b1as de marketing mediante el conductismo\",\n \"Comparativa de las mejores herramientas para medir Apps m\\u00f3viles\",\n \"SEO, HTTPS y la desinformaci\\u00f3n\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}" | |
} | |
}, | |
"metadata": {}, | |
"execution_count": 6 | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"lang = 'spanish' # Language for stopwords\n", | |
"\n", | |
"# Function to clean text\n", | |
"def clean_text(text):\n", | |
" text = str(text).lower().strip()\n", | |
" text = re.sub(r'\\d+', '', text)\n", | |
" text = re.sub(r'[^\\w\\s]', '', text)\n", | |
" text = re.sub(r'\\s+', ' ', text)\n", | |
" text = unicodedata.normalize('NFKD', text).encode('ascii', errors='ignore').decode('utf-8')\n", | |
"\n", | |
" stop_words = set(stopwords.words(lang))\n", | |
" words = text.split()\n", | |
" words_cleaned = [word for word in words if word.lower() not in stop_words]\n", | |
" return ' '.join(words_cleaned)\n", | |
"\n", | |
"# Clean specified columns\n", | |
"columns_to_clean = ['title', 'meta', 'h1', 'query']\n", | |
"\n", | |
"for column in columns_to_clean:\n", | |
" df[column + '_clean'] = df[column].apply(clean_text)\n", | |
"\n", | |
"df" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/", | |
"height": 2703 | |
}, | |
"id": "d-zkleFInO_m", | |
"outputId": "d502bf19-3328-494c-e09d-cd2838665f0c" | |
}, | |
"execution_count": null, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
" page \\\n", | |
"0 https://www.analistaseo.es/conversion/modelo-p... \n", | |
"1 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"5 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"6 https://www.analistaseo.es/google-api-indexing... \n", | |
"7 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"... ... \n", | |
"1399 https://www.analistaseo.es/conversion/neuromar... \n", | |
"1497 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"1728 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"1773 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"1560 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"\n", | |
" query clicks ctr impressions \\\n", | |
"0 modelo de probabilidad de elaboración 76 7.826982 971 \n", | |
"1 buscador semantico 50 7.485030 668 \n", | |
"5 navboost 25 4.901961 510 \n", | |
"6 google colab indexing api 21 0.264517 7939 \n", | |
"7 cynefin 16 0.410572 3897 \n", | |
"... ... ... ... ... \n", | |
"1399 neuromarketing barcelona 0 0.000000 3 \n", | |
"1497 análisis seo 0 0.000000 1 \n", | |
"1728 logeados 0 0.000000 1 \n", | |
"1773 link rel alternate hreflang 0 0.000000 60 \n", | |
"1560 ctr organico 0 0.000000 5 \n", | |
"\n", | |
" position title \\\n", | |
"0 2.74 Modelo de Probabilidad de Elaboración y Persua... \n", | |
"1 2.46 Qué es un buscador semántico \n", | |
"5 37.94 Los algoritmos de Google al descubierto. Cómo ... \n", | |
"6 7.90 API Indexing Test with Google Colab \n", | |
"7 9.30 Aplicando el marco de Cynefin en la toma de de... \n", | |
"... ... ... \n", | |
"1399 77.00 Neuromarketing en eShow Barcelona 2014 \n", | |
"1497 9.00 Artículos de Posicionamiento en Buscadores (SEO) \n", | |
"1728 78.00 Búsqueda Segura en Google (SSL Search) \n", | |
"1773 64.42 Caso de éxito SEO Internacional con HrefLang \n", | |
"1560 90.00 Google AdWords y SEO - ¿Por qué sube el tráfic... \n", | |
"\n", | |
" meta \\\n", | |
"0 El Modelo de la Probabilidad de Elaboración, t... \n", | |
"1 Un buscador semántico es aquel que no da enlac... \n", | |
"5 \\nEn este artículo nos adentramos en el funcio... \n", | |
"6 No meta description \n", | |
"7 \\nTomar decisiones acertadas en el volátil mun... \n", | |
"... ... \n", | |
"1399 El 95% de nuestros pensamientos, emociones y a... \n", | |
"1497 No meta description \n", | |
"1728 Desde ayer todos los usuarios que se identifiq... \n", | |
"1773 El caso de éxito SEO que os enseño a continuac... \n", | |
"1560 ¿Por qué sube el tráfico orgánico cuando invie... \n", | |
"\n", | |
" h1 \\\n", | |
"0 Cómo usar el Modelo de la Probabilidad de Elab... \n", | |
"1 Qué es un buscador semántico \n", | |
"5 Los algoritmos de Google al descubierto. Cómo ... \n", | |
"6 API Indexing Test \n", | |
"7 Aplicando el marco de Cynefin en la toma de de... \n", | |
"... ... \n", | |
"1399 Neuromarketing en eShow Barcelona 2014 \n", | |
"1497 Artículos de SEO \n", | |
"1728 Búsqueda Segura en Google (SSL Search) \n", | |
"1773 Caso de éxito SEO Internacional con HrefLang \n", | |
"1560 Google AdWords y SEO ¿Por qué sube el tráfico ... \n", | |
"\n", | |
" title_clean \\\n", | |
"0 modelo probabilidad elaboracion persuasion web \n", | |
"1 buscador semantico \n", | |
"5 algoritmos google descubierto funciona buscado... \n", | |
"6 api indexing test with google colab \n", | |
"7 aplicando marco cynefin toma decisiones gestio... \n", | |
"... ... \n", | |
"1399 neuromarketing eshow barcelona \n", | |
"1497 articulos posicionamiento buscadores seo \n", | |
"1728 busqueda segura google ssl search \n", | |
"1773 caso exito seo internacional hreflang \n", | |
"1560 google adwords seo sube trafico organico \n", | |
"\n", | |
" meta_clean \\\n", | |
"0 modelo probabilidad elaboracion tambien conoci... \n", | |
"1 buscador semantico aquel da enlaces clasificad... \n", | |
"5 articulo adentramos funcionamiento interno goo... \n", | |
"6 meta description \n", | |
"7 tomar decisiones acertadas volatil mundo seo p... \n", | |
"... ... \n", | |
"1399 pensamientos emociones aprendizajes ocurren fo... \n", | |
"1497 meta description \n", | |
"1728 ayer usuarios identifiquen version com google ... \n", | |
"1773 caso exito seo enseno continuacion muestra imp... \n", | |
"1560 sube trafico organico invierto adwordsmejoran ... \n", | |
"\n", | |
" h1_clean \\\n", | |
"0 usar modelo probabilidad elaboracion persuadir... \n", | |
"1 buscador semantico \n", | |
"5 algoritmos google descubierto funciona buscado... \n", | |
"6 api indexing test \n", | |
"7 aplicando marco cynefin toma decisiones gestio... \n", | |
"... ... \n", | |
"1399 neuromarketing eshow barcelona \n", | |
"1497 articulos seo \n", | |
"1728 busqueda segura google ssl search \n", | |
"1773 caso exito seo internacional hreflang \n", | |
"1560 google adwords seo sube trafico organico \n", | |
"\n", | |
" query_clean \n", | |
"0 modelo probabilidad elaboracion \n", | |
"1 buscador semantico \n", | |
"5 navboost \n", | |
"6 google colab indexing api \n", | |
"7 cynefin \n", | |
"... ... \n", | |
"1399 neuromarketing barcelona \n", | |
"1497 analisis seo \n", | |
"1728 logeados \n", | |
"1773 link rel alternate hreflang \n", | |
"1560 ctr organico \n", | |
"\n", | |
"[89 rows x 13 columns]" | |
], | |
"text/html": [ | |
"\n", | |
" <div id=\"df-c6ee9dc5-d7c6-4d5d-8897-ac0ca73c798b\" class=\"colab-df-container\">\n", | |
" <div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>page</th>\n", | |
" <th>query</th>\n", | |
" <th>clicks</th>\n", | |
" <th>ctr</th>\n", | |
" <th>impressions</th>\n", | |
" <th>position</th>\n", | |
" <th>title</th>\n", | |
" <th>meta</th>\n", | |
" <th>h1</th>\n", | |
" <th>title_clean</th>\n", | |
" <th>meta_clean</th>\n", | |
" <th>h1_clean</th>\n", | |
" <th>query_clean</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>https://www.analistaseo.es/conversion/modelo-p...</td>\n", | |
" <td>modelo de probabilidad de elaboración</td>\n", | |
" <td>76</td>\n", | |
" <td>7.826982</td>\n", | |
" <td>971</td>\n", | |
" <td>2.74</td>\n", | |
" <td>Modelo de Probabilidad de Elaboración y Persua...</td>\n", | |
" <td>El Modelo de la Probabilidad de Elaboración, t...</td>\n", | |
" <td>Cómo usar el Modelo de la Probabilidad de Elab...</td>\n", | |
" <td>modelo probabilidad elaboracion persuasion web</td>\n", | |
" <td>modelo probabilidad elaboracion tambien conoci...</td>\n", | |
" <td>usar modelo probabilidad elaboracion persuadir...</td>\n", | |
" <td>modelo probabilidad elaboracion</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>buscador semantico</td>\n", | |
" <td>50</td>\n", | |
" <td>7.485030</td>\n", | |
" <td>668</td>\n", | |
" <td>2.46</td>\n", | |
" <td>Qué es un buscador semántico</td>\n", | |
" <td>Un buscador semántico es aquel que no da enlac...</td>\n", | |
" <td>Qué es un buscador semántico</td>\n", | |
" <td>buscador semantico</td>\n", | |
" <td>buscador semantico aquel da enlaces clasificad...</td>\n", | |
" <td>buscador semantico</td>\n", | |
" <td>buscador semantico</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>5</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>navboost</td>\n", | |
" <td>25</td>\n", | |
" <td>4.901961</td>\n", | |
" <td>510</td>\n", | |
" <td>37.94</td>\n", | |
" <td>Los algoritmos de Google al descubierto. Cómo ...</td>\n", | |
" <td>\\nEn este artículo nos adentramos en el funcio...</td>\n", | |
" <td>Los algoritmos de Google al descubierto. Cómo ...</td>\n", | |
" <td>algoritmos google descubierto funciona buscado...</td>\n", | |
" <td>articulo adentramos funcionamiento interno goo...</td>\n", | |
" <td>algoritmos google descubierto funciona buscado...</td>\n", | |
" <td>navboost</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>6</th>\n", | |
" <td>https://www.analistaseo.es/google-api-indexing...</td>\n", | |
" <td>google colab indexing api</td>\n", | |
" <td>21</td>\n", | |
" <td>0.264517</td>\n", | |
" <td>7939</td>\n", | |
" <td>7.90</td>\n", | |
" <td>API Indexing Test with Google Colab</td>\n", | |
" <td>No meta description</td>\n", | |
" <td>API Indexing Test</td>\n", | |
" <td>api indexing test with google colab</td>\n", | |
" <td>meta description</td>\n", | |
" <td>api indexing test</td>\n", | |
" <td>google colab indexing api</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>7</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>cynefin</td>\n", | |
" <td>16</td>\n", | |
" <td>0.410572</td>\n", | |
" <td>3897</td>\n", | |
" <td>9.30</td>\n", | |
" <td>Aplicando el marco de Cynefin en la toma de de...</td>\n", | |
" <td>\\nTomar decisiones acertadas en el volátil mun...</td>\n", | |
" <td>Aplicando el marco de Cynefin en la toma de de...</td>\n", | |
" <td>aplicando marco cynefin toma decisiones gestio...</td>\n", | |
" <td>tomar decisiones acertadas volatil mundo seo p...</td>\n", | |
" <td>aplicando marco cynefin toma decisiones gestio...</td>\n", | |
" <td>cynefin</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>...</th>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1399</th>\n", | |
" <td>https://www.analistaseo.es/conversion/neuromar...</td>\n", | |
" <td>neuromarketing barcelona</td>\n", | |
" <td>0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>3</td>\n", | |
" <td>77.00</td>\n", | |
" <td>Neuromarketing en eShow Barcelona 2014</td>\n", | |
" <td>El 95% de nuestros pensamientos, emociones y a...</td>\n", | |
" <td>Neuromarketing en eShow Barcelona 2014</td>\n", | |
" <td>neuromarketing eshow barcelona</td>\n", | |
" <td>pensamientos emociones aprendizajes ocurren fo...</td>\n", | |
" <td>neuromarketing eshow barcelona</td>\n", | |
" <td>neuromarketing barcelona</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1497</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>análisis seo</td>\n", | |
" <td>0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>1</td>\n", | |
" <td>9.00</td>\n", | |
" <td>Artículos de Posicionamiento en Buscadores (SEO)</td>\n", | |
" <td>No meta description</td>\n", | |
" <td>Artículos de SEO</td>\n", | |
" <td>articulos posicionamiento buscadores seo</td>\n", | |
" <td>meta description</td>\n", | |
" <td>articulos seo</td>\n", | |
" <td>analisis seo</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1728</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>logeados</td>\n", | |
" <td>0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>1</td>\n", | |
" <td>78.00</td>\n", | |
" <td>Búsqueda Segura en Google (SSL Search)</td>\n", | |
" <td>Desde ayer todos los usuarios que se identifiq...</td>\n", | |
" <td>Búsqueda Segura en Google (SSL Search)</td>\n", | |
" <td>busqueda segura google ssl search</td>\n", | |
" <td>ayer usuarios identifiquen version com google ...</td>\n", | |
" <td>busqueda segura google ssl search</td>\n", | |
" <td>logeados</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1773</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>link rel alternate hreflang</td>\n", | |
" <td>0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>60</td>\n", | |
" <td>64.42</td>\n", | |
" <td>Caso de éxito SEO Internacional con HrefLang</td>\n", | |
" <td>El caso de éxito SEO que os enseño a continuac...</td>\n", | |
" <td>Caso de éxito SEO Internacional con HrefLang</td>\n", | |
" <td>caso exito seo internacional hreflang</td>\n", | |
" <td>caso exito seo enseno continuacion muestra imp...</td>\n", | |
" <td>caso exito seo internacional hreflang</td>\n", | |
" <td>link rel alternate hreflang</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1560</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>ctr organico</td>\n", | |
" <td>0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>5</td>\n", | |
" <td>90.00</td>\n", | |
" <td>Google AdWords y SEO - ¿Por qué sube el tráfic...</td>\n", | |
" <td>¿Por qué sube el tráfico orgánico cuando invie...</td>\n", | |
" <td>Google AdWords y SEO ¿Por qué sube el tráfico ...</td>\n", | |
" <td>google adwords seo sube trafico organico</td>\n", | |
" <td>sube trafico organico invierto adwordsmejoran ...</td>\n", | |
" <td>google adwords seo sube trafico organico</td>\n", | |
" <td>ctr organico</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"<p>89 rows × 13 columns</p>\n", | |
"</div>\n", | |
" <div class=\"colab-df-buttons\">\n", | |
"\n", | |
" <div class=\"colab-df-container\">\n", | |
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-c6ee9dc5-d7c6-4d5d-8897-ac0ca73c798b')\"\n", | |
" title=\"Convert this dataframe to an interactive table.\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n", | |
" <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n", | |
" </svg>\n", | |
" </button>\n", | |
"\n", | |
" <style>\n", | |
" .colab-df-container {\n", | |
" display:flex;\n", | |
" gap: 12px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-convert {\n", | |
" background-color: #E8F0FE;\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: #1967D2;\n", | |
" height: 32px;\n", | |
" padding: 0 0 0 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-convert:hover {\n", | |
" background-color: #E2EBFA;\n", | |
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: #174EA6;\n", | |
" }\n", | |
"\n", | |
" .colab-df-buttons div {\n", | |
" margin-bottom: 4px;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-convert {\n", | |
" background-color: #3B4455;\n", | |
" fill: #D2E3FC;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-convert:hover {\n", | |
" background-color: #434B5C;\n", | |
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n", | |
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n", | |
" fill: #FFFFFF;\n", | |
" }\n", | |
" </style>\n", | |
"\n", | |
" <script>\n", | |
" const buttonEl =\n", | |
" document.querySelector('#df-c6ee9dc5-d7c6-4d5d-8897-ac0ca73c798b button.colab-df-convert');\n", | |
" buttonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
"\n", | |
" async function convertToInteractive(key) {\n", | |
" const element = document.querySelector('#df-c6ee9dc5-d7c6-4d5d-8897-ac0ca73c798b');\n", | |
" const dataTable =\n", | |
" await google.colab.kernel.invokeFunction('convertToInteractive',\n", | |
" [key], {});\n", | |
" if (!dataTable) return;\n", | |
"\n", | |
" const docLinkHtml = 'Like what you see? Visit the ' +\n", | |
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n", | |
" + ' to learn more about interactive tables.';\n", | |
" element.innerHTML = '';\n", | |
" dataTable['output_type'] = 'display_data';\n", | |
" await google.colab.output.renderOutput(dataTable, element);\n", | |
" const docLink = document.createElement('div');\n", | |
" docLink.innerHTML = docLinkHtml;\n", | |
" element.appendChild(docLink);\n", | |
" }\n", | |
" </script>\n", | |
" </div>\n", | |
"\n", | |
"\n", | |
"<div id=\"df-00f7b464-513a-4520-8800-d7c51433f68f\">\n", | |
" <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-00f7b464-513a-4520-8800-d7c51433f68f')\"\n", | |
" title=\"Suggest charts\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
"<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n", | |
" width=\"24px\">\n", | |
" <g>\n", | |
" <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n", | |
" </g>\n", | |
"</svg>\n", | |
" </button>\n", | |
"\n", | |
"<style>\n", | |
" .colab-df-quickchart {\n", | |
" --bg-color: #E8F0FE;\n", | |
" --fill-color: #1967D2;\n", | |
" --hover-bg-color: #E2EBFA;\n", | |
" --hover-fill-color: #174EA6;\n", | |
" --disabled-fill-color: #AAA;\n", | |
" --disabled-bg-color: #DDD;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-quickchart {\n", | |
" --bg-color: #3B4455;\n", | |
" --fill-color: #D2E3FC;\n", | |
" --hover-bg-color: #434B5C;\n", | |
" --hover-fill-color: #FFFFFF;\n", | |
" --disabled-bg-color: #3B4455;\n", | |
" --disabled-fill-color: #666;\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart {\n", | |
" background-color: var(--bg-color);\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: var(--fill-color);\n", | |
" height: 32px;\n", | |
" padding: 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart:hover {\n", | |
" background-color: var(--hover-bg-color);\n", | |
" box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: var(--button-hover-fill-color);\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart-complete:disabled,\n", | |
" .colab-df-quickchart-complete:disabled:hover {\n", | |
" background-color: var(--disabled-bg-color);\n", | |
" fill: var(--disabled-fill-color);\n", | |
" box-shadow: none;\n", | |
" }\n", | |
"\n", | |
" .colab-df-spinner {\n", | |
" border: 2px solid var(--fill-color);\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" animation:\n", | |
" spin 1s steps(1) infinite;\n", | |
" }\n", | |
"\n", | |
" @keyframes spin {\n", | |
" 0% {\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" border-left-color: var(--fill-color);\n", | |
" }\n", | |
" 20% {\n", | |
" border-color: transparent;\n", | |
" border-left-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" }\n", | |
" 30% {\n", | |
" border-color: transparent;\n", | |
" border-left-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" border-right-color: var(--fill-color);\n", | |
" }\n", | |
" 40% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" }\n", | |
" 60% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" }\n", | |
" 80% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" }\n", | |
" 90% {\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" }\n", | |
" }\n", | |
"</style>\n", | |
"\n", | |
" <script>\n", | |
" async function quickchart(key) {\n", | |
" const quickchartButtonEl =\n", | |
" document.querySelector('#' + key + ' button');\n", | |
" quickchartButtonEl.disabled = true; // To prevent multiple clicks.\n", | |
" quickchartButtonEl.classList.add('colab-df-spinner');\n", | |
" try {\n", | |
" const charts = await google.colab.kernel.invokeFunction(\n", | |
" 'suggestCharts', [key], {});\n", | |
" } catch (error) {\n", | |
" console.error('Error during call to suggestCharts:', error);\n", | |
" }\n", | |
" quickchartButtonEl.classList.remove('colab-df-spinner');\n", | |
" quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n", | |
" }\n", | |
" (() => {\n", | |
" let quickchartButtonEl =\n", | |
" document.querySelector('#df-00f7b464-513a-4520-8800-d7c51433f68f button');\n", | |
" quickchartButtonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
" })();\n", | |
" </script>\n", | |
"</div>\n", | |
"\n", | |
" <div id=\"id_ecb04a43-6e26-4843-bbba-0c6c19dc0b8d\">\n", | |
" <style>\n", | |
" .colab-df-generate {\n", | |
" background-color: #E8F0FE;\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: #1967D2;\n", | |
" height: 32px;\n", | |
" padding: 0 0 0 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-generate:hover {\n", | |
" background-color: #E2EBFA;\n", | |
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: #174EA6;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-generate {\n", | |
" background-color: #3B4455;\n", | |
" fill: #D2E3FC;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-generate:hover {\n", | |
" background-color: #434B5C;\n", | |
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n", | |
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n", | |
" fill: #FFFFFF;\n", | |
" }\n", | |
" </style>\n", | |
" <button class=\"colab-df-generate\" onclick=\"generateWithVariable('df')\"\n", | |
" title=\"Generate code using this dataframe.\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n", | |
" width=\"24px\">\n", | |
" <path d=\"M7,19H8.4L18.45,9,17,7.55,7,17.6ZM5,21V16.75L18.45,3.32a2,2,0,0,1,2.83,0l1.4,1.43a1.91,1.91,0,0,1,.58,1.4,1.91,1.91,0,0,1-.58,1.4L9.25,21ZM18.45,9,17,7.55Zm-12,3A5.31,5.31,0,0,0,4.9,8.1,5.31,5.31,0,0,0,1,6.5,5.31,5.31,0,0,0,4.9,4.9,5.31,5.31,0,0,0,6.5,1,5.31,5.31,0,0,0,8.1,4.9,5.31,5.31,0,0,0,12,6.5,5.46,5.46,0,0,0,6.5,12Z\"/>\n", | |
" </svg>\n", | |
" </button>\n", | |
" <script>\n", | |
" (() => {\n", | |
" const buttonEl =\n", | |
" document.querySelector('#id_ecb04a43-6e26-4843-bbba-0c6c19dc0b8d button.colab-df-generate');\n", | |
" buttonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
"\n", | |
" buttonEl.onclick = () => {\n", | |
" google.colab.notebook.generateWithVariable('df');\n", | |
" }\n", | |
" })();\n", | |
" </script>\n", | |
" </div>\n", | |
"\n", | |
" </div>\n", | |
" </div>\n" | |
], | |
"application/vnd.google.colaboratory.intrinsic+json": { | |
"type": "dataframe", | |
"variable_name": "df", | |
"summary": "{\n \"name\": \"df\",\n \"rows\": 89,\n \"fields\": [\n {\n \"column\": \"page\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 89,\n \"samples\": [\n \"https://www.analistaseo.es/conversion/campanas-marketing-conductismo/\",\n \"https://www.analistaseo.es/analitica-web/comparativa-de-las-mejores-herramientas-para-medir-apps-moviles/\",\n \"https://www.analistaseo.es/posicionamiento-buscadores/seo-https/\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"query\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 86,\n \"samples\": [\n \"delcro\",\n \"modelo de probabilidad de elaboraci\\u00f3n\",\n \"xavier colomes\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"clicks\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 10,\n \"min\": 0,\n \"max\": 76,\n \"num_unique_values\": 14,\n \"samples\": [\n 4,\n 2,\n 76\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"ctr\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 15.025523422750847,\n \"min\": 0.0,\n \"max\": 100.0,\n \"num_unique_values\": 21,\n \"samples\": [\n 7.826982492276004,\n 0.2557544757033248,\n 100.0\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"impressions\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 937,\n \"min\": 1,\n \"max\": 7939,\n \"num_unique_values\": 43,\n \"samples\": [\n 7,\n 5,\n 3\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"position\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 34.170848457350296,\n \"min\": 1.0,\n \"max\": 132.57,\n \"num_unique_values\": 79,\n \"samples\": [\n 68.33,\n 2.74,\n 44.0\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"title\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 89,\n \"samples\": [\n \"Mejora tus campa\\u00c3\\u00b1as de marketing mediante el conductismo\",\n \"Comparativa de las mejores herramientas para medir Apps m\\u00f3viles\",\n \"SEO, HTTPS y la desinformaci\\u00f3n\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"meta\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 85,\n \"samples\": [\n \"El cerebro toma decisiones de dos formas distintas: consciente e inconscientemente. Se sabe que entre el 85% y el 95% de las decisiones que tomamos son de \",\n \"El Modelo de la Probabilidad de Elaboraci\\u00f3n, tambi\\u00e9n conocido como Elaboration Likelihood Model (ELM), trata de\\u00a0c\\u00f3mo tenemos que comunicar para persuad\",\n \"En la cuarta edici\\u00f3n del Clinic SEO analizaron TopRural, la web l\\u00edder en turismo rural. Para ello contamos con la presencia de los ponentes:\\n-\\u00a0\\u00a0\\u00a0\\u00a0\\u00a0\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"h1\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 89,\n \"samples\": [\n \"Mejora tus campa\\u00c3\\u00b1as de marketing mediante el conductismo\",\n \"Comparativa de las mejores herramientas para medir Apps m\\u00f3viles\",\n \"SEO, HTTPS y la desinformaci\\u00f3n\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"title_clean\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 89,\n \"samples\": [\n \"mejora campaaas marketing mediante conductismo\",\n \"comparativa mejores herramientas medir apps moviles\",\n \"seo https desinformacion\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"meta_clean\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 85,\n \"samples\": [\n \"cerebro toma decisiones dos formas distintas consciente inconscientemente sabe decisiones tomamos\",\n \"modelo probabilidad elaboracion tambien conocido elaboration likelihood model elm trata comunicar persuad\",\n \"cuarta edicion clinic seo analizaron toprural web lider turismo rural ello contamos presencia ponentes\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"h1_clean\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 89,\n \"samples\": [\n \"mejora campaaas marketing mediante conductismo\",\n \"comparativa mejores herramientas medir apps moviles\",\n \"seo https desinformacion\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"query_clean\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 86,\n \"samples\": [\n \"delcro\",\n \"modelo probabilidad elaboracion\",\n \"xavier colomes\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}" | |
} | |
}, | |
"metadata": {}, | |
"execution_count": 7 | |
} | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"# Fuzzy matching to compute similarity with token_set_ratio https://pypi.org/project/fuzzywuzzy/\n", | |
"\n", | |
"columns = ['title_clean', 'meta_clean', 'h1_clean']\n", | |
"\n", | |
"for col in columns:\n", | |
" similarity = []\n", | |
" for index, row in df.iterrows():\n", | |
" sim = fuzz.token_set_ratio(row['query_clean'], row[col])\n", | |
" similarity.append(sim)\n", | |
" df[f'{col}_similarity'] = similarity\n", | |
"\n", | |
"# Rename columns for clarity\n", | |
"df.rename(columns=lambda x: x.replace('_clean_similarity', '_similarity') if x.endswith('_clean_similarity') else x, inplace=True)\n", | |
"columns_to_drop = [col for col in df.columns if '_clean' in col]\n", | |
"df.drop(columns=columns_to_drop, inplace=True)\n", | |
"\n", | |
"df" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/", | |
"height": 1000 | |
}, | |
"id": "v50Fcfdnpqzn", | |
"outputId": "ca61d11e-fa0a-46df-f2a1-882ee694a454" | |
}, | |
"execution_count": null, | |
"outputs": [ | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
" page \\\n", | |
"0 https://www.analistaseo.es/conversion/modelo-p... \n", | |
"1 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"5 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"6 https://www.analistaseo.es/google-api-indexing... \n", | |
"7 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"... ... \n", | |
"1399 https://www.analistaseo.es/conversion/neuromar... \n", | |
"1497 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"1728 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"1773 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"1560 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"\n", | |
" query clicks ctr impressions \\\n", | |
"0 modelo de probabilidad de elaboración 76 7.826982 971 \n", | |
"1 buscador semantico 50 7.485030 668 \n", | |
"5 navboost 25 4.901961 510 \n", | |
"6 google colab indexing api 21 0.264517 7939 \n", | |
"7 cynefin 16 0.410572 3897 \n", | |
"... ... ... ... ... \n", | |
"1399 neuromarketing barcelona 0 0.000000 3 \n", | |
"1497 análisis seo 0 0.000000 1 \n", | |
"1728 logeados 0 0.000000 1 \n", | |
"1773 link rel alternate hreflang 0 0.000000 60 \n", | |
"1560 ctr organico 0 0.000000 5 \n", | |
"\n", | |
" position title \\\n", | |
"0 2.74 Modelo de Probabilidad de Elaboración y Persua... \n", | |
"1 2.46 Qué es un buscador semántico \n", | |
"5 37.94 Los algoritmos de Google al descubierto. Cómo ... \n", | |
"6 7.90 API Indexing Test with Google Colab \n", | |
"7 9.30 Aplicando el marco de Cynefin en la toma de de... \n", | |
"... ... ... \n", | |
"1399 77.00 Neuromarketing en eShow Barcelona 2014 \n", | |
"1497 9.00 Artículos de Posicionamiento en Buscadores (SEO) \n", | |
"1728 78.00 Búsqueda Segura en Google (SSL Search) \n", | |
"1773 64.42 Caso de éxito SEO Internacional con HrefLang \n", | |
"1560 90.00 Google AdWords y SEO - ¿Por qué sube el tráfic... \n", | |
"\n", | |
" meta \\\n", | |
"0 El Modelo de la Probabilidad de Elaboración, t... \n", | |
"1 Un buscador semántico es aquel que no da enlac... \n", | |
"5 \\nEn este artículo nos adentramos en el funcio... \n", | |
"6 No meta description \n", | |
"7 \\nTomar decisiones acertadas en el volátil mun... \n", | |
"... ... \n", | |
"1399 El 95% de nuestros pensamientos, emociones y a... \n", | |
"1497 No meta description \n", | |
"1728 Desde ayer todos los usuarios que se identifiq... \n", | |
"1773 El caso de éxito SEO que os enseño a continuac... \n", | |
"1560 ¿Por qué sube el tráfico orgánico cuando invie... \n", | |
"\n", | |
" h1 title_similarity \\\n", | |
"0 Cómo usar el Modelo de la Probabilidad de Elab... 100 \n", | |
"1 Qué es un buscador semántico 100 \n", | |
"5 Los algoritmos de Google al descubierto. Cómo ... 12 \n", | |
"6 API Indexing Test 100 \n", | |
"7 Aplicando el marco de Cynefin en la toma de de... 100 \n", | |
"... ... ... \n", | |
"1399 Neuromarketing en eShow Barcelona 2014 100 \n", | |
"1497 Artículos de SEO 40 \n", | |
"1728 Búsqueda Segura en Google (SSL Search) 24 \n", | |
"1773 Caso de éxito SEO Internacional con HrefLang 50 \n", | |
"1560 Google AdWords y SEO ¿Por qué sube el tráfico ... 80 \n", | |
"\n", | |
" meta_similarity h1_similarity \n", | |
"0 100 100 \n", | |
"1 100 100 \n", | |
"5 11 12 \n", | |
"6 20 83 \n", | |
"7 9 100 \n", | |
"... ... ... \n", | |
"1399 18 100 \n", | |
"1497 7 56 \n", | |
"1728 10 24 \n", | |
"1773 46 50 \n", | |
"1560 80 80 \n", | |
"\n", | |
"[89 rows x 12 columns]" | |
], | |
"text/html": [ | |
"\n", | |
" <div id=\"df-da6ec8d7-7c4c-48ce-aa9c-27e26911040e\" class=\"colab-df-container\">\n", | |
" <div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>page</th>\n", | |
" <th>query</th>\n", | |
" <th>clicks</th>\n", | |
" <th>ctr</th>\n", | |
" <th>impressions</th>\n", | |
" <th>position</th>\n", | |
" <th>title</th>\n", | |
" <th>meta</th>\n", | |
" <th>h1</th>\n", | |
" <th>title_similarity</th>\n", | |
" <th>meta_similarity</th>\n", | |
" <th>h1_similarity</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>https://www.analistaseo.es/conversion/modelo-p...</td>\n", | |
" <td>modelo de probabilidad de elaboración</td>\n", | |
" <td>76</td>\n", | |
" <td>7.826982</td>\n", | |
" <td>971</td>\n", | |
" <td>2.74</td>\n", | |
" <td>Modelo de Probabilidad de Elaboración y Persua...</td>\n", | |
" <td>El Modelo de la Probabilidad de Elaboración, t...</td>\n", | |
" <td>Cómo usar el Modelo de la Probabilidad de Elab...</td>\n", | |
" <td>100</td>\n", | |
" <td>100</td>\n", | |
" <td>100</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>buscador semantico</td>\n", | |
" <td>50</td>\n", | |
" <td>7.485030</td>\n", | |
" <td>668</td>\n", | |
" <td>2.46</td>\n", | |
" <td>Qué es un buscador semántico</td>\n", | |
" <td>Un buscador semántico es aquel que no da enlac...</td>\n", | |
" <td>Qué es un buscador semántico</td>\n", | |
" <td>100</td>\n", | |
" <td>100</td>\n", | |
" <td>100</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>5</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>navboost</td>\n", | |
" <td>25</td>\n", | |
" <td>4.901961</td>\n", | |
" <td>510</td>\n", | |
" <td>37.94</td>\n", | |
" <td>Los algoritmos de Google al descubierto. Cómo ...</td>\n", | |
" <td>\\nEn este artículo nos adentramos en el funcio...</td>\n", | |
" <td>Los algoritmos de Google al descubierto. Cómo ...</td>\n", | |
" <td>12</td>\n", | |
" <td>11</td>\n", | |
" <td>12</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>6</th>\n", | |
" <td>https://www.analistaseo.es/google-api-indexing...</td>\n", | |
" <td>google colab indexing api</td>\n", | |
" <td>21</td>\n", | |
" <td>0.264517</td>\n", | |
" <td>7939</td>\n", | |
" <td>7.90</td>\n", | |
" <td>API Indexing Test with Google Colab</td>\n", | |
" <td>No meta description</td>\n", | |
" <td>API Indexing Test</td>\n", | |
" <td>100</td>\n", | |
" <td>20</td>\n", | |
" <td>83</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>7</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>cynefin</td>\n", | |
" <td>16</td>\n", | |
" <td>0.410572</td>\n", | |
" <td>3897</td>\n", | |
" <td>9.30</td>\n", | |
" <td>Aplicando el marco de Cynefin en la toma de de...</td>\n", | |
" <td>\\nTomar decisiones acertadas en el volátil mun...</td>\n", | |
" <td>Aplicando el marco de Cynefin en la toma de de...</td>\n", | |
" <td>100</td>\n", | |
" <td>9</td>\n", | |
" <td>100</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>...</th>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1399</th>\n", | |
" <td>https://www.analistaseo.es/conversion/neuromar...</td>\n", | |
" <td>neuromarketing barcelona</td>\n", | |
" <td>0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>3</td>\n", | |
" <td>77.00</td>\n", | |
" <td>Neuromarketing en eShow Barcelona 2014</td>\n", | |
" <td>El 95% de nuestros pensamientos, emociones y a...</td>\n", | |
" <td>Neuromarketing en eShow Barcelona 2014</td>\n", | |
" <td>100</td>\n", | |
" <td>18</td>\n", | |
" <td>100</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1497</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>análisis seo</td>\n", | |
" <td>0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>1</td>\n", | |
" <td>9.00</td>\n", | |
" <td>Artículos de Posicionamiento en Buscadores (SEO)</td>\n", | |
" <td>No meta description</td>\n", | |
" <td>Artículos de SEO</td>\n", | |
" <td>40</td>\n", | |
" <td>7</td>\n", | |
" <td>56</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1728</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>logeados</td>\n", | |
" <td>0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>1</td>\n", | |
" <td>78.00</td>\n", | |
" <td>Búsqueda Segura en Google (SSL Search)</td>\n", | |
" <td>Desde ayer todos los usuarios que se identifiq...</td>\n", | |
" <td>Búsqueda Segura en Google (SSL Search)</td>\n", | |
" <td>24</td>\n", | |
" <td>10</td>\n", | |
" <td>24</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1773</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>link rel alternate hreflang</td>\n", | |
" <td>0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>60</td>\n", | |
" <td>64.42</td>\n", | |
" <td>Caso de éxito SEO Internacional con HrefLang</td>\n", | |
" <td>El caso de éxito SEO que os enseño a continuac...</td>\n", | |
" <td>Caso de éxito SEO Internacional con HrefLang</td>\n", | |
" <td>50</td>\n", | |
" <td>46</td>\n", | |
" <td>50</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1560</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>ctr organico</td>\n", | |
" <td>0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>5</td>\n", | |
" <td>90.00</td>\n", | |
" <td>Google AdWords y SEO - ¿Por qué sube el tráfic...</td>\n", | |
" <td>¿Por qué sube el tráfico orgánico cuando invie...</td>\n", | |
" <td>Google AdWords y SEO ¿Por qué sube el tráfico ...</td>\n", | |
" <td>80</td>\n", | |
" <td>80</td>\n", | |
" <td>80</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"<p>89 rows × 12 columns</p>\n", | |
"</div>\n", | |
" <div class=\"colab-df-buttons\">\n", | |
"\n", | |
" <div class=\"colab-df-container\">\n", | |
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-da6ec8d7-7c4c-48ce-aa9c-27e26911040e')\"\n", | |
" title=\"Convert this dataframe to an interactive table.\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n", | |
" <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n", | |
" </svg>\n", | |
" </button>\n", | |
"\n", | |
" <style>\n", | |
" .colab-df-container {\n", | |
" display:flex;\n", | |
" gap: 12px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-convert {\n", | |
" background-color: #E8F0FE;\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: #1967D2;\n", | |
" height: 32px;\n", | |
" padding: 0 0 0 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-convert:hover {\n", | |
" background-color: #E2EBFA;\n", | |
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: #174EA6;\n", | |
" }\n", | |
"\n", | |
" .colab-df-buttons div {\n", | |
" margin-bottom: 4px;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-convert {\n", | |
" background-color: #3B4455;\n", | |
" fill: #D2E3FC;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-convert:hover {\n", | |
" background-color: #434B5C;\n", | |
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n", | |
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n", | |
" fill: #FFFFFF;\n", | |
" }\n", | |
" </style>\n", | |
"\n", | |
" <script>\n", | |
" const buttonEl =\n", | |
" document.querySelector('#df-da6ec8d7-7c4c-48ce-aa9c-27e26911040e button.colab-df-convert');\n", | |
" buttonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
"\n", | |
" async function convertToInteractive(key) {\n", | |
" const element = document.querySelector('#df-da6ec8d7-7c4c-48ce-aa9c-27e26911040e');\n", | |
" const dataTable =\n", | |
" await google.colab.kernel.invokeFunction('convertToInteractive',\n", | |
" [key], {});\n", | |
" if (!dataTable) return;\n", | |
"\n", | |
" const docLinkHtml = 'Like what you see? Visit the ' +\n", | |
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n", | |
" + ' to learn more about interactive tables.';\n", | |
" element.innerHTML = '';\n", | |
" dataTable['output_type'] = 'display_data';\n", | |
" await google.colab.output.renderOutput(dataTable, element);\n", | |
" const docLink = document.createElement('div');\n", | |
" docLink.innerHTML = docLinkHtml;\n", | |
" element.appendChild(docLink);\n", | |
" }\n", | |
" </script>\n", | |
" </div>\n", | |
"\n", | |
"\n", | |
"<div id=\"df-377d14f5-0cd9-4262-8adb-467149f71372\">\n", | |
" <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-377d14f5-0cd9-4262-8adb-467149f71372')\"\n", | |
" title=\"Suggest charts\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
"<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n", | |
" width=\"24px\">\n", | |
" <g>\n", | |
" <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n", | |
" </g>\n", | |
"</svg>\n", | |
" </button>\n", | |
"\n", | |
"<style>\n", | |
" .colab-df-quickchart {\n", | |
" --bg-color: #E8F0FE;\n", | |
" --fill-color: #1967D2;\n", | |
" --hover-bg-color: #E2EBFA;\n", | |
" --hover-fill-color: #174EA6;\n", | |
" --disabled-fill-color: #AAA;\n", | |
" --disabled-bg-color: #DDD;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-quickchart {\n", | |
" --bg-color: #3B4455;\n", | |
" --fill-color: #D2E3FC;\n", | |
" --hover-bg-color: #434B5C;\n", | |
" --hover-fill-color: #FFFFFF;\n", | |
" --disabled-bg-color: #3B4455;\n", | |
" --disabled-fill-color: #666;\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart {\n", | |
" background-color: var(--bg-color);\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: var(--fill-color);\n", | |
" height: 32px;\n", | |
" padding: 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart:hover {\n", | |
" background-color: var(--hover-bg-color);\n", | |
" box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: var(--button-hover-fill-color);\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart-complete:disabled,\n", | |
" .colab-df-quickchart-complete:disabled:hover {\n", | |
" background-color: var(--disabled-bg-color);\n", | |
" fill: var(--disabled-fill-color);\n", | |
" box-shadow: none;\n", | |
" }\n", | |
"\n", | |
" .colab-df-spinner {\n", | |
" border: 2px solid var(--fill-color);\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" animation:\n", | |
" spin 1s steps(1) infinite;\n", | |
" }\n", | |
"\n", | |
" @keyframes spin {\n", | |
" 0% {\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" border-left-color: var(--fill-color);\n", | |
" }\n", | |
" 20% {\n", | |
" border-color: transparent;\n", | |
" border-left-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" }\n", | |
" 30% {\n", | |
" border-color: transparent;\n", | |
" border-left-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" border-right-color: var(--fill-color);\n", | |
" }\n", | |
" 40% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" }\n", | |
" 60% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" }\n", | |
" 80% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" }\n", | |
" 90% {\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" }\n", | |
" }\n", | |
"</style>\n", | |
"\n", | |
" <script>\n", | |
" async function quickchart(key) {\n", | |
" const quickchartButtonEl =\n", | |
" document.querySelector('#' + key + ' button');\n", | |
" quickchartButtonEl.disabled = true; // To prevent multiple clicks.\n", | |
" quickchartButtonEl.classList.add('colab-df-spinner');\n", | |
" try {\n", | |
" const charts = await google.colab.kernel.invokeFunction(\n", | |
" 'suggestCharts', [key], {});\n", | |
" } catch (error) {\n", | |
" console.error('Error during call to suggestCharts:', error);\n", | |
" }\n", | |
" quickchartButtonEl.classList.remove('colab-df-spinner');\n", | |
" quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n", | |
" }\n", | |
" (() => {\n", | |
" let quickchartButtonEl =\n", | |
" document.querySelector('#df-377d14f5-0cd9-4262-8adb-467149f71372 button');\n", | |
" quickchartButtonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
" })();\n", | |
" </script>\n", | |
"</div>\n", | |
"\n", | |
" <div id=\"id_4a251c6c-6960-469e-92c0-16b3eee83cb0\">\n", | |
" <style>\n", | |
" .colab-df-generate {\n", | |
" background-color: #E8F0FE;\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: #1967D2;\n", | |
" height: 32px;\n", | |
" padding: 0 0 0 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-generate:hover {\n", | |
" background-color: #E2EBFA;\n", | |
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: #174EA6;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-generate {\n", | |
" background-color: #3B4455;\n", | |
" fill: #D2E3FC;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-generate:hover {\n", | |
" background-color: #434B5C;\n", | |
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n", | |
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n", | |
" fill: #FFFFFF;\n", | |
" }\n", | |
" </style>\n", | |
" <button class=\"colab-df-generate\" onclick=\"generateWithVariable('df')\"\n", | |
" title=\"Generate code using this dataframe.\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n", | |
" width=\"24px\">\n", | |
" <path d=\"M7,19H8.4L18.45,9,17,7.55,7,17.6ZM5,21V16.75L18.45,3.32a2,2,0,0,1,2.83,0l1.4,1.43a1.91,1.91,0,0,1,.58,1.4,1.91,1.91,0,0,1-.58,1.4L9.25,21ZM18.45,9,17,7.55Zm-12,3A5.31,5.31,0,0,0,4.9,8.1,5.31,5.31,0,0,0,1,6.5,5.31,5.31,0,0,0,4.9,4.9,5.31,5.31,0,0,0,6.5,1,5.31,5.31,0,0,0,8.1,4.9,5.31,5.31,0,0,0,12,6.5,5.46,5.46,0,0,0,6.5,12Z\"/>\n", | |
" </svg>\n", | |
" </button>\n", | |
" <script>\n", | |
" (() => {\n", | |
" const buttonEl =\n", | |
" document.querySelector('#id_4a251c6c-6960-469e-92c0-16b3eee83cb0 button.colab-df-generate');\n", | |
" buttonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
"\n", | |
" buttonEl.onclick = () => {\n", | |
" google.colab.notebook.generateWithVariable('df');\n", | |
" }\n", | |
" })();\n", | |
" </script>\n", | |
" </div>\n", | |
"\n", | |
" </div>\n", | |
" </div>\n" | |
], | |
"application/vnd.google.colaboratory.intrinsic+json": { | |
"type": "dataframe", | |
"variable_name": "df", | |
"summary": "{\n \"name\": \"df\",\n \"rows\": 89,\n \"fields\": [\n {\n \"column\": \"page\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 89,\n \"samples\": [\n \"https://www.analistaseo.es/conversion/campanas-marketing-conductismo/\",\n \"https://www.analistaseo.es/analitica-web/comparativa-de-las-mejores-herramientas-para-medir-apps-moviles/\",\n \"https://www.analistaseo.es/posicionamiento-buscadores/seo-https/\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"query\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 86,\n \"samples\": [\n \"delcro\",\n \"modelo de probabilidad de elaboraci\\u00f3n\",\n \"xavier colomes\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"clicks\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 10,\n \"min\": 0,\n \"max\": 76,\n \"num_unique_values\": 14,\n \"samples\": [\n 4,\n 2,\n 76\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"ctr\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 15.025523422750847,\n \"min\": 0.0,\n \"max\": 100.0,\n \"num_unique_values\": 21,\n \"samples\": [\n 7.826982492276004,\n 0.2557544757033248,\n 100.0\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"impressions\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 937,\n \"min\": 1,\n \"max\": 7939,\n \"num_unique_values\": 43,\n \"samples\": [\n 7,\n 5,\n 3\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"position\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 34.170848457350296,\n \"min\": 1.0,\n \"max\": 132.57,\n \"num_unique_values\": 79,\n \"samples\": [\n 68.33,\n 2.74,\n 44.0\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"title\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 89,\n \"samples\": [\n \"Mejora tus campa\\u00c3\\u00b1as de marketing mediante el conductismo\",\n \"Comparativa de las mejores herramientas para medir Apps m\\u00f3viles\",\n \"SEO, HTTPS y la desinformaci\\u00f3n\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"meta\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 85,\n \"samples\": [\n \"El cerebro toma decisiones de dos formas distintas: consciente e inconscientemente. Se sabe que entre el 85% y el 95% de las decisiones que tomamos son de \",\n \"El Modelo de la Probabilidad de Elaboraci\\u00f3n, tambi\\u00e9n conocido como Elaboration Likelihood Model (ELM), trata de\\u00a0c\\u00f3mo tenemos que comunicar para persuad\",\n \"En la cuarta edici\\u00f3n del Clinic SEO analizaron TopRural, la web l\\u00edder en turismo rural. Para ello contamos con la presencia de los ponentes:\\n-\\u00a0\\u00a0\\u00a0\\u00a0\\u00a0\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"h1\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 89,\n \"samples\": [\n \"Mejora tus campa\\u00c3\\u00b1as de marketing mediante el conductismo\",\n \"Comparativa de las mejores herramientas para medir Apps m\\u00f3viles\",\n \"SEO, HTTPS y la desinformaci\\u00f3n\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"title_similarity\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 30,\n \"min\": 12,\n \"max\": 100,\n \"num_unique_values\": 42,\n \"samples\": [\n 78,\n 48,\n 30\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"meta_similarity\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 32,\n \"min\": 0,\n \"max\": 100,\n \"num_unique_values\": 51,\n \"samples\": [\n 34,\n 18,\n 24\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"h1_similarity\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 31,\n \"min\": 0,\n \"max\": 100,\n \"num_unique_values\": 41,\n \"samples\": [\n 46,\n 45,\n 30\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}" | |
} | |
}, | |
"metadata": {}, | |
"execution_count": 8 | |
} | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"source": [ | |
"Optional step: Generate new titles if the similarity between the current title and the top-performing query is less than 60. Feel free to adjust the similarity threshold based on the results you observe and generate new descriptions and h1 tags. This step may incur a significant cost depending on the size of your dataset." | |
], | |
"metadata": { | |
"id": "84Nq6uJBNjoo" | |
} | |
}, | |
{ | |
"cell_type": "code", | |
"source": [ | |
"# Optional step to generate new titles if similarity is below a threshold\n", | |
"filtered_df = df[df['title_similarity'] <= 60]\n", | |
"\n", | |
"# Configure OpenAI API\n", | |
"client = OpenAI(api_key=\"YOUR OPENAI TOKEN HERE\")\n", | |
"\n", | |
"MODEL = \"gpt-4o\"\n", | |
"TEMPERATURES = [0.0]\n", | |
"\n", | |
"PROMPT_TEMPLATE = \"\"\"Task: Generate a new title that meets the following criteria:\n", | |
"1. The title cannot be longer than 60 characters.\n", | |
"2. The title must include the specified query, represented in the template as '{query}'.\n", | |
"3. The title must be written in the specified language, represented in the template as '{lang}'.\n", | |
"4. No words should be repeated in the title.\n", | |
"5. Use the entities found in the given 'current title' '{title}' to construct the new title.\n", | |
"Please ensure that your title meets all of the criteria.\n", | |
"\"\"\"\n", | |
"\n", | |
"# Function to generate a new title using OpenAI\n", | |
"def generar_titulo(prompt, temperature):\n", | |
" completion = client.chat.completions.create(\n", | |
" model=MODEL,\n", | |
" temperature=temperature,\n", | |
" messages=[{\"role\": \"user\", \"content\": prompt}],\n", | |
" )\n", | |
" return completion.choices[0].message.content.strip()\n", | |
"\n", | |
"# Generate new titles for each filtered row\n", | |
"for index, row in filtered_df.iterrows():\n", | |
" query = row['query']\n", | |
" current_title = row['title']\n", | |
" prompt = PROMPT_TEMPLATE.format(query=query, lang=lang, title=current_title)\n", | |
" new_title = generar_titulo(prompt, TEMPERATURES[0])\n", | |
" df.at[index, 'new_title'] = new_title\n", | |
"\n", | |
"# Function to strip quotes from the beginning and end of a string\n", | |
"def strip_quotes(title):\n", | |
" if title.startswith('\"') and title.endswith('\"'):\n", | |
" return title[1:-1]\n", | |
" return title\n", | |
"\n", | |
"# Apply the function to the 'new_title' column\n", | |
"df['new_title'] = df['new_title'].apply(strip_quotes)\n", | |
"\n", | |
"# Save the results to a CSV file\n", | |
"df.to_csv('fuzzy_booster.csv', index=False)\n", | |
"\n", | |
"# Download the CSV file\n", | |
"files.download('fuzzy_booster.csv')\n", | |
"\n", | |
"df" | |
], | |
"metadata": { | |
"colab": { | |
"base_uri": "https://localhost:8080/", | |
"height": 1000 | |
}, | |
"id": "TQRrHnT8EKsp", | |
"outputId": "16aa55cd-6ed0-4283-c342-ba724aa871ad" | |
}, | |
"execution_count": null, | |
"outputs": [ | |
{ | |
"output_type": "display_data", | |
"data": { | |
"text/plain": [ | |
"<IPython.core.display.Javascript object>" | |
], | |
"application/javascript": [ | |
"\n", | |
" async function download(id, filename, size) {\n", | |
" if (!google.colab.kernel.accessAllowed) {\n", | |
" return;\n", | |
" }\n", | |
" const div = document.createElement('div');\n", | |
" const label = document.createElement('label');\n", | |
" label.textContent = `Downloading \"${filename}\": `;\n", | |
" div.appendChild(label);\n", | |
" const progress = document.createElement('progress');\n", | |
" progress.max = size;\n", | |
" div.appendChild(progress);\n", | |
" document.body.appendChild(div);\n", | |
"\n", | |
" const buffers = [];\n", | |
" let downloaded = 0;\n", | |
"\n", | |
" const channel = await google.colab.kernel.comms.open(id);\n", | |
" // Send a message to notify the kernel that we're ready.\n", | |
" channel.send({})\n", | |
"\n", | |
" for await (const message of channel.messages) {\n", | |
" // Send a message to notify the kernel that we're ready.\n", | |
" channel.send({})\n", | |
" if (message.buffers) {\n", | |
" for (const buffer of message.buffers) {\n", | |
" buffers.push(buffer);\n", | |
" downloaded += buffer.byteLength;\n", | |
" progress.value = downloaded;\n", | |
" }\n", | |
" }\n", | |
" }\n", | |
" const blob = new Blob(buffers, {type: 'application/binary'});\n", | |
" const a = document.createElement('a');\n", | |
" a.href = window.URL.createObjectURL(blob);\n", | |
" a.download = filename;\n", | |
" div.appendChild(a);\n", | |
" a.click();\n", | |
" div.remove();\n", | |
" }\n", | |
" " | |
] | |
}, | |
"metadata": {} | |
}, | |
{ | |
"output_type": "display_data", | |
"data": { | |
"text/plain": [ | |
"<IPython.core.display.Javascript object>" | |
], | |
"application/javascript": [ | |
"download(\"download_0635fd2c-6fe9-4bf7-840c-7d03b233f0f2\", \"fuzzy_booster.csv\", 36331)" | |
] | |
}, | |
"metadata": {} | |
}, | |
{ | |
"output_type": "execute_result", | |
"data": { | |
"text/plain": [ | |
" page \\\n", | |
"0 https://www.analistaseo.es/conversion/modelo-p... \n", | |
"1 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"5 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"6 https://www.analistaseo.es/google-api-indexing... \n", | |
"7 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"... ... \n", | |
"1399 https://www.analistaseo.es/conversion/neuromar... \n", | |
"1497 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"1728 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"1773 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"1560 https://www.analistaseo.es/posicionamiento-bus... \n", | |
"\n", | |
" query clicks ctr impressions \\\n", | |
"0 modelo de probabilidad de elaboración 76 7.826982 971 \n", | |
"1 buscador semantico 50 7.485030 668 \n", | |
"5 navboost 25 4.901961 510 \n", | |
"6 google colab indexing api 21 0.264517 7939 \n", | |
"7 cynefin 16 0.410572 3897 \n", | |
"... ... ... ... ... \n", | |
"1399 neuromarketing barcelona 0 0.000000 3 \n", | |
"1497 análisis seo 0 0.000000 1 \n", | |
"1728 logeados 0 0.000000 1 \n", | |
"1773 link rel alternate hreflang 0 0.000000 60 \n", | |
"1560 ctr organico 0 0.000000 5 \n", | |
"\n", | |
" position title \\\n", | |
"0 2.74 Modelo de Probabilidad de Elaboración y Persua... \n", | |
"1 2.46 Qué es un buscador semántico \n", | |
"5 37.94 Los algoritmos de Google al descubierto. Cómo ... \n", | |
"6 7.90 API Indexing Test with Google Colab \n", | |
"7 9.30 Aplicando el marco de Cynefin en la toma de de... \n", | |
"... ... ... \n", | |
"1399 77.00 Neuromarketing en eShow Barcelona 2014 \n", | |
"1497 9.00 Artículos de Posicionamiento en Buscadores (SEO) \n", | |
"1728 78.00 Búsqueda Segura en Google (SSL Search) \n", | |
"1773 64.42 Caso de éxito SEO Internacional con HrefLang \n", | |
"1560 90.00 Google AdWords y SEO - ¿Por qué sube el tráfic... \n", | |
"\n", | |
" meta \\\n", | |
"0 El Modelo de la Probabilidad de Elaboración, t... \n", | |
"1 Un buscador semántico es aquel que no da enlac... \n", | |
"5 \\nEn este artículo nos adentramos en el funcio... \n", | |
"6 No meta description \n", | |
"7 \\nTomar decisiones acertadas en el volátil mun... \n", | |
"... ... \n", | |
"1399 El 95% de nuestros pensamientos, emociones y a... \n", | |
"1497 No meta description \n", | |
"1728 Desde ayer todos los usuarios que se identifiq... \n", | |
"1773 El caso de éxito SEO que os enseño a continuac... \n", | |
"1560 ¿Por qué sube el tráfico orgánico cuando invie... \n", | |
"\n", | |
" h1 title_similarity \\\n", | |
"0 Cómo usar el Modelo de la Probabilidad de Elab... 100 \n", | |
"1 Qué es un buscador semántico 100 \n", | |
"5 Los algoritmos de Google al descubierto. Cómo ... 12 \n", | |
"6 API Indexing Test 100 \n", | |
"7 Aplicando el marco de Cynefin en la toma de de... 100 \n", | |
"... ... ... \n", | |
"1399 Neuromarketing en eShow Barcelona 2014 100 \n", | |
"1497 Artículos de SEO 40 \n", | |
"1728 Búsqueda Segura en Google (SSL Search) 24 \n", | |
"1773 Caso de éxito SEO Internacional con HrefLang 50 \n", | |
"1560 Google AdWords y SEO ¿Por qué sube el tráfico ... 80 \n", | |
"\n", | |
" meta_similarity h1_similarity \\\n", | |
"0 100 100 \n", | |
"1 100 100 \n", | |
"5 11 12 \n", | |
"6 20 83 \n", | |
"7 9 100 \n", | |
"... ... ... \n", | |
"1399 18 100 \n", | |
"1497 7 56 \n", | |
"1728 10 24 \n", | |
"1773 46 50 \n", | |
"1560 80 80 \n", | |
"\n", | |
" new_title \n", | |
"0 nan \n", | |
"1 nan \n", | |
"5 Navboost: Algoritmos de Google y Documentos Fi... \n", | |
"6 nan \n", | |
"7 nan \n", | |
"... ... \n", | |
"1399 nan \n", | |
"1497 Análisis SEO: Artículos de Posicionamiento en ... \n", | |
"1728 Búsqueda Segura de Google para Usuarios Logeados \n", | |
"1773 Éxito Internacional con link rel alternate hre... \n", | |
"1560 nan \n", | |
"\n", | |
"[89 rows x 13 columns]" | |
], | |
"text/html": [ | |
"\n", | |
" <div id=\"df-a2cce684-fcfe-4ea4-84dd-2a86f825b839\" class=\"colab-df-container\">\n", | |
" <div>\n", | |
"<style scoped>\n", | |
" .dataframe tbody tr th:only-of-type {\n", | |
" vertical-align: middle;\n", | |
" }\n", | |
"\n", | |
" .dataframe tbody tr th {\n", | |
" vertical-align: top;\n", | |
" }\n", | |
"\n", | |
" .dataframe thead th {\n", | |
" text-align: right;\n", | |
" }\n", | |
"</style>\n", | |
"<table border=\"1\" class=\"dataframe\">\n", | |
" <thead>\n", | |
" <tr style=\"text-align: right;\">\n", | |
" <th></th>\n", | |
" <th>page</th>\n", | |
" <th>query</th>\n", | |
" <th>clicks</th>\n", | |
" <th>ctr</th>\n", | |
" <th>impressions</th>\n", | |
" <th>position</th>\n", | |
" <th>title</th>\n", | |
" <th>meta</th>\n", | |
" <th>h1</th>\n", | |
" <th>title_similarity</th>\n", | |
" <th>meta_similarity</th>\n", | |
" <th>h1_similarity</th>\n", | |
" <th>new_title</th>\n", | |
" </tr>\n", | |
" </thead>\n", | |
" <tbody>\n", | |
" <tr>\n", | |
" <th>0</th>\n", | |
" <td>https://www.analistaseo.es/conversion/modelo-p...</td>\n", | |
" <td>modelo de probabilidad de elaboración</td>\n", | |
" <td>76</td>\n", | |
" <td>7.826982</td>\n", | |
" <td>971</td>\n", | |
" <td>2.74</td>\n", | |
" <td>Modelo de Probabilidad de Elaboración y Persua...</td>\n", | |
" <td>El Modelo de la Probabilidad de Elaboración, t...</td>\n", | |
" <td>Cómo usar el Modelo de la Probabilidad de Elab...</td>\n", | |
" <td>100</td>\n", | |
" <td>100</td>\n", | |
" <td>100</td>\n", | |
" <td>nan</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>buscador semantico</td>\n", | |
" <td>50</td>\n", | |
" <td>7.485030</td>\n", | |
" <td>668</td>\n", | |
" <td>2.46</td>\n", | |
" <td>Qué es un buscador semántico</td>\n", | |
" <td>Un buscador semántico es aquel que no da enlac...</td>\n", | |
" <td>Qué es un buscador semántico</td>\n", | |
" <td>100</td>\n", | |
" <td>100</td>\n", | |
" <td>100</td>\n", | |
" <td>nan</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>5</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>navboost</td>\n", | |
" <td>25</td>\n", | |
" <td>4.901961</td>\n", | |
" <td>510</td>\n", | |
" <td>37.94</td>\n", | |
" <td>Los algoritmos de Google al descubierto. Cómo ...</td>\n", | |
" <td>\\nEn este artículo nos adentramos en el funcio...</td>\n", | |
" <td>Los algoritmos de Google al descubierto. Cómo ...</td>\n", | |
" <td>12</td>\n", | |
" <td>11</td>\n", | |
" <td>12</td>\n", | |
" <td>Navboost: Algoritmos de Google y Documentos Fi...</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>6</th>\n", | |
" <td>https://www.analistaseo.es/google-api-indexing...</td>\n", | |
" <td>google colab indexing api</td>\n", | |
" <td>21</td>\n", | |
" <td>0.264517</td>\n", | |
" <td>7939</td>\n", | |
" <td>7.90</td>\n", | |
" <td>API Indexing Test with Google Colab</td>\n", | |
" <td>No meta description</td>\n", | |
" <td>API Indexing Test</td>\n", | |
" <td>100</td>\n", | |
" <td>20</td>\n", | |
" <td>83</td>\n", | |
" <td>nan</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>7</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>cynefin</td>\n", | |
" <td>16</td>\n", | |
" <td>0.410572</td>\n", | |
" <td>3897</td>\n", | |
" <td>9.30</td>\n", | |
" <td>Aplicando el marco de Cynefin en la toma de de...</td>\n", | |
" <td>\\nTomar decisiones acertadas en el volátil mun...</td>\n", | |
" <td>Aplicando el marco de Cynefin en la toma de de...</td>\n", | |
" <td>100</td>\n", | |
" <td>9</td>\n", | |
" <td>100</td>\n", | |
" <td>nan</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>...</th>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" <td>...</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1399</th>\n", | |
" <td>https://www.analistaseo.es/conversion/neuromar...</td>\n", | |
" <td>neuromarketing barcelona</td>\n", | |
" <td>0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>3</td>\n", | |
" <td>77.00</td>\n", | |
" <td>Neuromarketing en eShow Barcelona 2014</td>\n", | |
" <td>El 95% de nuestros pensamientos, emociones y a...</td>\n", | |
" <td>Neuromarketing en eShow Barcelona 2014</td>\n", | |
" <td>100</td>\n", | |
" <td>18</td>\n", | |
" <td>100</td>\n", | |
" <td>nan</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1497</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>análisis seo</td>\n", | |
" <td>0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>1</td>\n", | |
" <td>9.00</td>\n", | |
" <td>Artículos de Posicionamiento en Buscadores (SEO)</td>\n", | |
" <td>No meta description</td>\n", | |
" <td>Artículos de SEO</td>\n", | |
" <td>40</td>\n", | |
" <td>7</td>\n", | |
" <td>56</td>\n", | |
" <td>Análisis SEO: Artículos de Posicionamiento en ...</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1728</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>logeados</td>\n", | |
" <td>0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>1</td>\n", | |
" <td>78.00</td>\n", | |
" <td>Búsqueda Segura en Google (SSL Search)</td>\n", | |
" <td>Desde ayer todos los usuarios que se identifiq...</td>\n", | |
" <td>Búsqueda Segura en Google (SSL Search)</td>\n", | |
" <td>24</td>\n", | |
" <td>10</td>\n", | |
" <td>24</td>\n", | |
" <td>Búsqueda Segura de Google para Usuarios Logeados</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1773</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>link rel alternate hreflang</td>\n", | |
" <td>0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>60</td>\n", | |
" <td>64.42</td>\n", | |
" <td>Caso de éxito SEO Internacional con HrefLang</td>\n", | |
" <td>El caso de éxito SEO que os enseño a continuac...</td>\n", | |
" <td>Caso de éxito SEO Internacional con HrefLang</td>\n", | |
" <td>50</td>\n", | |
" <td>46</td>\n", | |
" <td>50</td>\n", | |
" <td>Éxito Internacional con link rel alternate hre...</td>\n", | |
" </tr>\n", | |
" <tr>\n", | |
" <th>1560</th>\n", | |
" <td>https://www.analistaseo.es/posicionamiento-bus...</td>\n", | |
" <td>ctr organico</td>\n", | |
" <td>0</td>\n", | |
" <td>0.000000</td>\n", | |
" <td>5</td>\n", | |
" <td>90.00</td>\n", | |
" <td>Google AdWords y SEO - ¿Por qué sube el tráfic...</td>\n", | |
" <td>¿Por qué sube el tráfico orgánico cuando invie...</td>\n", | |
" <td>Google AdWords y SEO ¿Por qué sube el tráfico ...</td>\n", | |
" <td>80</td>\n", | |
" <td>80</td>\n", | |
" <td>80</td>\n", | |
" <td>nan</td>\n", | |
" </tr>\n", | |
" </tbody>\n", | |
"</table>\n", | |
"<p>89 rows × 13 columns</p>\n", | |
"</div>\n", | |
" <div class=\"colab-df-buttons\">\n", | |
"\n", | |
" <div class=\"colab-df-container\">\n", | |
" <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-a2cce684-fcfe-4ea4-84dd-2a86f825b839')\"\n", | |
" title=\"Convert this dataframe to an interactive table.\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n", | |
" <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n", | |
" </svg>\n", | |
" </button>\n", | |
"\n", | |
" <style>\n", | |
" .colab-df-container {\n", | |
" display:flex;\n", | |
" gap: 12px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-convert {\n", | |
" background-color: #E8F0FE;\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: #1967D2;\n", | |
" height: 32px;\n", | |
" padding: 0 0 0 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-convert:hover {\n", | |
" background-color: #E2EBFA;\n", | |
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: #174EA6;\n", | |
" }\n", | |
"\n", | |
" .colab-df-buttons div {\n", | |
" margin-bottom: 4px;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-convert {\n", | |
" background-color: #3B4455;\n", | |
" fill: #D2E3FC;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-convert:hover {\n", | |
" background-color: #434B5C;\n", | |
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n", | |
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n", | |
" fill: #FFFFFF;\n", | |
" }\n", | |
" </style>\n", | |
"\n", | |
" <script>\n", | |
" const buttonEl =\n", | |
" document.querySelector('#df-a2cce684-fcfe-4ea4-84dd-2a86f825b839 button.colab-df-convert');\n", | |
" buttonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
"\n", | |
" async function convertToInteractive(key) {\n", | |
" const element = document.querySelector('#df-a2cce684-fcfe-4ea4-84dd-2a86f825b839');\n", | |
" const dataTable =\n", | |
" await google.colab.kernel.invokeFunction('convertToInteractive',\n", | |
" [key], {});\n", | |
" if (!dataTable) return;\n", | |
"\n", | |
" const docLinkHtml = 'Like what you see? Visit the ' +\n", | |
" '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n", | |
" + ' to learn more about interactive tables.';\n", | |
" element.innerHTML = '';\n", | |
" dataTable['output_type'] = 'display_data';\n", | |
" await google.colab.output.renderOutput(dataTable, element);\n", | |
" const docLink = document.createElement('div');\n", | |
" docLink.innerHTML = docLinkHtml;\n", | |
" element.appendChild(docLink);\n", | |
" }\n", | |
" </script>\n", | |
" </div>\n", | |
"\n", | |
"\n", | |
"<div id=\"df-e8316c8b-8c75-4de9-8f02-901fddf912a8\">\n", | |
" <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-e8316c8b-8c75-4de9-8f02-901fddf912a8')\"\n", | |
" title=\"Suggest charts\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
"<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n", | |
" width=\"24px\">\n", | |
" <g>\n", | |
" <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n", | |
" </g>\n", | |
"</svg>\n", | |
" </button>\n", | |
"\n", | |
"<style>\n", | |
" .colab-df-quickchart {\n", | |
" --bg-color: #E8F0FE;\n", | |
" --fill-color: #1967D2;\n", | |
" --hover-bg-color: #E2EBFA;\n", | |
" --hover-fill-color: #174EA6;\n", | |
" --disabled-fill-color: #AAA;\n", | |
" --disabled-bg-color: #DDD;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-quickchart {\n", | |
" --bg-color: #3B4455;\n", | |
" --fill-color: #D2E3FC;\n", | |
" --hover-bg-color: #434B5C;\n", | |
" --hover-fill-color: #FFFFFF;\n", | |
" --disabled-bg-color: #3B4455;\n", | |
" --disabled-fill-color: #666;\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart {\n", | |
" background-color: var(--bg-color);\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: var(--fill-color);\n", | |
" height: 32px;\n", | |
" padding: 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart:hover {\n", | |
" background-color: var(--hover-bg-color);\n", | |
" box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: var(--button-hover-fill-color);\n", | |
" }\n", | |
"\n", | |
" .colab-df-quickchart-complete:disabled,\n", | |
" .colab-df-quickchart-complete:disabled:hover {\n", | |
" background-color: var(--disabled-bg-color);\n", | |
" fill: var(--disabled-fill-color);\n", | |
" box-shadow: none;\n", | |
" }\n", | |
"\n", | |
" .colab-df-spinner {\n", | |
" border: 2px solid var(--fill-color);\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" animation:\n", | |
" spin 1s steps(1) infinite;\n", | |
" }\n", | |
"\n", | |
" @keyframes spin {\n", | |
" 0% {\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" border-left-color: var(--fill-color);\n", | |
" }\n", | |
" 20% {\n", | |
" border-color: transparent;\n", | |
" border-left-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" }\n", | |
" 30% {\n", | |
" border-color: transparent;\n", | |
" border-left-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" border-right-color: var(--fill-color);\n", | |
" }\n", | |
" 40% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" border-top-color: var(--fill-color);\n", | |
" }\n", | |
" 60% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" }\n", | |
" 80% {\n", | |
" border-color: transparent;\n", | |
" border-right-color: var(--fill-color);\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" }\n", | |
" 90% {\n", | |
" border-color: transparent;\n", | |
" border-bottom-color: var(--fill-color);\n", | |
" }\n", | |
" }\n", | |
"</style>\n", | |
"\n", | |
" <script>\n", | |
" async function quickchart(key) {\n", | |
" const quickchartButtonEl =\n", | |
" document.querySelector('#' + key + ' button');\n", | |
" quickchartButtonEl.disabled = true; // To prevent multiple clicks.\n", | |
" quickchartButtonEl.classList.add('colab-df-spinner');\n", | |
" try {\n", | |
" const charts = await google.colab.kernel.invokeFunction(\n", | |
" 'suggestCharts', [key], {});\n", | |
" } catch (error) {\n", | |
" console.error('Error during call to suggestCharts:', error);\n", | |
" }\n", | |
" quickchartButtonEl.classList.remove('colab-df-spinner');\n", | |
" quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n", | |
" }\n", | |
" (() => {\n", | |
" let quickchartButtonEl =\n", | |
" document.querySelector('#df-e8316c8b-8c75-4de9-8f02-901fddf912a8 button');\n", | |
" quickchartButtonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
" })();\n", | |
" </script>\n", | |
"</div>\n", | |
"\n", | |
" <div id=\"id_bffa2302-5389-4549-93c4-8430c812ac46\">\n", | |
" <style>\n", | |
" .colab-df-generate {\n", | |
" background-color: #E8F0FE;\n", | |
" border: none;\n", | |
" border-radius: 50%;\n", | |
" cursor: pointer;\n", | |
" display: none;\n", | |
" fill: #1967D2;\n", | |
" height: 32px;\n", | |
" padding: 0 0 0 0;\n", | |
" width: 32px;\n", | |
" }\n", | |
"\n", | |
" .colab-df-generate:hover {\n", | |
" background-color: #E2EBFA;\n", | |
" box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n", | |
" fill: #174EA6;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-generate {\n", | |
" background-color: #3B4455;\n", | |
" fill: #D2E3FC;\n", | |
" }\n", | |
"\n", | |
" [theme=dark] .colab-df-generate:hover {\n", | |
" background-color: #434B5C;\n", | |
" box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n", | |
" filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n", | |
" fill: #FFFFFF;\n", | |
" }\n", | |
" </style>\n", | |
" <button class=\"colab-df-generate\" onclick=\"generateWithVariable('df')\"\n", | |
" title=\"Generate code using this dataframe.\"\n", | |
" style=\"display:none;\">\n", | |
"\n", | |
" <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n", | |
" width=\"24px\">\n", | |
" <path d=\"M7,19H8.4L18.45,9,17,7.55,7,17.6ZM5,21V16.75L18.45,3.32a2,2,0,0,1,2.83,0l1.4,1.43a1.91,1.91,0,0,1,.58,1.4,1.91,1.91,0,0,1-.58,1.4L9.25,21ZM18.45,9,17,7.55Zm-12,3A5.31,5.31,0,0,0,4.9,8.1,5.31,5.31,0,0,0,1,6.5,5.31,5.31,0,0,0,4.9,4.9,5.31,5.31,0,0,0,6.5,1,5.31,5.31,0,0,0,8.1,4.9,5.31,5.31,0,0,0,12,6.5,5.46,5.46,0,0,0,6.5,12Z\"/>\n", | |
" </svg>\n", | |
" </button>\n", | |
" <script>\n", | |
" (() => {\n", | |
" const buttonEl =\n", | |
" document.querySelector('#id_bffa2302-5389-4549-93c4-8430c812ac46 button.colab-df-generate');\n", | |
" buttonEl.style.display =\n", | |
" google.colab.kernel.accessAllowed ? 'block' : 'none';\n", | |
"\n", | |
" buttonEl.onclick = () => {\n", | |
" google.colab.notebook.generateWithVariable('df');\n", | |
" }\n", | |
" })();\n", | |
" </script>\n", | |
" </div>\n", | |
"\n", | |
" </div>\n", | |
" </div>\n" | |
], | |
"application/vnd.google.colaboratory.intrinsic+json": { | |
"type": "dataframe", | |
"variable_name": "df", | |
"summary": "{\n \"name\": \"df\",\n \"rows\": 89,\n \"fields\": [\n {\n \"column\": \"page\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 89,\n \"samples\": [\n \"https://www.analistaseo.es/conversion/campanas-marketing-conductismo/\",\n \"https://www.analistaseo.es/analitica-web/comparativa-de-las-mejores-herramientas-para-medir-apps-moviles/\",\n \"https://www.analistaseo.es/posicionamiento-buscadores/seo-https/\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"query\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 86,\n \"samples\": [\n \"delcro\",\n \"modelo de probabilidad de elaboraci\\u00f3n\",\n \"xavier colomes\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"clicks\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 10,\n \"min\": 0,\n \"max\": 76,\n \"num_unique_values\": 14,\n \"samples\": [\n 4,\n 2,\n 76\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"ctr\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 15.025523422750847,\n \"min\": 0.0,\n \"max\": 100.0,\n \"num_unique_values\": 21,\n \"samples\": [\n 7.826982492276004,\n 0.2557544757033248,\n 100.0\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"impressions\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 937,\n \"min\": 1,\n \"max\": 7939,\n \"num_unique_values\": 43,\n \"samples\": [\n 7,\n 5,\n 3\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"position\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 34.170848457350296,\n \"min\": 1.0,\n \"max\": 132.57,\n \"num_unique_values\": 79,\n \"samples\": [\n 68.33,\n 2.74,\n 44.0\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"title\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 89,\n \"samples\": [\n \"Mejora tus campa\\u00c3\\u00b1as de marketing mediante el conductismo\",\n \"Comparativa de las mejores herramientas para medir Apps m\\u00f3viles\",\n \"SEO, HTTPS y la desinformaci\\u00f3n\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"meta\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 85,\n \"samples\": [\n \"El cerebro toma decisiones de dos formas distintas: consciente e inconscientemente. Se sabe que entre el 85% y el 95% de las decisiones que tomamos son de \",\n \"El Modelo de la Probabilidad de Elaboraci\\u00f3n, tambi\\u00e9n conocido como Elaboration Likelihood Model (ELM), trata de\\u00a0c\\u00f3mo tenemos que comunicar para persuad\",\n \"En la cuarta edici\\u00f3n del Clinic SEO analizaron TopRural, la web l\\u00edder en turismo rural. Para ello contamos con la presencia de los ponentes:\\n-\\u00a0\\u00a0\\u00a0\\u00a0\\u00a0\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"h1\",\n \"properties\": {\n \"dtype\": \"string\",\n \"num_unique_values\": 89,\n \"samples\": [\n \"Mejora tus campa\\u00c3\\u00b1as de marketing mediante el conductismo\",\n \"Comparativa de las mejores herramientas para medir Apps m\\u00f3viles\",\n \"SEO, HTTPS y la desinformaci\\u00f3n\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"title_similarity\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 30,\n \"min\": 12,\n \"max\": 100,\n \"num_unique_values\": 42,\n \"samples\": [\n 78,\n 48,\n 30\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"meta_similarity\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 32,\n \"min\": 0,\n \"max\": 100,\n \"num_unique_values\": 51,\n \"samples\": [\n 34,\n 18,\n 24\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"h1_similarity\",\n \"properties\": {\n \"dtype\": \"number\",\n \"std\": 31,\n \"min\": 0,\n \"max\": 100,\n \"num_unique_values\": 41,\n \"samples\": [\n 46,\n 45,\n 30\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n },\n {\n \"column\": \"new_title\",\n \"properties\": {\n \"dtype\": \"category\",\n \"num_unique_values\": 42,\n \"samples\": [\n \"C\\u00f3mo usar Google Device Manager sin perder tus datos\",\n \"Optimizar RSS y SEO en WordPress: Consejos y Estrategias\",\n \"Entrevista a un internet rater de Bing\"\n ],\n \"semantic_type\": \"\",\n \"description\": \"\"\n }\n }\n ]\n}" | |
} | |
}, | |
"metadata": {}, | |
"execution_count": 12 | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment