CINXE.COM
Statistics Portal
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <!-- Meta, title, CSS, favicons, etc. --> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="icon" href="assets/images/favicon.png" type="image/ico" /> <title>Statistics Portal </title> <!-- Bootstrap --> <link href="https://stats.afrinic.net/vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet"> <!-- Font Awesome --> <link href="https://stats.afrinic.net/vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet"> <!-- NProgress --> <link href="https://stats.afrinic.net/vendors/nprogress/nprogress.css" rel="stylesheet"> <!-- iCheck --> <link href="https://stats.afrinic.net/vendors/iCheck/skins/flat/green.css" rel="stylesheet"> <link rel="stylesheet" href="https://stats.afrinic.net/assets/css/style4.css" rel="stylesheet"> <!-- bootstrap-progressbar --> <link href="https://stats.afrinic.net/vendors/bootstrap-progressbar/css/bootstrap-progressbar-3.3.4.min.css" rel="stylesheet"> <!-- JQVMap --> <link href="https://stats.afrinic.net/vendors/jqvmap/dist/jqvmap.min.css" rel="stylesheet"/> <!-- bootstrap-daterangepicker --> <link href="https://stats.afrinic.net/vendors/daterangepicker/dist/daterangepicker.css" rel="stylesheet"> <!-- Custom Theme Style --> <link href="https://stats.afrinic.net/build/css/custom.css" rel="stylesheet"> <link href="https://stats.afrinic.net/assets/afrinic/css/stats.css" rel="stylesheet"> <script type="text/javascript" src="https://stats.afrinic.net/assets/js/d3.js"></script> <script type="text/javascript" src="https://stats.afrinic.net/assets/js/queue.js"></script> <script type="text/javascript" src="https://stats.afrinic.net/assets/js/crossfilter.js"></script> <script type="text/javascript" src="https://stats.afrinic.net/assets/js/dc.js"></script> <script type="text/javascript" src="https://stats.afrinic.net/assets/bower_components/rgbcolor/index.js"></script> <!--<script src="https://code.jquery.com/jquery-1.12.4.js"></script>--> <script src="https://stats.afrinic.net/vendors/daterangepicker/dist/vendor.js"></script> <!-- <script src=""></script>--> <script src="https://stats.afrinic.net/vendors/bootstrap/dist/js/bootstrap.min.js"></script> <script src="https://stats.afrinic.net/assets/js/bootstrap-select.min.js"></script> <!-- bootstrap-daterangepicker --> <script src="https://stats.afrinic.net/vendors/moment/min/moment.min.js"></script> <script src="https://stats.afrinic.net/vendors/moment/min/moment.min.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <script src="https://stats.afrinic.net/vendors/daterangepicker/dist/daterangepicker.min.js"></script> <link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.1/css/bootstrap-select.min.css" rel="stylesheet"> <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> <script type="text/javascript" src="//cdn.datatables.net/1.10.16/js/jquery.dataTables.min.js"></script> <script type="text/javascript"> // var _start = new Date , _end = new Date; function shuffle(a) { var j, x, i; for (i = a.length - 1; i > 0; i--) { j = Math.floor(Math.random() * (i + 1)); x = a[i]; a[i] = a[j]; a[j] = x; } return a; } var colors = shuffle(["#3366cc", "#dc3912", "#ff9900", "#109618", "#990099", "#0099c6", "#dd4477", "#66aa00", "#b82e2e", "#316395", "#994499", "#22aa99", "#aaaa11", "#6633cc", "#e67300", "#8b0707", "#651067", "#329262", "#5574a6", "#3b3eac"]), //rangeColors = ["#e59866", "#dc7633", " #d35400 ", "#ba4a00", "#a04000", "#873600", "#6e2c00", "#784212", "#943126","#78281f"] rangeColors = ["#AC96CA","#9E84C0","#9072B5","#8260AB","#754FA1","#683D96","#583690","#47308A","#372A83","#27247C"] </script> <!-- Matomo --> <script type="text/javascript"> var _paq = window._paq || []; /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ _paq.push(["setDocumentTitle", document.domain + "/" + document.title]); _paq.push(["setCookieDomain", "*.stats.afrinic.net"]); _paq.push(["setDomains", ["*.stats.afrinic.net"]]); _paq.push(['trackPageView']); _paq.push(['enableLinkTracking']); (function() { var u="https://analytics.afrinic.net/"; _paq.push(['setTrackerUrl', u+'matomo.php']); _paq.push(['setSiteId', '10']); var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); })(); </script> <noscript><p><img src="https://analytics.afrinic.net/matomo.php?idsite=10&rec=1" style="border:0;" alt="" /></p></noscript> <!-- End Matomo Code --> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src=“https://www.googletagmanager.com/gtag/js?id=UA-50123650-7”></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag(‘js’, new Date()); gtag(‘config’, ‘UA-50123650-7’); </script> <script> !function(e,l,v,i,o,n){e[i]||(e[i]={}),e[i].account_id=n;var g,h;g=l.createElement(v),g.type="text/javascript",g.async=1,g.src=o+n,h=l.getElementsByTagName(v)[0],h.parentNode.insertBefore(g,h);e[i].q=[];e[i].on=function(z,y){e[i].q.push([z,y])}}(window,document,"script","_elev","https://cdn.elev.io/sdk/bootloader/v4/elevio-bootloader.js?cid=","5e2a59719bd1a"); </script> <link rel="stylesheet" href="//cdn.datatables.net/1.10.16/css/jquery.dataTables.min.css"> <script type="text/javascript" src="https://stats.afrinic.net/assets/afrinic/js/common.js"></script> </head> <body class="nav-md"> <div id="overlay"> <div id="loading">Please wait...</div> </div> <div class="container body"> <div class="main_container"> <div class="col-md-3 left_col"> <div class="left_col scroll-view"> <div class="navbar nav_title" style="border: 0;"> <a href="https://stats.afrinic.net/" class="site_title"><i class="fa fa-line-chart"></i> <span>Statistics Portal</span></a> </div> <div class="clearfix"></div> <!-- sidebar menu --> <div id="sidebar-menu" class="main_menu_side hidden-print main_menu"> <div class="menu_section"> <ul class="nav side-menu"> <li><a><i class="fa fa-area-chart"></i> IPv4 <span class="fa fa-chevron-down"></span></a> <ul class="nav child_menu"> <li><a href="https://stats.afrinic.net/ipv4/">IPv4</a></li> <li><a href="https://stats.afrinic.net/ipv4/exhaustion/">Exhaustion</a></li> <li><a href="https://stats.afrinic.net/ipv4/exhaustion/ipv4_available">Available IPv4 (Over time)</a></li> <li><a href="https://stats.afrinic.net/ipv4/exhaustion/ipv4_pool">Available IPv4 (pool)</a></li> <li><a href="https://stats.afrinic.net/ipv4/exhaustion/ipv4_iana">Available IPv4 (usage) </a></li> <li><a href="https://stats.afrinic.net/ipv4/exhaustion/ipv4_prefixes">Available IPv4 (prefixes) </a></li> </ul> </li> <li><a><i class="fa fa-area-chart"></i> ASN <span class="fa fa-chevron-down"></span></a> <ul class="nav child_menu"> <li><a href="https://stats.afrinic.net/asn/">ASN</a></li> </ul> </li> <li><a><i class="fa fa-area-chart"></i> Member <span class="fa fa-chevron-down"></span></a> <ul class="nav child_menu"> <li><a href="https://stats.afrinic.net/member/">Member</a></li> </ul> </li> <li><a><i class="fa fa-area-chart"></i> Country <span class="fa fa-chevron-down"></span></a> <ul class="nav child_menu"> <li><a href="https://stats.afrinic.net/country/">Country</a></li> </ul> </li> <li><a><i class="fa fa-area-chart"></i> IPv6 <span class="fa fa-chevron-down"></span></a> <ul class="nav child_menu"> <li><a href="https://stats.afrinic.net/ipv6/">IPv6</a></li> </ul> </li> <li><a><i class="fa fa-area-chart"></i> IRR <span class="fa fa-chevron-down"></span></a> <ul class="nav child_menu"> <li><a href="https://stats.afrinic.net/irr/">IRR</a></li> </ul> </li> <li><a><i class="fa fa-area-chart"></i> RPKI <span class="fa fa-chevron-down"></span></a> <ul class="nav child_menu"> <li><a href="https://stats.afrinic.net/rpki/">RPKI</a></li> </ul> </li> <li><a><i class="fa fa-area-chart"></i> RDNS <span class="fa fa-chevron-down"></span></a> <ul class="nav child_menu"> <li><a href="https://stats.afrinic.net/dnssec/">DNSSEC</a></li> <li><a href="https://stats.afrinic.net/lamerdns/">Lame Delegation</a></li> </ul> </li> <li><a><i class="fa fa-area-chart"></i> Closures <span class="fa fa-chevron-down"></span></a> <ul class="nav child_menu"> <li><a href="https://stats.afrinic.net/closures/">Closures</a></li> </ul> </li> <li><a><i class="fa fa-area-chart"></i> Contact Updates <span class="fa fa-chevron-down"></span></a> <ul class="nav child_menu"> <li><a href="https://stats.afrinic.net/contact/">Contact updates</a></li> </ul> </li> <li><a><i class="fa fa-area-chart"></i> FTP Stats files <span class="fa fa-chevron-down"></span></a> <ul class="nav child_menu"> <li><a href="ftp://ftp.afrinic.net/pub/stats/afrinic/" target="_blank">Extended Stats</a></li> <li><a href="ftp://ftp.afrinic.net/pub/stats/afrinic/transfers/" target="_blank">Transfer Stats</a></li> </ul> </li> <li><a><i class="fa fa-area-chart"></i> AIRRS <span class="fa fa-chevron-down"></span></a> <ul class="nav child_menu"> <li><a href="https://airrs.afrinic.net" target="_blank">AIRRS</a></li> </ul> </li> </ul> </div> </div> <!-- /sidebar menu --> </div> </div> <!-- top navigation --> <div class="top_nav"> <div class="nav_menu"> <nav> <div class="nav toggle navbar-left "> <a id="menu_toggle"><i class="fa fa-bars"></i></a> </div> <div class="brand-right pull-right"> <a class="navbar-brand" href="https://afrinic.net"><img src="https://afrinic.net/ast/img/afrinic-logo/afrinic_logo_retina.png" alt="AFRINIC"></a> </div> </nav> </div> </div> <!-- /top navigation --><style> .dc-chart path.line { fill: none; stroke: steelblue; stroke-width: 1.5px; } </style> <div class="right_col" role="main"> <div class="row"> <div class="well col-md-12"> <div class="col-md-10"><h2>AFRINIC IRR statistics</h2> </div> <div class="col-md-2"><a href="https://stats.afrinic.net/index.php/download/irrdata.zip" class="btn btn-primary">Download raw data</a></div> </div> </div> <div class="row"> <div class="col-md-12 col-sm-12 col-xs-12"> <div class="well"> <a href="javascript:dateDim.filterAll();dc.filterAll();dc.renderAll();" class="btn btn-raised btn-primary">Reset All</a> </div> </div> </div> <div class="row"> <div class="col-md-6 col-sm-12"> <div class="well dashboard_graph dc-data-count2"> <div class="x_title"> <span class="count_top"><i class="fa fa-calculator"></i> Total number of Route(6) Objects</span> </div> <p> </p> <span class="filter-count count" style="font-size:30px;"></span> </div> <div class="row"> <div class="col-md-4 col-sm-12"> <div id="orgtype" class="well selectpicker dashboard_graph"> <div class="x_title"> <span class="chart-title"><strong> Filter by member type </strong></span> </div> </div> </div> <div class="col-md-4 col-sm-12"> <div class="well dashboard_graph"> <div class="x_title"> <span class="chart-title"><strong>Filter by Region </strong></span> </div> <div id="region"></div> </div> </div> <div class="col-md-4 col-sm-12"> <div class="well dashboard_graph"> <div class="x_title"> <span class="chart-title"><strong>Filter by Type </strong></span> </div> <div id="routetype"></div> </div> </div> <div class="col-md-4 col-sm-12"> <div class="well dashboard_graph"> <div class="x_title"> <span class="chart-title"><strong>Filter by Date range </strong></span> </div> <div id="daterangepicker" style="background: #fff; cursor: pointer; padding: 5px 10px; border: 1px solid #ccc;"> <i class="fa fa-calendar"></i> <span></span> <i class="fa fa-caret-down"></i> <input id="daterangepicker-field"> </div> </div> </div> <div class="col-md-8 col-sm-12"> <div class="well dashboard_graph" id="industryChart"> <div class="x_title"> <span class="chart-title"><strong><i class="fa fa-pie-chart"></i> Route(6) by Industry </strong></span> </div> <div class="download-link pull-right"> <div class="dropdown"> <button class="dropbtn"><i class="fa fa-ellipsis-v" aria-hidden="true"></i></button> <div class="dropdown-content"> <a href="#" onclick="saveAsImage('industryChart.png','industryChart');"> Save png</a> <a href="#" onclick="saveAsImage('industryChart.jpeg','industryChart');"> Save jpeg</a> </div> </div> </div> </div> </div> </div> <div class="well dashboard_graph" id="prefixLengthChart"> <div class="x_title"> <span class="chart-title"><strong><i class="fa fa-pie-chart"></i> Route(6) by prefixLength </strong></span> </div> <div class="download-link pull-right"> <div class="dropdown"> <button class="dropbtn"><i class="fa fa-ellipsis-v" aria-hidden="true"></i></button> <div class="dropdown-content"> <a href="#" onclick="saveAsImage('prefixLengthChart.png','prefixLengthChart');"> Save png</a> <a href="#" onclick="saveAsImage('prefixLengthChart.jpeg','prefixLengthChart');"> Save jpeg</a> </div> </div> </div> </div> </div> <div class="col-md-6 col-sm-12"> <div class="well dashboard_graph" id="africa-map"> <div class="x_title"> <span class="chart-title"><strong> <i class="fa fa-map"></i> Route(6) by member country </strong></span> </div> <a class="reset" href="javascript:afChart.filterAll();dc.redrawAll();" style="display: none; font-size:11px;">Reset</a> <span class="reset" style="display: none; font-size:11px;"> | Current filter: <span class="filter"> </span> </span> <div class="download-link pull-right"> <div class="dropdown"> <button class="dropbtn"><i class="fa fa-ellipsis-v" aria-hidden="true"></i></button> <div class="dropdown-content"> <a href="#" onclick="saveAsImage('map.png','africa-map');"> Save png</a> <a href="#" onclick="saveAsImage('map.jpeg','africa-map');"> Save jpeg</a> </div> </div> </div> </div> <div class="well dashboard_graph" id="prefixChart"> <div class="x_title"> <span class="chart-title"><strong><i class="fa fa-bar-chart"></i> Route(6) by prefix </strong></span> </div> <div class="download-link pull-right"> <div class="dropdown"> <button class="dropbtn"><i class="fa fa-ellipsis-v" aria-hidden="true"></i></button> <div class="dropdown-content"> <a href="#" onclick="saveAsImage('prefixChart.png','prefixChart');"> Save png</a> <a href="#" onclick="saveAsImage('prefixChart.jpeg','prefixChart');"> Save jpeg</a> </div> </div> </div> </div> </div> </div> <div class="row"> <div class="well dashboard_graph" id="memberHistoryChart"> <div class="x_title"> <span class="chart-title"><strong><i class="fa fa-bar-chart"></i> Members with Route(6) Objects cumulative chart </strong></span> </div> <div class="download-link pull-right"> <div class="dropdown"> <button class="dropbtn"><i class="fa fa-ellipsis-v" aria-hidden="true"></i></button> <div class="dropdown-content"> <a href="#" onclick="saveAsImage('memberHistoryChart.png','memberHistoryChart');"> Save png</a> <a href="#" onclick="saveAsImage('memberHistoryChart.jpeg','memberHistoryChart');"> Save jpeg</a> </div> </div> </div> </div> <div class="well dashboard_graph" id="memberGrowthChart"> <div class="x_title"> <span class="chart-title"><strong><i class="fa fa-area-chart"></i> Members with route(6) objects growth chart over last 12 months </strong></span> </div> <div class="download-link pull-right"> <div class="dropdown"> <button class="dropbtn"><i class="fa fa-ellipsis-v" aria-hidden="true"></i></button> <div class="dropdown-content"> <a href="#" onclick="saveAsImage('memberGrowthChart.png','memberGrowthChart');"> Save png</a> <a href="#" onclick="saveAsImage('memberGrowthChart.jpeg','memberGrowthChart');"> Save jpeg</a> </div> </div> </div> </div> <div class="well dashboard_graph" id="routeHistoryChart"> <div class="x_title"> <span class="chart-title"><strong><i class="fa fa-area-chart"></i> Route(6) cumulative chart </strong></span> </div> <div class="download-link pull-right"> <div class="dropdown"> <button class="dropbtn"><i class="fa fa-ellipsis-v" aria-hidden="true"></i></button> <div class="dropdown-content"> <a href="#" onclick="saveAsImage('routeHistoryChart.png','routeHistoryChart');"> Save png</a> <a href="#" onclick="saveAsImage('routeHistoryChart.jpeg','routeHistoryChart');"> Save jpeg</a> </div> </div> </div> </div> </div> <script type="text/javascript"> // date picker dropdown //image export function saveAsImage(name, id) { var options = { selectorRemap: function(s) { return s.replace(/\.dc-chart/g, ''); } }; var svg = $('#'+id).find('svg')[0]; saveSvgAsPng(svg, name,options); } var dateDim; var numberFormat = d3.format(".0f"); var myGeoJSONPath = 'https://stats.afrinic.net/assets/data/region_un_Africa_subunits.json'; var afChart = dc.geoChoroplethChart('#africa-map'); var regionSelect = dc.selectMenu('#region'), membertypeSelect= dc.selectMenu('#orgtype'), routetypeSelect= dc.selectMenu('#routetype'); var allroutes = dc.dataCount('.dc-data-count2'); var prefixLengthChart = dc.pieChart('#prefixLengthChart'); var industryChart = dc.pieChart('#industryChart'); var prefixChart = dc.barChart('#prefixChart'); var routeHistoryChart = dc.lineChart('#routeHistoryChart'); var memberGrowthChart = dc.lineChart('#memberGrowthChart') var memberHistoryChart = dc.barChart('#memberHistoryChart'); var q = queue() .defer(d3.json, 'https://stats.afrinic.net/assets/data/irrData.json') .defer(d3.json, 'https://stats.afrinic.net/assets/data/irrmembersperyear.json') .defer(d3.json, 'https://stats.afrinic.net/assets/data/irrmemberspermonth.json') q.await(function(err, data,data1,data2){ if(err){ throw err; } data.forEach(function(d){ d.creationDate = new Date(d.creationDate); d.country_members =+d.country_members; d.percentage_of_membership =+d.percentage_of_membership; d.total =+d.total; }); data1.forEach(function(d){ d.members =+d.members; }); data2.forEach(function(d){ var timeFormat2 = d3.time.format('%Y-%m-%dT%H:%M:%S%Z') d.total =+d.total; d.reg_date = new Date(d.reg_date); }); var ndx = crossfilter(data); var ndx1 = crossfilter(data1); var ndx2 = crossfilter(data2); var totalRoutes = ndx.groupAll().reduceSum(function(d){return d.total;}); var orgTypeDim = ndx.dimension(dc.pluck('org_type')); var routeTypeDim = ndx.dimension(dc.pluck('object_type')); var prefixLengthDim = ndx.dimension(dc.pluck('prefix_length')); var countryDim = ndx.dimension(dc.pluck('country')); var regionDim = ndx.dimension(dc.pluck('region')); // var industryDim = ndx.dimension(dc.pluck('industry')); var industryDim = ndx.dimension(function(d){ var ind = d.industry; if(ind === null) return "Other"; else return ind; }); var prefixDim = ndx.dimension(dc.pluck('pref_cat')); dateDim = ndx.dimension(dc.pluck('creationDate')); var memberRegDateDim = ndx2.dimension(dc.pluck('reg_date')); var yearsDim = ndx1.dimension(dc.pluck('year')); var yearsDimGroup = yearsDim.group().reduce( function reduceAdd(p, v) { p.members = v.members; return p; }, function reduceRemove(p, v) { p.members = v.members; return p; }, function reduceInitial() { return {members: 0}; } ); //groups var orgTypeGroup =orgTypeDim.group().reduceSum(function(d){return d.total;}); var routeTypeGroup =routeTypeDim.group().reduceSum(function(d){return d.total;}); var prefixLengthGroup =prefixLengthDim.group().reduceSum(function(d){return d.total;}); var countryGroup2 = countryDim.group().reduce( function reduceAdd(p, v) { p.count += v.total; p.total = v.country_members|| 0; p.percent = v.percentage_of_membership|| 0; return p; }, function reduceRemove(p, v) { p.count -= v.total; p.total = v.country_members || 0; p.percent = v.percentage_of_membership|| 0; return p; }, function reduceInitial() { return {count: 0, total: 0, percent: 0}; } ); var regionGroup =regionDim.group().reduceSum(function(d){return d.total;}); var industryGroup =industryDim.group().reduceSum(function(d){return d.total;}); var prefixGroup =prefixDim.group().reduceSum(function(d){return d.total;}); var creationDateGroup =dateDim.group().reduceSum(function(d){return d.total;}); var memberRegDateDimGroup=memberRegDateDim.group().reduceSum(function(d){return d.total;}); function accumulate_group(source_group) { return { all:function () { var cumulate = 0; return source_group.all().map(function(d) { cumulate += d.value; return {key:d.key, value:cumulate}; }); } }; } // Code that uses jQuery's $ can follow here. /* $('#reportrange').on('apply.daterangepicker', function(ev, picker) { var dstart =new Date(_start.toString()); var dend =new Date(_end.toString()); creationDateDim.filterAll(); creationDateDim.filterRange([dstart, dend]); dc.redrawAll(); });*/ var width = 500; var height = 480; d3.json(myGeoJSONPath, function (africaJson) { var projection = d3.geo.mercator() var path = d3.geo.path().projection(projection); //set up scale and translate var bounds, scale, offset; projection.scale(1).translate([0,0]); var bounds = path.bounds(africaJson); var scale = .90 / Math.max((bounds[1][0] - bounds[0][0]) / width, (bounds[1][1] - bounds[0][1]) / height); var offset = [(width - scale * (bounds[1][0] + bounds[0][0])) /2, (height - scale * (bounds[1][1] + bounds[0][1])) /2 ]; projection.scale(scale).translate(offset); //set the map specs afChart .width(width) .height(height) .dimension(countryDim) .group(countryGroup2, "count") .colors(d3.scale.quantize().range(rangeColors)) .colorDomain([0, 1500]) .colorAccessor(function (d){ var t = d ; if (undefined === t) { t= { count : 0, total : 0, percent: 0 } } return t.count; }) .overlayGeoJson(africaJson.features, "Country", function (d) { return d.properties.name; }) .projection(projection) //add a legend afChart.legendables = function () { var range = afChart.colors().range() var domain = afChart.colorDomain() var step = (domain[1] - domain[0]) / range.length var val = domain[0] return range.map(function (d, i) { var legendable = {name: val + "-" + (val+step), chart: afChart}; legendable.color = afChart.colors()(val); val += step return legendable; }); }; afChart.legend(dc.legend().x(5).y(300).itemHeight(13).gap(5)) afChart.title(function (d) { var t = d ; if (undefined === d.value) { t.value = { total : 0, count : 0, percent: 0 } } return "Country: " + t.key + "\nRoute(6): " + numberFormat(t.value['count']) +"\nMembers With Route(6): " + numberFormat(t.value['total'])+ "\nPercentage of Members: "+numberFormat(t.value['percent'])+"%"; }) afChart.valueAccessor(function(d) { return d.value; }); regionSelect .dimension(regionDim) .group(regionGroup) .controlsUseVisibility(true) .numberVisible(7) .width(500); membertypeSelect .dimension(orgTypeDim) .group(orgTypeGroup) .controlsUseVisibility(true) .numberVisible(7); routetypeSelect .dimension(routeTypeDim) .group(routeTypeGroup) .controlsUseVisibility(true) .numberVisible(7); var dateCreatedComGroup =accumulate_group(creationDateGroup); var minDate = dateDim.bottom(1)[0].creationDate; var maxDate = dateDim.top(1)[0].creationDate; var minYear = yearsDim.bottom(1)[0].year; var max = yearsDim.top(1)[0].year; console.log(minYear); minYear =+ minYear; max =+ max; var yearz = [minYear]; while(minYear <= max){ var ny=minYear += 3; if(ny <= max){ yearz.push(ny); } minYear = ny; } routeHistoryChart .width(null) .height(280) .margins({top: 40, right: 40, bottom: 20, left: 65}) .dimension(dateDim) .group(dateCreatedComGroup) .renderArea(true) .colors(d3.scale.ordinal().range(colors)) .clipPadding(10) .renderVerticalGridLines(true) .yAxisLabel("Number of route(6) objects") .renderHorizontalGridLines(true) .brushOn(false) .x(d3.time.scale().domain([minDate, maxDate])) .xAxis().tickSize(0); routeHistoryChart.yAxis().ticks(5); var regDateComGroup =accumulate_group(memberRegDateDimGroup); var minRegDate = memberRegDateDim.bottom(1)[0].reg_date; var maxRegDate = memberRegDateDim.top(1)[0].reg_date; memberGrowthChart .width(null) .height(280) .margins({top: 40, right: 40, bottom: 20, left: 65}) .dimension(memberRegDateDim) .group(regDateComGroup, function(d){ return d.value; }) .renderArea(true) .colors(d3.scale.ordinal().range(colors)) .clipPadding(10) .renderVerticalGridLines(true) .yAxisLabel("Members with route(6) objects") .renderHorizontalGridLines(true) .brushOn(false) .x(d3.time.scale().domain([minRegDate,maxRegDate])) .xAxis().tickSize(0); memberGrowthChart.yAxis().ticks(5); memberHistoryChart/* .width(null) .margins({top: 40, right: 40, bottom: 20, left: 65}) .dimension(yearsDim) .group(yearsDimGroup,"members", function(d){ //console.log(d); return d.value.members; }) .renderDataPoints(true) .renderArea(false) .colors(d3.scale.ordinal().range([ '#511849','#900c3f'])) .clipPadding(10) .yAxisLabel("Number of Members") .renderHorizontalGridLines(true) .x(d3.scale.ordinal().domain(yearsDim)) .xUnits(dc.units.ordinal) .xAxis().tickSize(0); memberHistoryChart.yAxis().ticks(5);*/ .width(null) .height(280) .margins({top: 40, right: 60, bottom: 20, left: 45}) .dimension(yearsDim) .group(yearsDimGroup,"members", function(d){ return d.value.members; }) .centerBar(false) .yAxisLabel("Number of Members") .colors(d3.scale.ordinal().range(colors)) .elasticY(true) .x(d3.scale.ordinal().domain(yearsDim)) .xUnits(dc.units.ordinal) .gap(1) .alwaysUseRounding(true) .xAxis().tickSize(0);; allroutes .dimension(ndx) .group(totalRoutes); prefixLengthChart .dimension(prefixLengthDim) .group(prefixLengthGroup) .width(null) .height(220) .slicesCap(5) .innerRadius(60) .colors(d3.scale.ordinal().range(colors)) .drawPaths(false) .legend(dc.legend().itemWidth(100).legendWidth(200)) .on('pretransition', function(chart) { prefixLengthChart.selectAll('text.pie-slice').text(function(d) { return dc.utils.printSingleValue((d.endAngle - d.startAngle) / (2*Math.PI) * 100) + '%'; }) }); industryChart .dimension(industryDim) .group(industryGroup) .width(null) .height(220) .slicesCap(3) .innerRadius(60) .colors(d3.scale.ordinal().range(colors)) .drawPaths(false) .legend(dc.legend().itemWidth(100).legendWidth(200)) .on('pretransition', function(chart) { industryChart.selectAll('text.pie-slice').text(function(d) { return dc.utils.printSingleValue((d.endAngle - d.startAngle) / (2*Math.PI) * 100) + '%'; }) }); prefixChart .width(null) .height(300) .elasticY(true) .margins({top:30,bottom:30,right:30,left:70}) .dimension(prefixDim) .renderLabel(true) .renderTitle(true) .colors(d3.scale.ordinal().range(colors)) .group(prefixGroup) .yAxisLabel("route(6) by prefix") .renderHorizontalGridLines(true) .title(function(d) { return d.key + ': ' + d.value; }) .x(d3.scale.ordinal().domain(prefixDim)) .xUnits(dc.units.ordinal) .legend(dc.legend().x(990).y(5).itemHeight(12).gap(5)); prefixChart.yAxis().ticks(5); prefixChart.xAxis().tickSize(0).ticks(4); dc.renderAll(); $("#daterangepicker-field").daterangepicker({ forceUpdate: false, callback: function(startDate, endDate, period){ var title = startDate.format('L') + ' – ' + endDate.format('L'); $(this).val(title) dateDim.filterAll(); dateDim.filterRange([new Date(startDate), new Date(endDate)]); dc.redrawAll(); }}); }); }); function reset(){ dateDim.filterAll(); dc.renderAll(); } </script></div> </div> </div> </div> <!-- footer content --> <footer> <div class="row"> <div class="col-md-8 hidden-xs"> <p class="footer-link"><a href="https://status.afrinic.net/" target="_blank" rel="help noopener" title="AFRINIC Online Services Status">Service Status</a> | <a href="https://afrinic.net/changelog" rev="contents">Changelog</a> | <a href="https://afrinic.net/support">FAQs & Support</a></p> </div> <div class="pull-right"> © AFRINIC </div> </div> </div> <div class="clearfix"></div> </footer> <!-- /footer content --> </div> </div> <!-- jQuery --> <!-- <script src=""></script>--> <!-- Bootstrap --> <script src="https://stats.afrinic.net/vendors/bootstrap/dist/js/bootstrap.min.js"></script> <!-- FastClick --> <script src="https://stats.afrinic.net/vendors/fastclick/lib/fastclick.js"></script> <!-- NProgress --> <script src="https://stats.afrinic.net/vendors/nprogress/nprogress.js"></script> <!-- Chart.js --> <script src="https://stats.afrinic.net/vendors/Chart.js/dist/Chart.min.js"></script> <!-- gauge.js --> <script src="https://stats.afrinic.net/vendors/gauge.js/dist/gauge.min.js"></script> <!-- bootstrap-progressbar --> <script src="https://stats.afrinic.net/vendors/bootstrap-progressbar/bootstrap-progressbar.min.js"></script> <!-- iCheck --> <script src="https://stats.afrinic.net/vendors/iCheck/icheck.min.js"></script> <!-- Skycons --> <script src="https://stats.afrinic.net/vendors/skycons/skycons.js"></script> <!-- Flot --> <script src="https://stats.afrinic.net/vendors/Flot/jquery.flot.js"></script> <script src="https://stats.afrinic.net/vendors/Flot/jquery.flot.pie.js"></script> <script src="https://stats.afrinic.net/vendors/Flot/jquery.flot.time.js"></script> <script src="https://stats.afrinic.net/vendors/Flot/jquery.flot.stack.js"></script> <script src="https://stats.afrinic.net/vendors/Flot/jquery.flot.resize.js"></script> <!-- Flot plugins --> <script src="https://stats.afrinic.net/vendors/flot.orderbars/js/jquery.flot.orderBars.js"></script> <script src="https://stats.afrinic.net/vendors/flot-spline/js/jquery.flot.spline.min.js"></script> <script src="https://stats.afrinic.net/vendors/flot.curvedlines/curvedLines.js"></script> <!-- DateJS --> <script src="https://stats.afrinic.net/vendors/DateJS/build/date.js"></script> <!-- JQVMap --> <script src="https://stats.afrinic.net/vendors/jqvmap/dist/jquery.vmap.js"></script> <script src="https://stats.afrinic.net/vendors/jqvmap/dist/maps/jquery.vmap.world.js"></script> <script src="https://stats.afrinic.net/vendors/jqvmap/examples/js/jquery.vmap.sampledata.js"></script> <script type="text/javascript" src="https://stats.afrinic.net/assets/js/saveSvgAsPng.js"></script> <script type="text/javascript" src="https://stats.afrinic.net/assets/js/canvg.js"></script> <!-- Custom Theme Scripts --> <script src="https://stats.afrinic.net/build/js/custom.js"></script> <script> !function(e,l,v,i,o,n){e[i]||(e[i]={}),e[i].account_id=n;var g,h;g=l.createElement(v),g.type="text/javascript",g.async=1,g.src=o+n,h=l.getElementsByTagName(v)[0],h.parentNode.insertBefore(g,h);e[i].q=[];e[i].on=function(z,y){e[i].q.push([z,y])}}(window,document,"script","_elev","https://cdn.elev.io/sdk/bootloader/v4/elevio-bootloader.js?cid=","5e2a59719bd1a"); /* * For passing user information, please see * https://api-docs.elevio.help/en/articles/24 */ </script> </body> </html>