npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

rise-cped

v0.1.1

Published

rise desktop app for official profile visualization and ingestion

Readme

rise-cped

rise-cped 是一个基于 CPED 数据 的本地可视化与数据更新工具。
它将 Electron 桌面壳、Next.js 前端和本地数据处理流程打包在一起,支持:

  • 官员履历与级别演化可视化
  • 地理流动与地区分布图
  • 关系网络分析(单人网络 / patronage)
  • 借助本地 Claude Code 进行数据采集与增量更新
  • 采集合并版本管理(提交、对比、回滚)

数据来源

  • 基础数据来源:CPED(China Political Elite Database)
  • 数据入口页面:https://www.junyanjiang.com/data.html
  • 本项目在 CPED 结构基础上增加了本地采集与合并能力,用于研究流程中的增量更新

功能概览

  1. 数据可视化(/
  • 多条件筛选(姓名、籍贯、省份、级别)
  • 官员详情卡片与履历表
  • 级别分布、性别占比、全国分布图
  • 晋升时间线、地理流动地图
  • 当前筛选结果导出 CSV
  1. 关系网络(/network/patronage
  • 单人网络视图
  • Patronage 关系视图
  1. 数据采集与更新(/collect
  • 三类工作流:更新已有人物、采集新人物、按范围采集(人/市/省)
  • 自动重试、覆盖率评估、失败目标重试
  • 支持将采集结果合并回 cped_data.json
  • 支持版本历史和回滚

本地 Claude Code 更新数据

本项目支持调用本机 Claude Code Runtime 进行采集。典型流程如下:

  1. 在本机安装并可执行 claude(或配置可发现的 Claude Code 可执行文件)
  2. 配置认证
  • 可使用 ANTHROPIC_AUTH_TOKEN / ANTHROPIC_API_KEY
  • 或在应用内配置 Provider API Key
  1. 启动应用并进入 /collect
  2. 在 Runtime Probe 中检查 Claude Runtime 连通性
  3. 提交采集任务并在完成后执行 ingest commit 写回数据

安装与启动

# 直接通过 npx 启动
npx rise-cped

# 或显式调用 bin
npx -y -p rise-cped rise-cped

CLI 常用参数:

rise-cped --check
rise-cped --port 3000 --host 127.0.0.1
rise-cped --skip-native-check

开发脚本

# Web 开发
npm run dev
npm run dev:web

# Electron 开发
npm run electron:build:main
npm run electron:dev

# 构建与打包
npm run build
npm run electron:build
npm run electron:pack
npm run electron:dist

# npm / 运行时检查
npm run prepare:npm-runtime
npm run cli:check
npm run smoke

关键 API(采集与版本)

  • POST /api/ingest/commit
    • 将采集结果合并进本地数据并生成版本
  • GET /api/ingest/versions
    • 查看版本历史、diff 与冲突摘要
  • POST /api/ingest/revert
    • 回滚到指定版本(或最近版本)

技术栈

  • Electron
  • Next.js App Router
  • React + TypeScript
  • better-sqlite3
  • ECharts

说明

  • 本项目主要面向研究用途与本地分析流程。
  • 使用 CPED 及其他外部来源数据时,请遵循原始数据提供方的使用条款与引用规范。