Skip to content

More common kanji are in brighter colors, rarer ones are duller. Visualize Kanji frequency rankings from 17+ sources.

License

Notifications You must be signed in to change notification settings

PikaPikaGems/kanji-heatmap

Repository files navigation

Kanji Heatmap (previously Kanji Companion)

main page

kanji details mobile screen

sort and filter dialog

Development

$ pnpm install
$ pnpm run dev --host

Updating Data

If you have both Kanji Heatmap Data and this repository in the same directory, you can directly copy its output files

cp ../kanji-heatmap-data/output/*.json ./public/json

Build Analysis

Analyze the build with

ANALYZE=true ANALYZE_TEMPLATE=flamegraph pnpm run build
# ANALYZE_TEMPLATE can be sunburst, treemap, network, raw-data, list, or flamegraph

Configure the visualizer settings in vite.config.ts if you want

Preview

$ pnpm run peek
  ➜  Local:   http://localhost:4173/
  ➜  Network: http://192.168.254.107:4173/
  ➜  press h + enter to show help

Updating the Data (Production)

Get the latest tar.gz from the Kanji Heatmap Data repository

curl -OL https://github.com/PikaPikaGems/kanji-heatmap-data/releases/latest/download/kanji-heatmap-data.tar.gz

Uncompress and store the json files in ./public/json

tar -xzf ./kanji-heatmap-data.tar.gz -C ./public/json/

You should have the following files updated

ls -la public/json

    1759 component_keyword.json
    2118 cum_use.json
  369264 kanji_extended.json
  284376 kanji_main.json
    2187 phonetic.json
  200687 vocab_furigana.json
  191712 vocab_meaning.json

Delete the tar.gz file since it's not needed anymore

rm kanji-heatmap-data.tar.gz

Talk to Us

About

More common kanji are in brighter colors, rarer ones are duller. Visualize Kanji frequency rankings from 17+ sources.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published