Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

hfactor/pincode-map

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

7 Commits

Repository files navigation

India PinCodes to Hex Codes

A simple data visualization that maps (pun intended) Postal Index Number (PIN) Codes of India to Hex Triplet colours, resulting in a colourful geographic representation of the Indian Postal Code System.

Overview

This project converts each 6-digit PIN Code into a hexadecimal colour code and displays the corresponding postal areas on an interactive map. Each geographical region of a PIN is filled with the corresponding hexadecimal colour, creating a vibrant mosaic representing Indian postal geography.

Each 6-digit PIN (for example, 560001) becomes a hexadecimal colour code (#560001). For more, read my LinkedIn, Substack Post.

Installation

  1. Download the required data file

    • From data.gov.in, download the data.
    • Place the file as data.geojson in the same directory as index.html.
  2. Start a local web server

    Using Python3 (recommended):

    python -m http.server 8000

    Using Python 2

    python -m SimpleHTTPServer 8000

    Using Node.js:

    npx http-server

    Using PHP:

    php -S localhost:8000
  3. Open in browser

    • Navigate to http://localhost:8000
    • Wait for the map to load (may take time depending on data size)

Dependencies

  • leaflet.js. It is the interactive mapping library.
  • OpenStreetMap for base map tiles.
  • No additional build tools or frameworks are required

References

About

Indian Pincodes to Leaflet Map

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

Languages

AltStyle によって変換されたページ (->オリジナル) /