arcgis-to-portaljs
Migrate a whole ArcGIS Hub site into a PortalJS Arc portal end-to-end. Harvests the Hub /data.json (DCAT-US) inventory, exports every FeatureService layer…
Add a chart (line, bar, area, pie, or scatter) to a dataset's showcase in a PortalJS portal. Installs recharts, writes a reusable Chart component, and renders it in the showcase Views section. Use when visualizing a dataset already registered in datasets.json.
$ npx -y skills add datopian/portaljs --skill portaljs-add-chart --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/portaljs-add-chartContext preview
The summary Claude sees to decide when to auto-load this skill.
Add a chart (line, bar, area, pie, or scatter) to a dataset's showcase in a PortalJS portal. Installs recharts, writes a reusable Chart component, and renders it in the showcase Views section. Use when visualizing a dataset already registered in datasets.json.
name: portaljs-add-chart description: Add a chart (line, bar, area, pie, or scatter) to a dataset's showcase in a PortalJS portal. Installs recharts, writes a reusable Chart component, and renders it in the showcase Views section. Use when visualizing a dataset already registered in datasets.json. allowed-tools: Read, Write, Edit, Bash(npm:*), Bash(npx:*) version: 1.0.0 author: Datopian <hello@datopian.com> license: MIT compatibility: Claude Code with PortalJS portals (Next.js 14, React 18, Node 18+). Runs from any project via the plugin, a personal ~/.claude/commands install, or a portaljs clone. tags: - portaljs - data-portal - chart - recharts - dataviz - nextjs
Add a visualization to a dataset's **showcase** in a PortalJS portal. The skill installs `recharts` (added directly — never `@portaljs/components`), writes a reusable client-side `Chart` component into `components/`, and renders a `<Chart />` into the **Views** section of the showcase route `pages/[owner]/[slug].tsx` for one chosen dataset. The chart reads the same `/public/data/<file>` the showcase `<Table />` already uses, so no data is duplicated. Five chart types are supported: line, bar, area, pie, and scatter.
The canonical, full step-by-step workflow is [`.claude/commands/portaljs-add-chart.md`](https://github.com/datopian/portaljs/blob/main/.claude/commands/portaljs-add-chart.md) — the single source of truth. Read and follow it when executing. Summary:
1. Gather input — dataset slug, X column, Y column(s), chart type (default `line`), portal directory. If any is missing, interview the user; never dead-end on a missing value. 2. Resolve the dataset from `datasets.json` (`namespace`, `file`, `format`). 3. Validate that the X and every Y column exist in the data file's header; warn on non-numeric Y columns (values are coerced with `Number()`). 4. Install the chart library: `npm install recharts@^2.15.0`. 5. Write `components/Chart.tsx` (idempotent — do not overwrite a customized component). 6. Render `<Chart />` into the Views section, gated on the dataset's `(namespace, slug)` so other showcases are unaffected. Extend an existing view-dispatch block, do not overwrite. 7. Verify with `npx tsc --noEmit`. 8. Report the component, route, and dependency added.
`package.json` (`recharts@^2.15.0`).
| Symptom | Cause | Fix | | --- | --- | --- | | Missing dataset/columns | Slug or column not in manifest/header | List available slugs/headers and re-prompt; do not error out. | | Gaps in the chart | Non-numeric cells coerced to `NaN` | Clean the source data or pick a numeric Y column. | | `tsc` failure | Bad column prop or import path | Fix the first reported error before reporting success. | | Sluggish render | Over ~2,000 SVG points | Pre-aggregate the series (e.g. yearly buckets). |
/portaljs-add-chart co2-emissions x=year y=emissions type=line
/portaljs-add-chart trade x=year y=imports,exports type=bar
/portaljs-add-chart budget x=department y=amount type=pie
🌀 AI-native framework for building data portals. Scaffold a full portal from a brief and load datasets in minutes with agentic skills — any backend (CKAN, GitHub, Frictionless).
Repo: datopian/portaljs
Migrate a whole ArcGIS Hub site into a PortalJS Arc portal end-to-end. Harvests the Hub /data.json (DCAT-US) inventory, exports every FeatureService layer…
Add a dataset (CSV, TSV, JSON, or GeoJSON) to an existing PortalJS portal. Appends an entry to datasets.json so the catalog and showcase render it…
Make a PortalJS portal harvestable by national/EU/US open-data portals — emit standards-compliant DCAT catalog feeds (DCAT 2/3, DCAT-AP, DCAT-US, national…
Auto-ingest a geospatial file (GeoJSON, Shapefile, GeoPackage, KML/KMZ, FlatGeobuf, CSV-with-geometry) into a PortalJS portal on the user's own machine, with…
Render a GeoJSON dataset on an interactive Leaflet map in the Views section of a dataset's showcase. Installs react-leaflet and a Map component, then renders…
Add another file (resource) to an EXISTING dataset in a PortalJS portal — a data dictionary, methodology, or an additional data file. Turns a single-file…