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 9031059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:38:22+00:00 2026-06-16T07:38:22+00:00

I’m afraid I’m having some trouble doing what should be relatively easy. I’m trying

  • 0

I’m afraid I’m having some trouble doing what should be relatively easy. I’m trying to effectively duplicate the ggplot map from this question World Map – Plotting Circles, size of circle relevant to No of using output from the Google geocode API. I passed it a bunch of questionably-formatted, free-text location data (i.e. what it’s good at), and got the following table.

> summary(userlocations)
       ID              lon                lat             lonmin        
 Min.   :   1.0   Min.   :-169.867   Min.   :-82.86   Min.   :-180.000  
 1st Qu.: 618.8   1st Qu.: -91.815   1st Qu.: 33.72   1st Qu.: -91.956  
 Median :1200.0   Median : -77.201   Median : 40.06   Median : -78.110  
 Mean   :1220.5   Mean   : -49.884   Mean   : 35.40   Mean   : -51.709  
 3rd Qu.:1804.2   3rd Qu.:  -2.248   3rd Qu.: 45.52   3rd Qu.:  -2.798  
 Max.   :2500.0   Max.   : 174.886   Max.   : 71.29   Max.   : 174.771  
                  NA's   :643        NA's   :643      NA's   :643       
     lonmax             latmin           latmax            location   
 Min.   :-169.774   Min.   :-90.00   Min.   :-61.00   London   :  65  
 1st Qu.: -89.013   1st Qu.: 33.07   1st Qu.: 33.95   Canada   :  31  
 Median : -75.891   Median : 39.74   Median : 40.59   Atlanta  :  25  
 Mean   : -47.521   Mean   : 34.01   Mean   : 36.86   England  :  22  
 3rd Qu.:  -1.521   3rd Qu.: 44.37   3rd Qu.: 47.08   New York :  22  
 Max.   : 180.000   Max.   : 71.23   Max.   : 85.41   Las Vegas:  21  
 NA's   :643        NA's   :643      NA's   :643      (Other)  :3286

while I know enough to just do something like:

map(database="worldHires")
points(userlocations$lon, userlocations$lat, pch=20)

that produces a fairly small, ugly map. in order to reproduce the ggplot example, I need to (at minimum) get a counter of duplicate lat/lon entires, so I know when there are e.g. 65 people in London, but it seems that I can’t just use userlocations$location, because this field just contains the non-normalized free text that I passed to Google in the first place; only lon and lat appear to have useful data.

I apologize for the simplicity of this question, but if someone could help, I’d really appreciate it.

  • 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-16T07:38:23+00:00Added an answer on June 16, 2026 at 7:38 am

    if you can format the code neatly into two vectors x (longitude) and y (latitute), then you could use:

    require(ggplot2)
    ggplot(data.frame(x = x, y = y, circle_size = '\\add a vector'), aes(x, y, size = circle_size) + geom_point()
    

    I didn’t test the above function, but it should produce a very similar plot to the example you provided.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I am doing a simple coin flipping experiment for class that involves flipping a
I am trying to render a haml file in a javascript response like so:

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.