Skip to content

Commit

Permalink
Added country codes to the base xy line plot.
Browse files Browse the repository at this point in the history
  • Loading branch information
brianhigh committed Jan 11, 2016
1 parent 0787713 commit ad82718
Show file tree
Hide file tree
Showing 8 changed files with 90 additions and 86 deletions.
24 changes: 12 additions & 12 deletions data/www_cubagob_cu/ipinfo.csv
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"ip","country_code","country_name","region_code","region_name","city","zip_code","time_zone","latitude","longitude","metro_code","mean_rtt"
"128.95.230.102","US","United States","WA","Washington","Seattle","98105","America/Los_Angeles",47.6606,-122.2919,"819",1.73366666666667
"209.124.188.134","US","United States","WA","Washington","Seattle","98105","America/Los_Angeles",47.6606,-122.2919,"819",1.69666666666667
"198.104.202.5","US","United States","CO","Colorado","Englewood","80111","America/Denver",39.6237,-104.8738,"751",2.373
"64.86.123.41","US","United States","DE","Delaware","Wilmington","19808","America/New_York",39.7351,-75.6684,"504",0.976
"64.86.123.2","US","United States","DE","Delaware","Wilmington","19808","America/New_York",39.7351,-75.6684,"504",0.00666666666666667
"64.86.124.30","US","United States","DE","Delaware","Wilmington","19808","America/New_York",39.7351,-75.6684,"504",68.7756666666667
"66.198.96.45","CA","Canada","QC","Quebec","Montreal","H3C","America/Toronto",45.498,-73.5472,"0",73.4
"66.198.96.34","CA","Canada","QC","Quebec","Montreal","H3C","America/Toronto",45.498,-73.5472,"0",220.367
"200.0.16.85","CU","Cuba","","","","","America/Havana",21.5,-80,"0",182.232666666667
"200.0.16.196","CU","Cuba","","","","","America/Havana",21.5,-80,"0",181.764
"200.0.16.182","CU","Cuba","","","","","America/Havana",21.5,-80,"0",186.521666666667
"169.158.128.54","CU","Cuba","08","Provincia de Ciego de Avila","Habana","","America/Havana",22.2514,-78.9131,"0",186.711
"128.95.230.102","US","United States","WA","Washington","Seattle","98105","America/Los_Angeles",47.6606,-122.2919,"819",0.558666666666667
"209.124.188.134","US","United States","WA","Washington","Seattle","98105","America/Los_Angeles",47.6606,-122.2919,"819",0.779333333333333
"198.104.202.5","US","United States","CO","Colorado","Englewood","80111","America/Denver",39.6237,-104.8738,"751",1.411
"64.86.123.41","US","United States","DE","Delaware","Wilmington","19808","America/New_York",39.7351,-75.6684,"504",1.726
"64.86.123.2","US","United States","DE","Delaware","Wilmington","19808","America/New_York",39.7351,-75.6684,"504",0.933
"64.86.124.30","US","United States","DE","Delaware","Wilmington","19808","America/New_York",39.7351,-75.6684,"504",69.3933333333333
"66.198.96.45","CA","Canada","QC","Quebec","Montreal","H3C","America/Toronto",45.498,-73.5472,"0",69.388
"66.198.96.34","CA","Canada","QC","Quebec","Montreal","H3C","America/Toronto",45.498,-73.5472,"0",382.888
"200.0.16.85","CU","Cuba","","","","","America/Havana",21.5,-80,"0",182.564
"200.0.16.196","CU","Cuba","","","","","America/Havana",21.5,-80,"0",181.603333333333
"200.0.16.182","CU","Cuba","","","","","America/Havana",21.5,-80,"0",185.899
"169.158.128.54","CU","Cuba","08","Provincia de Ciego de Avila","Habana","","America/Havana",22.2514,-78.9131,"0",187.810333333333
28 changes: 14 additions & 14 deletions data/www_cubagob_cu/route.csv
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
"addr","mean_rtt","rtt.1","rtt.2","rtt.3"
"128.95.230.102",1.73366666666667,1.822,1.728,1.651
"10.132.1.73",1.768,1.725,1.829,1.75
"10.132.1.75",2.59766666666667,3.04,2.983,1.77
"209.124.188.134",1.69666666666667,1.722,1.684,1.684
"198.104.202.5",2.373,2.258,2.425,2.436
"64.86.123.41",0.976,1.5,1.349,0.079
"64.86.123.2",0.00666666666666667,0.02,0,0
"64.86.124.30",68.7756666666667,68.691,68.81,68.826
"66.198.96.45",73.4,73.346,73.417,73.437
"66.198.96.34",220.367,220.284,220.405,220.412
"200.0.16.85",182.232666666667,182.07,182.208,182.42
"200.0.16.196",181.764,182.193,181.62,181.479
"200.0.16.182",186.521666666667,185.387,187.089,187.089
"169.158.128.54",186.711,187.089,186.522,186.522
"128.95.230.102",0.558666666666667,0.631,0.495,0.55
"10.132.1.73",0.647666666666667,0.582,0.749,0.612
"10.132.1.75",0.826666666666667,0.792,0.847,0.841
"209.124.188.134",0.779333333333333,0.798,0.774,0.766
"198.104.202.5",1.411,1.432,1.424,1.377
"64.86.123.41",1.726,1.88,1.734,1.564
"64.86.123.2",0.933,0.981,0.936,0.882
"64.86.124.30",69.3933333333333,69.382,69.319,69.479
"66.198.96.45",69.388,69.434,69.381,69.349
"66.198.96.34",382.888,382.934,382.832,382.898
"200.0.16.85",182.564,182.002,182.674,183.016
"200.0.16.196",181.603333333333,181.715,181.599,181.496
"200.0.16.182",185.899,184.77,186.395,186.532
"169.158.128.54",187.810333333333,187.828,187.818,187.785
28 changes: 14 additions & 14 deletions data/www_cubagob_cu/route.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
traceroute to www.cubagob.cu (169.158.128.86), 30 hops max, 60 byte packets
1 128.95.230.102 1.822 ms 1.728 ms 1.651 ms
2 10.132.1.73 1.725 ms 1.829 ms 1.750 ms
3 10.132.1.75 3.040 ms 2.983 ms 1.770 ms
4 209.124.188.134 1.722 ms 1.684 ms 1.684 ms
5 198.104.202.5 2.258 ms 2.425 ms 2.436 ms
6 64.86.123.41 1.500 ms 1.349 ms 0.079 ms
7 64.86.123.2 0.020 ms 0.000 ms 0.000 ms
8 64.86.124.30 68.691 ms 68.810 ms 68.826 ms
9 66.198.96.45 73.346 ms 73.417 ms 73.437 ms
10 66.198.96.34 220.284 ms 220.405 ms 220.412 ms
11 200.0.16.85 182.070 ms 182.208 ms 182.420 ms
12 200.0.16.196 182.193 ms 181.620 ms 181.479 ms
13 200.0.16.182 185.387 ms 187.089 ms 187.089 ms
14 169.158.128.54 187.089 ms 186.522 ms 186.522 ms
1 128.95.230.102 0.631 ms 0.495 ms 0.550 ms
2 10.132.1.73 0.582 ms 0.749 ms 0.612 ms
3 10.132.1.75 0.792 ms 0.847 ms 0.841 ms
4 209.124.188.134 0.798 ms 0.774 ms 0.766 ms
5 198.104.202.5 1.432 ms 1.424 ms 1.377 ms
6 64.86.123.41 1.880 ms 1.734 ms 1.564 ms
7 64.86.123.2 0.981 ms 0.936 ms 0.882 ms
8 64.86.124.30 69.382 ms 69.319 ms 69.479 ms
9 66.198.96.45 69.434 ms 69.381 ms 69.349 ms
10 66.198.96.34 382.934 ms 382.832 ms 382.898 ms
11 200.0.16.85 182.002 ms 182.674 ms 183.016 ms
12 200.0.16.196 181.715 ms 181.599 ms 181.496 ms
13 200.0.16.182 184.770 ms 186.395 ms 186.532 ms
14 169.158.128.54 187.828 ms 187.818 ms 187.785 ms
15 * * *
16 * * *
17 * * *
Expand Down
26 changes: 13 additions & 13 deletions data/www_gov_ro/ipinfo.csv
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
"ip","country_code","country_name","region_code","region_name","city","zip_code","time_zone","latitude","longitude","metro_code","mean_rtt"
"128.95.230.102","US","United States","WA","Washington","Seattle","98105","America/Los_Angeles",47.6606,-122.2919,"819",0
"209.124.188.134","US","United States","WA","Washington","Seattle","98105","America/Los_Angeles",47.6606,-122.2919,"819",0
"198.104.202.5","US","United States","CO","Colorado","Englewood","80111","America/Denver",39.6237,-104.8738,"751",0
"129.250.5.46","US","United States","CO","Colorado","Englewood","80111","America/Denver",39.6237,-104.8738,"751",0
"129.250.3.43","US","United States","CO","Colorado","Englewood","80111","America/Denver",39.6237,-104.8738,"751",52.013
"129.250.2.163","US","United States","CO","Colorado","Englewood","80111","America/Denver",39.6237,-104.8738,"751",48
"129.250.2.138","US","United States","CO","Colorado","Englewood","80111","America/Denver",39.6237,-104.8738,"751",67.992
"129.250.3.84","US","United States","CO","Colorado","Englewood","80111","America/Denver",39.6237,-104.8738,"751",78.6593333333333
"129.250.3.21","US","United States","CO","Colorado","Englewood","80111","America/Denver",39.6237,-104.8738,"751",163.992
"129.250.3.94","US","United States","CO","Colorado","Englewood","80111","America/Denver",39.6237,-104.8738,"751",181.334333333333
"212.119.15.18","GB","United Kingdom","ENG","England","London","EC4N","Europe/London",51.5144,-0.0941,"0",188.015666666667
"193.151.28.17","RO","Romania","","","","","Europe/Bucharest",46,25,"0",192.000666666667
"85.120.75.2","RO","Romania","","","","","Europe/Bucharest",46,25,"0",190.681
"128.95.230.102","US","United States","WA","Washington","Seattle","98105","America/Los_Angeles",47.6606,-122.2919,"819",2.50433333333333
"209.124.188.134","US","United States","WA","Washington","Seattle","98105","America/Los_Angeles",47.6606,-122.2919,"819",0.703333333333333
"198.104.202.5","US","United States","CO","Colorado","Englewood","80111","America/Denver",39.6237,-104.8738,"751",1.25233333333333
"129.250.5.46","US","United States","CO","Colorado","Englewood","80111","America/Denver",39.6237,-104.8738,"751",0.967333333333333
"129.250.3.43","US","United States","CO","Colorado","Englewood","80111","America/Denver",39.6237,-104.8738,"751",72.516
"129.250.2.163","US","United States","CO","Colorado","Englewood","80111","America/Denver",39.6237,-104.8738,"751",52.473
"129.250.2.138","US","United States","CO","Colorado","Englewood","80111","America/Denver",39.6237,-104.8738,"751",73.6003333333333
"129.250.3.84","US","United States","CO","Colorado","Englewood","80111","America/Denver",39.6237,-104.8738,"751",86.7273333333333
"129.250.3.21","US","United States","CO","Colorado","Englewood","80111","America/Denver",39.6237,-104.8738,"751",160.831333333333
"129.250.3.94","US","United States","CO","Colorado","Englewood","80111","America/Denver",39.6237,-104.8738,"751",180.552
"212.119.15.18","GB","United Kingdom","ENG","England","London","EC4N","Europe/London",51.5144,-0.0941,"0",206.475666666667
"193.151.28.17","RO","Romania","","","","","Europe/Bucharest",46,25,"0",196.424
"85.120.75.2","RO","Romania","","","","","Europe/Bucharest",46,25,"0",195.109666666667
30 changes: 15 additions & 15 deletions data/www_gov_ro/route.csv
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
"addr","mean_rtt","rtt.1","rtt.2","rtt.3"
"128.95.230.102",0,0,0,0
"10.132.1.73",0,0,0,0
"10.132.1.75",0,0,0,0
"209.124.188.134",0,0,0,0
"198.104.202.5",0,0,0,0
"129.250.5.46",0,0,0,0
"129.250.3.43",52.013,52.013,52.013,52.013
"129.250.2.163",48,48,48,48
"129.250.2.138",67.992,67.992,67.992,67.992
"129.250.3.84",78.6593333333333,75.992,79.993,79.993
"129.250.3.21",163.992,163.992,163.992,163.992
"129.250.3.94",181.334333333333,183.992,184.011,176
"212.119.15.18",188.015666666667,187.999,188.024,188.024
"193.151.28.17",192.000666666667,191.986,192.008,192.008
"85.120.75.2",190.681,192.008,192.018,188.017
"128.95.230.102",2.50433333333333,0.438,3.684,3.391
"10.132.1.73",0.386666666666667,0.449,0.361,0.35
"10.132.1.75",0.499,0.55,0.456,0.491
"209.124.188.134",0.703333333333333,0.805,0.648,0.657
"198.104.202.5",1.25233333333333,1.209,1.312,1.236
"129.250.5.46",0.967333333333333,0.977,0.968,0.957
"129.250.3.43",72.516,72.816,72.768,71.964
"129.250.2.163",52.473,52.031,52.736,52.652
"129.250.2.138",73.6003333333333,73.702,73.588,73.511
"129.250.3.84",86.7273333333333,86.795,86.753,86.634
"129.250.3.21",160.831333333333,160.952,160.832,160.71
"129.250.3.94",180.552,180.34,180.863,180.453
"212.119.15.18",206.475666666667,206.379,206.576,206.472
"193.151.28.17",196.424,196.398,196.494,196.38
"85.120.75.2",195.109666666667,194.979,195.117,195.233
30 changes: 15 additions & 15 deletions data/www_gov_ro/route.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
traceroute to www.gov.ro (85.120.75.150), 30 hops max, 60 byte packets
1 128.95.230.102 0.000 ms 0.000 ms 0.000 ms
2 10.132.1.73 0.000 ms 0.000 ms 0.000 ms
3 10.132.1.75 0.000 ms 0.000 ms 0.000 ms
4 209.124.188.134 0.000 ms 0.000 ms 0.000 ms
5 198.104.202.5 0.000 ms 0.000 ms 0.000 ms
6 129.250.5.46 0.000 ms 0.000 ms 0.000 ms
7 129.250.3.43 52.013 ms 52.013 ms 52.013 ms
8 129.250.2.163 48.000 ms 48.000 ms 48.000 ms
9 129.250.2.138 67.992 ms 67.992 ms 67.992 ms
10 129.250.3.84 75.992 ms 79.993 ms 79.993 ms
11 129.250.3.21 163.992 ms 163.992 ms 163.992 ms
12 129.250.3.94 183.992 ms 184.011 ms 176.000 ms
13 212.119.15.18 187.999 ms 188.024 ms 188.024 ms
14 193.151.28.17 191.986 ms 192.008 ms 192.008 ms
15 85.120.75.2 192.008 ms 192.018 ms 188.017 ms
1 128.95.230.102 0.438 ms 3.684 ms 3.391 ms
2 10.132.1.73 0.449 ms 0.361 ms 0.350 ms
3 10.132.1.75 0.550 ms 0.456 ms 0.491 ms
4 209.124.188.134 0.805 ms 0.648 ms 0.657 ms
5 198.104.202.5 1.209 ms 1.312 ms 1.236 ms
6 129.250.5.46 0.977 ms 0.968 ms 0.957 ms
7 129.250.3.43 72.816 ms 72.768 ms 71.964 ms
8 129.250.2.163 52.031 ms 52.736 ms 52.652 ms
9 129.250.2.138 73.702 ms 73.588 ms 73.511 ms
10 129.250.3.84 86.795 ms 86.753 ms 86.634 ms
11 129.250.3.21 160.952 ms 160.832 ms 160.710 ms
12 129.250.3.94 180.340 ms 180.863 ms 180.453 ms
13 212.119.15.18 206.379 ms 206.576 ms 206.472 ms
14 193.151.28.17 196.398 ms 196.494 ms 196.380 ms
15 85.120.75.2 194.979 ms 195.117 ms 195.233 ms
16 * * *
17 * * *
18 * * *
Expand Down
Binary file modified images/www_gov_ro/ggmap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 7 additions & 3 deletions visual-traceroute.R
Original file line number Diff line number Diff line change
Expand Up @@ -409,15 +409,19 @@ view_image <- function(image) {
}
}

make_rtt_plot <- function(route) {
# Produce a line plot of mean rtt by route hop using base graphics.
make_rtt_plot <- function(route, ipinfo) {
# Produce a line plot of mean rtt by route hop. Label with country code.

# Only load these packages if this function is called.
load_packages(c("calibrate"))

plot.new()

plot(rownames(route), route$mean_rtt,
xlab = "Route Hops", ylab = "Mean RTT (ms)",
main="Mean RTT by Route Hop")
lines(rownames(route), route$mean_rtt)
textxy(rownames(route), route$mean_rtt, labs=ipinfo$country_code, offset=1)
}

print_route_table <- function(ipinfo) {
Expand Down Expand Up @@ -485,6 +489,6 @@ if (nrow(route) > 0) {

# Plot the mean round-trip-times (rtt) for each hop in the route.
# Not yet fully incorporated in script, but you can run from R console.
#make_rtt_plot(route)
#make_rtt_plot(route, ipinfo)
}
}

0 comments on commit ad82718

Please sign in to comment.