Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9171297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:08:36+00:00 2026-06-17T16:08:36+00:00

I am attempting to make a heat map / choropleth / thematic plot of

  • 0

I am attempting to make a heat map / choropleth / thematic plot of the USA by county using the R “maps” package. Unfortunately some counties seem to be missing from the database.

library(maps)
data(county.fips)
which(county.fips[,1] == 35006)
which(county.fips[,2] == 'new mexico,cibola')

results in no entries found

> library(maps)
> data(county.fips)
> which(county.fips[,1] == 35006)
integer(0)
> which(county.fips[,2] == 'new mexico,cibola')
integer(0)

I know that this fips code exists! (http://en.wikipedia.org/wiki/Cibola_County,_New_Mexico
http://en.wikipedia.org/wiki/List_of_counties_in_New_Mexico )

Anyone know how I can make my full plot? All I could find on this was listed here: http://grokbase.com/t/r/r-sig-geo/0964515wmd/missing-county-in-maps

Thanks for your help!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T16:08:37+00:00Added an answer on June 17, 2026 at 4:08 pm

    Ah ha, the problem is not with map, but county.fips. Cibola County does not appear in that dataset, so when I went to match my data {variable-to-plot, FIPS code} to the list, Cibola was always missing.

    There is a work-around for displaying Cibola county… write an explicit line for the county that does not involve the county.fips dataset.

    countynames <- match(county.fips[,"fips"], mydatavector$fips)
    cibola_value <- mydatavector[which(mydatavector$fips == 35006)]
    m <- map("county")
    map("county", countynames, col=rainbow(100)[mydatavector$var_to_plot], fill=TRUE, add=TRUE)
    map("county", "new mexico,cibola", col=rainbow(100)[cibola_value], fill=TRUE, add=TRUE)
    

    Note: I also found that the map function had trouble plotting all counties in the US, but if I split up the call into 2 sets it worked.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm attempting to make a python package of the following hierarchy: \standard \__init__.py \text.txt
I am attempting to make my first mobile website by just using a different
I was attempting to make some expression templates as an answer to this question
I'm attempting to make a StateMachine execute some database action between states. So I
I'm attempting to make a geospatial query in mongodb using the $within operator. I
I am attempting to make some cross-DB(SQL Server and PostgreSQL) compatible SQL. What I
I am attempting to make a game using java, and I need a plugin
I'm attempting to make an Odata post using odata4j. After dumping the posted xml
I am attempting to make a HTTPS connection to a website using HttpsURLConnection ,
I am attempting to make a pie chart using a php file that gets

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.