Your SlideShare is downloading. ×
GeoMapper, Python Script for Visualizing Data on Social Networks with Geo-location data
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

GeoMapper, Python Script for Visualizing Data on Social Networks with Geo-location data

6,671
views

Published on

This lecture was presented at the XXVI Pernambuco's Python User Group meeting at 06.04.2013 …

This lecture was presented at the XXVI Pernambuco's Python User Group meeting at 06.04.2013

Published in: Technology, Education

0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
6,671
On Slideshare
0
From Embeds
0
Number of Embeds
58
Actions
Shares
0
Downloads
0
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. GeoLocation Friends Visualizer Plotting your location social network dataMarcel Caraciolo@marcelcaracioloDeveloper, Cientist, contributor to the Crab recsys project,works with Python for 6 years, interested at mobile,education, machine learning and dataaaaa!Recife, Brazil - http://aimotion.blogspot.com
  • 2. How your friends are connected ?
  • 3. How your friends are connected ?Where are they ?
  • 4. Atépassar snapshot 300k users - March 2013
  • 5. Can I use it ??? Please!
  • 6. Of course!https://github.com/marcelcaraciolo/Geo-Friendship-Visualization
  • 7. Of course!if  __name__  ==  __main__:        parser  =  OptionParser(usage=SUPPRESS_USAGE)        print  geocialMapper  v.%snBy  %sn  %(__version__,__author__)        print  "Type  -­‐-­‐help  parameter  for  help.n"        parser.add_option(-­‐i,-­‐-­‐input-­‐file,dest=input_file,                                              help=Pickle  object  file  with  coordinates  and  quantity)        parser.add_option(-­‐s,-­‐-­‐size,dest=size,                                              help=image  dimmensions  height,width)        parser.add_option(-­‐o,  -­‐-­‐output-­‐file,  dest=output_file,  default=  map.jpg,                                              help=Output  file  for  saving  the  image)        parser.add_option(-­‐c,  -­‐-­‐colormap,  dest=mode,  default=wb,                                              help=Mode  of  colormap  used:  wb,  all)        parser.add_option(-­‐p,  -­‐-­‐connection,  dest=n_connections,  default=0,  type=int,                                              help=  Threshold  for  the  number  of  interconnections  between  cities)        (options,args)  =  parser.parse_args()        if  not  options.input_file:                parser.error(You  must  specifiy  a  valid  pickle  object  to  load  data  (-­‐i  parameter)  !)        if  not  options.size:                parser.error(You  must  specifiy  the  dimmensions  of  the  image  (-­‐s  parameter)  !)        run_main(options)
  • 8. Of course!$  python  geo_mapper.py  -­‐i    data.pk    -­‐s  1600,1600    -­‐o    output_map.jpg {  ((latO,longO),(latD,longD)):  qtd,  ...} #(latO,longO)  are  the  latitude  and  longitude  of   the  origin  location.  Both  are  float  values. #(latD,longD)  ate  the  latitude  and  longitude  of   the  destiny  location.  Both  are  float  values. #qtd:  An  integer  that  represents  the  number  of   connections  between  both  coordinates  (cities).
  • 9. Code available!https://github.com/marcelcaraciolo/Geo-Friendship-Visualization
  • 10. GeoLocation Friends Visualizer Plotting your location social network dataMarcel Caraciolo@marcelcaracioloDeveloper, Cientist, contributor to the Crab recsys project,works with Python for 6 years, interested at mobile,education, machine learning and dataaaaa!Recife, Brazil - http://aimotion.blogspot.com

×