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 🙏

© 2024 – Pkg Stats / Ryan Hefner

svg-japan

v1.1.2

Published

A native JavaScript-built plugin that generates an interactive SVG-formatted map of Japan

Downloads

47

Readme

screenshot

Features

  • Multiple types of Japanese maps can be generated.
  • The presence or absence of a map border can be switch.
  • Regions can be defined by freely grouping prefectures.
  • All prefectures can be unified in one color.
  • Normal and active colors can be set for each prefecture and region.
  • The tip helper can be pop up when on mouse over.
  • You can get the event fired on JavaScript when the prefecture is clicked.

Quick Start

Several quick start options are available:

  • Clone this repository
git clone https://github.com/ka215/svg-japan.git
  • Install from npm
npm install svg-japan
  • Download an archive file of latest release Letest Release
  • Retrieve via CDN into your HTML
<script src="https://cdn.jsdelivr.net/gh/ka215/svg-japan@main/dist/svg-japan.min.js"></script>

Usage

  1. Include this plugin script into your HTML.
<script src="/path/to/svg-japan.min.js"></script>
  1. Then mark up the element where you want to insert the map.
<div id="my-map-container"></div>
  1. Finally, instantiate the plugin class in your script.
svgJapan({ element: "#my-map-container" })

Alternatively, you can create the container element in JavaScript.

var map = svgJapan()

document.body.appendChild( map.map_container )

It is desirable to execute the dispatcher function after the files of this plugin are completely loaded. To do this, a structure that waits for the DOM content to finish loading, such as:

document.addEventListener( 'DOMContentLoaded', function() {

  svgJapan()

}, false)

Supported Devices

Please refer to the target device definition of JS transpiling (excerpt from "babel.config.js" below):

targets: {
  chrome: "67",
  edge: "17",
  firefox: "60",
  ie: "11",
  safari: "11.1",
},

Documentation

Refer to the following page for the options that can be set and the method description.

Interactive Japan Map Generation Plugin

Demonstration

The shortcut is to use it for the time being.

DEMO

Creators

ka2 (Katsuhiko Maeno)

If you liked using this app or it has helped you in any way, I'd like you send me an email at [email protected] about anything you'd want to say about this software. I'd really appreciate it!

Copyright and license

Code and documentation copyright 2020 the ka2. Code released under the MIT License.