Project

usamap

0.0
No commit activity in last 3 years
No release in over 3 years
Create a colorized svg map of the USA by county using FIPS coordinates
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

= 2.13.0
 Project Readme

usamap

Create a colorized svg map of the USA using ruby. Plot ranges and colors using FIPS coordinates for US counties.

Installation

  gem install usamap

Example Usage

require 'usamap'

colors = {}
colors[0..5] = '#CD5C5C'
colors[6..100] = 'blue'

stats = {}
stats['35001'] = 3  # 35001 is FIPS for Bernalillo, NM
stats['35049'] = 99 # 35049 is FIPS for Santa Fe, NM

my_map = USAmap.new(stats, colors)
puts my_map

Example Output

alt text

Credits/Resources

SVG Map: http://commons.wikimedia.org/wiki/File:Usa_counties_large.svg

FIPS Codes: http://en.wikipedia.org/wiki/FIPS_county_code

Inspiration

http://flowingdata.com/2009/11/12/how-to-make-a-us-county-thematic-map-using-free-tools/