from highcharts import Highmap from highcharts.highmaps.highmap_helper import jsonp_loader, js_map_loader, geojson_handler, interpolateRGB H = Highmap(height=550) map_url = 'http://code.highcharts.com/mapdata/countries/cl/cl-all.js' data_url = 'http://www.highcharts.com/samples/data/jsonp.php?filename=us-capitals.json&callback=?' geojson = js_map_loader(map_url) data = [ { u'lon': -86.300629, u'abbrev': u'AL', u'capital': u'Montgomery', u'lat': 32.38012, 'z': 205764, u'parentState': u'Alabama', u'population': 205764 }, { u'lon': -92.274494, u'abbrev': u'AR', u'capital': u'Little Rock', u'lat': 34.748655, 'z': 193524, u'parentState': u'Arkansas', u'population': 193524 }, ] # geographical data geo = { 'sym': {
# -*- coding: utf-8 -*- """ Highmaps Demos Color axis and data labels: http://www.highcharts.com/maps/demo/color-axis """ from highcharts import Highmap H = Highmap(width=650, height=550) options = { 'chart': { 'borderWidth': 1 }, 'title': { 'text': 'US population density (/kmĀ²)' }, 'legend': { 'layout': 'horizontal', 'borderWidth': 0, 'backgroundColor': 'rgba(255,255,255,0.85)', 'floating': True, 'verticalAlign': 'top', 'y': 25 }, 'mapNavigation': { 'enabled': True }, 'colorAxis': { 'min': 1, 'type': 'logarithmic', 'minColor': '#EEEEFF',
# -*- coding: utf-8 -*- """ Highmaps Demos Map point with lat/long: http://www.highcharts.com/maps/demo/mappoint-latlon """ from highcharts import Highmap from highcharts.highmaps.highmap_helper import jsonp_loader, js_map_loader, geojson_handler H = Highmap(height=750) map_url = 'http://code.highcharts.com/mapdata/countries/gb/gb-all.js' geojson = js_map_loader(map_url) data = [{ 'name': 'London', 'lat': 51.507222, 'lon': -0.1275 }, { 'name': 'Birmingham', 'lat': 52.483056, 'lon': -1.893611 }, { 'name': 'Leeds', 'lat': 53.799722, 'lon': -1.549167 }, { 'name': 'Glasgow', 'lat': 55.858, 'lon': -4.259 }, { 'name': 'Sheffield', 'lat': 53.383611,
# -*- coding: utf-8 -*- """ Highmaps Demos Detailed map, US counties: http://www.highcharts.com/maps/demo/us-counties """ from highcharts import Highmap from highcharts.highmaps.highmap_helper import json_loader, js_map_loader, geojson_handler H = Highmap() """ This example generates the same map as us-counties.py, but using functions in highmap_helper module to handle data in python environment completely """ options = { 'chart': { 'borderWidth': 1, 'marginRight': 50 }, 'title': { 'text': 'US Counties unemployment rates, April 2015' }, 'legend': { 'title': { 'text': 'Unemployment<br>rate', 'style': { 'color': "(Highcharts.theme && Highcharts.theme.textColor) || 'black'" } },