{ "cells": [ { "cell_type": "markdown", "id": "f46deed3", "metadata": {}, "source": [ "# Website Technology Stack of 2M Companies (2026): starter notebook\n", "\n", "This file is a **sample**. The full data, the withheld fields and monthly updates come from the [Radar API](https://github.com/fliarbi/radar-api-mcp). This notebook loads the sample, explores it, then gets one record's full detail from the API." ] }, { "cell_type": "code", "execution_count": null, "id": "1bd596b2", "metadata": {}, "outputs": [], "source": [ "import glob, pandas as pd, matplotlib.pyplot as plt\n", "path = (glob.glob('/kaggle/input/**/website_technology_stack_sample.csv', recursive=True) or ['website_technology_stack_sample.csv'])[0]\n", "df = pd.read_csv(path, low_memory=False)\n", "print(df.shape); df.head()" ] }, { "cell_type": "code", "execution_count": null, "id": "de01c633", "metadata": {}, "outputs": [], "source": [ "df.describe(include=\"all\").T.head(30)" ] }, { "cell_type": "code", "execution_count": null, "id": "3b9507a7", "metadata": {}, "outputs": [], "source": [ "tech = df.technologies.str.split('|').explode()\n", "(tech.value_counts().head(25) / len(df)).round(3)" ] }, { "cell_type": "code", "execution_count": null, "id": "f5d229c2", "metadata": {}, "outputs": [], "source": [ "for t in ['wordpress', 'shopify', 'react', 'next.js']:\n", " df[t] = df.technologies.str.split('|').map(lambda s, t=t: t in s)\n", "df.groupby('country')[['wordpress', 'shopify', 'react', 'next.js']].mean().loc[df.country.value_counts().head(10).index].round(3)" ] }, { "cell_type": "code", "execution_count": null, "id": "864af12d", "metadata": {}, "outputs": [], "source": [ "df.technology_count.plot.hist(bins=50, figsize=(9, 3), title='Technologies per site (sample)')" ] }, { "cell_type": "markdown", "id": "90184c08", "metadata": {}, "source": [ "## Get the full record from the Radar API\n", "\n", "The sample lists the technologies detected on the home page. The API returns the technology field with every observed technology, plus traffic, web presence and the full company profile. [Create a key](https://fliarbi.com/radar-api/developer), then add it to Kaggle **Add-ons → Secrets** as `RADAR_API_KEY`." ] }, { "cell_type": "code", "execution_count": null, "id": "a051ee9b", "metadata": {}, "outputs": [], "source": [ "import os, json, requests\n", "key = os.environ.get('RADAR_API_KEY')\n", "try:\n", " from kaggle_secrets import UserSecretsClient\n", " key = key or UserSecretsClient().get_secret('RADAR_API_KEY')\n", "except Exception:\n", " pass\n", "value = df['company_domain'].dropna().astype(str).iloc[0]\n", "if key:\n", " r = requests.post('https://radar-api.fliarbi.com/v1/companies/field', headers={'Authorization': f'Bearer {key}'},\n", " json={'field': 'technology', 'item_limit': 100, 'domain': value}, timeout=60)\n", " print(json.dumps(r.json(), indent=1)[:3000])\n", "else:\n", " print('Set RADAR_API_KEY to fetch the full record for', value)" ] }, { "cell_type": "markdown", "id": "3a94fc2a", "metadata": {}, "source": [ "Each row also has `fliar_profile_url`, the company's full profile. Repository, docs and MCP setup: https://github.com/fliarbi/radar-api-mcp" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 5 }