{ "cells": [ { "cell_type": "markdown", "id": "6afd175b", "metadata": {}, "source": [ "# Biomedical Literature 2024–2025\n", "\n", "Starter notebook for the Kaggle dataset in this folder. It loads `europepmc_articles.csv` with pandas and walks through quality checks and a first piece of analysis.\n", "\n", "**Files:** `europepmc_articles.csv`, `data_dictionary.csv`." ] }, { "cell_type": "markdown", "id": "0000f7f2", "metadata": {}, "source": [ "## 1. Load the data" ] }, { "cell_type": "code", "id": "6937693e", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "import pandas as pd\n", "\n", "df = pd.read_csv(\"europepmc_articles.csv\", low_memory=False)\n", "print(df.shape)" ] }, { "cell_type": "markdown", "id": "325de123", "metadata": {}, "source": [ "## 2. Shape, types and missing values" ] }, { "cell_type": "code", "id": "6eb42bc8", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "print(f\"{df.shape[0]:,} rows x {df.shape[1]} columns\")\n", "\n", "missing = df.isna().mean().mul(100).sort_values(ascending=False)\n", "missing[missing > 0].round(1).to_frame(\"missing_%\").head(15)" ] }, { "cell_type": "markdown", "id": "f2d963fe", "metadata": {}, "source": [ "## 3. Numeric summary" ] }, { "cell_type": "code", "id": "aa2f8fd4", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "df.describe(include='number').T.round(2).head(20)" ] }, { "cell_type": "markdown", "id": "de453c51", "metadata": {}, "source": [ "## 4. Publication years" ] }, { "cell_type": "code", "id": "d517e468", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "df[\"pub_year\"].value_counts().sort_index().to_frame(\"articles\")" ] }, { "cell_type": "markdown", "id": "8dd9f9f8", "metadata": {}, "source": [ "## 5. Top journals" ] }, { "cell_type": "code", "id": "3f8a891e", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "df[\"journal_title\"].value_counts().head(15).to_frame(\"articles\")" ] }, { "cell_type": "markdown", "id": "7c30252f", "metadata": {}, "source": [ "## 6. Review share" ] }, { "cell_type": "code", "id": "beac0226", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "df[\"is_review\"].value_counts(normalize=True).mul(100).round(1)" ] }, { "cell_type": "markdown", "id": "e5a70599", "metadata": {}, "source": [ "## 7. Citations distribution" ] }, { "cell_type": "code", "id": "b6a52645", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "df[\"cited_by_count\"].dropna().clip(upper=100).hist(bins=40, figsize=(8, 4))" ] }, { "cell_type": "markdown", "id": "7614fc75", "metadata": {}, "source": [ "## 8. MeSH terms" ] }, { "cell_type": "code", "id": "6ebf26c1", "metadata": {}, "execution_count": null, "outputs": [], "source": [ "(df[\"mesh_terms\"].dropna().str.split(\";\").explode()\n", " .str.strip().value_counts().head(20).to_frame(\"articles\"))" ] }, { "cell_type": "markdown", "id": "6e43770c", "metadata": {}, "source": [ "## Next steps\n", "\n", "See `KAGGLE.md` for analysis ideas, caveats and provenance." ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "name": "python", "version": "3.11", "mimetype": "text/x-python", "file_extension": ".py", "codemirror_mode": { "name": "ipython", "version": 3 }, "pygments_lexer": "ipython3", "nbconvert_exporter": "python" } }, "nbformat": 4, "nbformat_minor": 5 }