Code Monkey home page Code Monkey logo

zip_code_map's Introduction

zip_code_map

Synopsis

This project is intended to provide guidance on one possible way to match zip codes to a pair of lat/long coordinates and displaying those on a Google Map.

Motivation

Several medical clinics have expressed interest in being able to map their patients homes for a rough idea where to expand services. This process gives them one possible way to see that.

Requirements

  • A valid Google Maps API key
  • A working internet connection to reach the Google Maps service and reach the markerclusterer.js file hosted by Cloudflare.

Notes

In this process all the pins are stored within the html document to reduce the number of data sources and connections that administrative staff need to connect to, especially when sharing maps with outside parties, like consultants.

Data Sources

ZCTA crosswalk

  • Contains ZIP code to Zip Code Tabulation Area (ZCTA) mappings ZCTA coordinates
  • Contains latitude and longitude for each ZCTA

Both have been matched into the zip_zcta_lat_long.csv file in this repository.

Instructions

You need to match the zip codes you want to map to latitudes and longitudes to utilize them in Google Maps. How you do this will depend on where you are getting your zip code data from. In the sample map you should see that these are turned into an array of JSON objects with the properties "latitude", "longitude", and "Zipcode". The "Zipcode" property is optional and only there for human readability.

Once you have your JSON array you can use the sample_map - template.html as a starting point, making the following changes:

  1. Replace on line 40 with your own Google Maps API key
  2. Replace the JSON array (lines 45-495) with your own data
  3. You may also want to update where the maps centers at line 507

zip_code_map's People

Contributors

mhokanson avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.