can feedparser parse geo-rss - parsing
the geo-rss.xml is :
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml">
<channel>
<link>http://maps.google.com</link>
<title>beijing 1</title>
<description><![CDATA[dsad]]></description>
<item>
<guid isPermaLink="false">00048b5b66b7169311de4</guid>
<pubDate>Wed, 14 Jul 2010 16:23:08 +0000</pubDate>
<title>ww</title>
<description><![CDATA[<div dir="ltr">dwqd</div>]]></description>
<author>zjm1126</author>
<georss:point>
39.965015 116.362381
</georss:point>
<georss:elev>0.000000</georss:elev>
</item>
<item>
<guid isPermaLink="false">00048b5b6a51f18e53ea5</guid>
<pubDate>Wed, 14 Jul 2010 16:24:08 +0000</pubDate>
<title>线条 1</title>
<description><![CDATA[]]></description>
<author>zjm1126</author>
<gml:LineString>
<gml:posList>
39.992191 116.417938
39.968254 116.466698
39.939568 116.451591
39.959045 116.411079
</gml:posList>
</gml:LineString>
</item>
<item>
<guid isPermaLink="false">00048b5b6a520c46d52bd</guid>
<pubDate>Wed, 14 Jul 2010 16:24:08 +0000</pubDate>
<title>线条 2</title>
<description><![CDATA[<br>]]></description>
<author>zjm1126</author>
<gml:LineString>
<gml:posList>
39.990536 116.437225
39.963963 116.477051
39.958702 116.437912
39.959045 116.411079
</gml:posList>
</gml:LineString>
</item>
<item>
<guid isPermaLink="false">00048b5b6a521daa5391e</guid>
<pubDate>Wed, 14 Jul 2010 16:24:08 +0000</pubDate>
<title>qqdw</title>
<description><![CDATA[dsa]]></description>
<author>zjm1126</author>
<gml:LineString>
<gml:posList>
39.987720 116.519913
39.947990 116.556641
39.959045 116.523003
</gml:posList>
</gml:LineString>
</item>
<item>
<guid isPermaLink="false">00048b5b6a52357ab39f0</guid>
<pubDate>Wed, 14 Jul 2010 16:24:08 +0000</pubDate>
<title>dwqd</title>
<description><![CDATA[]]></description>
<author>zjm1126</author>
<gml:Polygon>
<gml:exterior>
<gml:LinearRing>
<gml:posList>
40.034264 116.451241
40.015781 116.437225
40.011654 116.409363
40.033478 116.430305
40.034264 116.451241
</gml:posList>
</gml:LinearRing>
</gml:exterior>
</gml:Polygon>
</item>
</channel>
</rss>
and feedparser 's code is :
import feedparser
class read(BaseRequestHandler):
def post(self):
url=self.request.POST['url']
d = feedparser.parse(url)
o=d
self.response.out.write(''.join('%s: %s <br/>' % (a, getattr(o, a)) for a in dir(o)))
return
when i parse geo-rss.xml use feedparser , it show :
__class__:
__cmp__:
__contains__:
dwqd
', 'language': None}, 'summary': u'
dwqd
', 'guidislink': False, 'title_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/plain', 'value': u'ww', 'language': None}, 'elev': u'0.000000', 'id': u'http://maps.google.com/maps/00048b5b66b7169311de4'}, {'updated': u'Wed, 14 Jul 2010 16:24:08 +0000', 'updated_parsed': (2010, 7, 14, 16, 24, 8, 2, 195, 0), 'title': u'\u7ebf\u6761 1', 'author': u'zjm1126', 'summary_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/html', 'value': u'', 'language': None}, 'summary': u'', 'guidislink': False, 'title_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/plain', 'value': u'\u7ebf\u6761 1', 'language': None}, 'poslist': u'39.992191 116.417938\n 39.968254 116.466698\n 39.939568 116.451591\n 39.959045 116.411079', 'linestring': u'', 'id': u'http://maps.google.com/maps/00048b5b6a51f18e53ea5'}, {'updated': u'Wed, 14 Jul 2010 16:24:08 +0000', 'updated_parsed': (2010, 7, 14, 16, 24, 8, 2, 195, 0), 'title': u'\u7ebf\u6761 2', 'author': u'zjm1126', 'summary_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/html', 'value': u'
', 'language': None}, 'summary': u'
', 'guidislink': False, 'title_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/plain', 'value': u'\u7ebf\u6761 2', 'language': None}, 'poslist': u'39.990536 116.437225\n 39.963963 116.477051\n 39.958702 116.437912\n 39.959045 116.411079', 'linestring': u'', 'id': u'http://maps.google.com/maps/00048b5b6a520c46d52bd'}, {'updated': u'Wed, 14 Jul 2010 16:24:08 +0000', 'updated_parsed': (2010, 7, 14, 16, 24, 8, 2, 195, 0), 'title': u'qqdw', 'author': u'zjm1126', 'summary_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/html', 'value': u'dsa', 'language': None}, 'summary': u'dsa', 'guidislink': False, 'title_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/plain', 'value': u'qqdw', 'language': None}, 'poslist': u'39.987720 116.519913\n 39.947990 116.556641\n 39.959045 116.523003', 'linestring': u'', 'id': u'http://maps.google.com/maps/00048b5b6a521daa5391e'}, {'updated': u'Wed, 14 Jul 2010 16:24:08 +0000', 'updated_parsed': (2010, 7, 14, 16, 24, 8, 2, 195, 0), 'title': u'dwqd', 'author': u'zjm1126', 'summary_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/html', 'value': u'', 'language': None}, 'summary': u'', 'guidislink': False, 'title_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/plain', 'value': u'dwqd', 'language': None}, 'poslist': u'40.034264 116.451241\n 40.015781 116.437225\n 40.011654 116.409363\n 40.033478 116.430305\n 40.034264 116.451241', 'exterior': u'', 'polygon': u'', 'id': u'http://maps.google.com/maps/00048b5b6a52357ab39f0', 'linearring': u''}]}>
__delattr__:
__delitem__:
__dict__: {}
__doc__: None
__eq__:
__ge__:
__getattr__:
dwqd
', 'language': None}, 'summary': u'
dwqd
', 'guidislink': False, 'title_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/plain', 'value': u'ww', 'language': None}, 'elev': u'0.000000', 'id': u'http://maps.google.com/maps/00048b5b66b7169311de4'}, {'updated': u'Wed, 14 Jul 2010 16:24:08 +0000', 'updated_parsed': (2010, 7, 14, 16, 24, 8, 2, 195, 0), 'title': u'\u7ebf\u6761 1', 'author': u'zjm1126', 'summary_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/html', 'value': u'', 'language': None}, 'summary': u'', 'guidislink': False, 'title_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/plain', 'value': u'\u7ebf\u6761 1', 'language': None}, 'poslist': u'39.992191 116.417938\n 39.968254 116.466698\n 39.939568 116.451591\n 39.959045 116.411079', 'linestring': u'', 'id': u'http://maps.google.com/maps/00048b5b6a51f18e53ea5'}, {'updated': u'Wed, 14 Jul 2010 16:24:08 +0000', 'updated_parsed': (2010, 7, 14, 16, 24, 8, 2, 195, 0), 'title': u'\u7ebf\u6761 2', 'author': u'zjm1126', 'summary_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/html', 'value': u'
', 'language': None}, 'summary': u'
', 'guidislink': False, 'title_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/plain', 'value': u'\u7ebf\u6761 2', 'language': None}, 'poslist': u'39.990536 116.437225\n 39.963963 116.477051\n 39.958702 116.437912\n 39.959045 116.411079', 'linestring': u'', 'id': u'http://maps.google.com/maps/00048b5b6a520c46d52bd'}, {'updated': u'Wed, 14 Jul 2010 16:24:08 +0000', 'updated_parsed': (2010, 7, 14, 16, 24, 8, 2, 195, 0), 'title': u'qqdw', 'author': u'zjm1126', 'summary_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/html', 'value': u'dsa', 'language': None}, 'summary': u'dsa', 'guidislink': False, 'title_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/plain', 'value': u'qqdw', 'language': None}, 'poslist': u'39.987720 116.519913\n 39.947990 116.556641\n 39.959045 116.523003', 'linestring': u'', 'id': u'http://maps.google.com/maps/00048b5b6a521daa5391e'}, {'updated': u'Wed, 14 Jul 2010 16:24:08 +0000', 'updated_parsed': (2010, 7, 14, 16, 24, 8, 2, 195, 0), 'title': u'dwqd', 'author': u'zjm1126', 'summary_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/html', 'value': u'', 'language': None}, 'summary': u'', 'guidislink': False, 'title_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/plain', 'value': u'dwqd', 'language': None}, 'poslist': u'40.034264 116.451241\n 40.015781 116.437225\n 40.011654 116.409363\n 40.033478 116.430305\n 40.034264 116.451241', 'exterior': u'', 'polygon': u'', 'id': u'http://maps.google.com/maps/00048b5b6a52357ab39f0', 'linearring': u''}]}>
__getattribute__:
__getitem__:
dwqd
', 'language': None}, 'summary': u'
dwqd
', 'guidislink': False, 'title_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/plain', 'value': u'ww', 'language': None}, 'elev': u'0.000000', 'id': u'http://maps.google.com/maps/00048b5b66b7169311de4'}, {'updated': u'Wed, 14 Jul 2010 16:24:08 +0000', 'updated_parsed': (2010, 7, 14, 16, 24, 8, 2, 195, 0), 'title': u'\u7ebf\u6761 1', 'author': u'zjm1126', 'summary_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/html', 'value': u'', 'language': None}, 'summary': u'', 'guidislink': False, 'title_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/plain', 'value': u'\u7ebf\u6761 1', 'language': None}, 'poslist': u'39.992191 116.417938\n 39.968254 116.466698\n 39.939568 116.451591\n 39.959045 116.411079', 'linestring': u'', 'id': u'http://maps.google.com/maps/00048b5b6a51f18e53ea5'}, {'updated': u'Wed, 14 Jul 2010 16:24:08 +0000', 'updated_parsed': (2010, 7, 14, 16, 24, 8, 2, 195, 0), 'title': u'\u7ebf\u6761 2', 'author': u'zjm1126', 'summary_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/html', 'value': u'
', 'language': None}, 'summary': u'
', 'guidislink': False, 'title_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/plain', 'value': u'\u7ebf\u6761 2', 'language': None}, 'poslist': u'39.990536 116.437225\n 39.963963 116.477051\n 39.958702 116.437912\n 39.959045 116.411079', 'linestring': u'', 'id': u'http://maps.google.com/maps/00048b5b6a520c46d52bd'}, {'updated': u'Wed, 14 Jul 2010 16:24:08 +0000', 'updated_parsed': (2010, 7, 14, 16, 24, 8, 2, 195, 0), 'title': u'qqdw', 'author': u'zjm1126', 'summary_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/html', 'value': u'dsa', 'language': None}, 'summary': u'dsa', 'guidislink': False, 'title_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/plain', 'value': u'qqdw', 'language': None}, 'poslist': u'39.987720 116.519913\n 39.947990 116.556641\n 39.959045 116.523003', 'linestring': u'', 'id': u'http://maps.google.com/maps/00048b5b6a521daa5391e'}, {'updated': u'Wed, 14 Jul 2010 16:24:08 +0000', 'updated_parsed': (2010, 7, 14, 16, 24, 8, 2, 195, 0), 'title': u'dwqd', 'author': u'zjm1126', 'summary_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/html', 'value': u'', 'language': None}, 'summary': u'', 'guidislink': False, 'title_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/plain', 'value': u'dwqd', 'language': None}, 'poslist': u'40.034264 116.451241\n 40.015781 116.437225\n 40.011654 116.409363\n 40.033478 116.430305\n 40.034264 116.451241', 'exterior': u'', 'polygon': u'', 'id': u'http://maps.google.com/maps/00048b5b6a52357ab39f0', 'linearring': u''}]}>
__gt__:
__hash__:
__init__:
__iter__:
__le__:
__len__:
__lt__:
__module__: feedparser
__ne__:
__new__:
__reduce__:
__reduce_ex__:
__repr__:
__setattr__:
dwqd
', 'language': None}, 'summary': u'
dwqd
', 'guidislink': False, 'title_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/plain', 'value': u'ww', 'language': None}, 'elev': u'0.000000', 'id': u'http://maps.google.com/maps/00048b5b66b7169311de4'}, {'updated': u'Wed, 14 Jul 2010 16:24:08 +0000', 'updated_parsed': (2010, 7, 14, 16, 24, 8, 2, 195, 0), 'title': u'\u7ebf\u6761 1', 'author': u'zjm1126', 'summary_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/html', 'value': u'', 'language': None}, 'summary': u'', 'guidislink': False, 'title_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/plain', 'value': u'\u7ebf\u6761 1', 'language': None}, 'poslist': u'39.992191 116.417938\n 39.968254 116.466698\n 39.939568 116.451591\n 39.959045 116.411079', 'linestring': u'', 'id': u'http://maps.google.com/maps/00048b5b6a51f18e53ea5'}, {'updated': u'Wed, 14 Jul 2010 16:24:08 +0000', 'updated_parsed': (2010, 7, 14, 16, 24, 8, 2, 195, 0), 'title': u'\u7ebf\u6761 2', 'author': u'zjm1126', 'summary_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/html', 'value': u'
', 'language': None}, 'summary': u'
', 'guidislink': False, 'title_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/plain', 'value': u'\u7ebf\u6761 2', 'language': None}, 'poslist': u'39.990536 116.437225\n 39.963963 116.477051\n 39.958702 116.437912\n 39.959045 116.411079', 'linestring': u'', 'id': u'http://maps.google.com/maps/00048b5b6a520c46d52bd'}, {'updated': u'Wed, 14 Jul 2010 16:24:08 +0000', 'updated_parsed': (2010, 7, 14, 16, 24, 8, 2, 195, 0), 'title': u'qqdw', 'author': u'zjm1126', 'summary_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/html', 'value': u'dsa', 'language': None}, 'summary': u'dsa', 'guidislink': False, 'title_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/plain', 'value': u'qqdw', 'language': None}, 'poslist': u'39.987720 116.519913\n 39.947990 116.556641\n 39.959045 116.523003', 'linestring': u'', 'id': u'http://maps.google.com/maps/00048b5b6a521daa5391e'}, {'updated': u'Wed, 14 Jul 2010 16:24:08 +0000', 'updated_parsed': (2010, 7, 14, 16, 24, 8, 2, 195, 0), 'title': u'dwqd', 'author': u'zjm1126', 'summary_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/html', 'value': u'', 'language': None}, 'summary': u'', 'guidislink': False, 'title_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/plain', 'value': u'dwqd', 'language': None}, 'poslist': u'40.034264 116.451241\n 40.015781 116.437225\n 40.011654 116.409363\n 40.033478 116.430305\n 40.034264 116.451241', 'exterior': u'', 'polygon': u'', 'id': u'http://maps.google.com/maps/00048b5b6a52357ab39f0', 'linearring': u''}]}>
__setitem__:
dwqd
', 'language': None}, 'summary': u'
dwqd
', 'guidislink': False, 'title_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/plain', 'value': u'ww', 'language': None}, 'elev': u'0.000000', 'id': u'http://maps.google.com/maps/00048b5b66b7169311de4'}, {'updated': u'Wed, 14 Jul 2010 16:24:08 +0000', 'updated_parsed': (2010, 7, 14, 16, 24, 8, 2, 195, 0), 'title': u'\u7ebf\u6761 1', 'author': u'zjm1126', 'summary_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/html', 'value': u'', 'language': None}, 'summary': u'', 'guidislink': False, 'title_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/plain', 'value': u'\u7ebf\u6761 1', 'language': None}, 'poslist': u'39.992191 116.417938\n 39.968254 116.466698\n 39.939568 116.451591\n 39.959045 116.411079', 'linestring': u'', 'id': u'http://maps.google.com/maps/00048b5b6a51f18e53ea5'}, {'updated': u'Wed, 14 Jul 2010 16:24:08 +0000', 'updated_parsed': (2010, 7, 14, 16, 24, 8, 2, 195, 0), 'title': u'\u7ebf\u6761 2', 'author': u'zjm1126', 'summary_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/html', 'value': u'
', 'language': None}, 'summary': u'
', 'guidislink': False, 'title_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/plain', 'value': u'\u7ebf\u6761 2', 'language': None}, 'poslist': u'39.990536 116.437225\n 39.963963 116.477051\n 39.958702 116.437912\n 39.959045 116.411079', 'linestring': u'', 'id': u'http://maps.google.com/maps/00048b5b6a520c46d52bd'}, {'updated': u'Wed, 14 Jul 2010 16:24:08 +0000', 'updated_parsed': (2010, 7, 14, 16, 24, 8, 2, 195, 0), 'title': u'qqdw', 'author': u'zjm1126', 'summary_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/html', 'value': u'dsa', 'language': None}, 'summary': u'dsa', 'guidislink': False, 'title_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/plain', 'value': u'qqdw', 'language': None}, 'poslist': u'39.987720 116.519913\n 39.947990 116.556641\n 39.959045 116.523003', 'linestring': u'', 'id': u'http://maps.google.com/maps/00048b5b6a521daa5391e'}, {'updated': u'Wed, 14 Jul 2010 16:24:08 +0000', 'updated_parsed': (2010, 7, 14, 16, 24, 8, 2, 195, 0), 'title': u'dwqd', 'author': u'zjm1126', 'summary_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/html', 'value': u'', 'language': None}, 'summary': u'', 'guidislink': False, 'title_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/plain', 'value': u'dwqd', 'language': None}, 'poslist': u'40.034264 116.451241\n 40.015781 116.437225\n 40.011654 116.409363\n 40.033478 116.430305\n 40.034264 116.451241', 'exterior': u'', 'polygon': u'', 'id': u'http://maps.google.com/maps/00048b5b6a52357ab39f0', 'linearring': u''}]}>
__slotnames__: []
__str__:
__weakref__: None
clear:
copy:
fromkeys:
get:
dwqd
', 'language': None}, 'summary': u'
dwqd
', 'guidislink': False, 'title_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/plain', 'value': u'ww', 'language': None}, 'elev': u'0.000000', 'id': u'http://maps.google.com/maps/00048b5b66b7169311de4'}, {'updated': u'Wed, 14 Jul 2010 16:24:08 +0000', 'updated_parsed': (2010, 7, 14, 16, 24, 8, 2, 195, 0), 'title': u'\u7ebf\u6761 1', 'author': u'zjm1126', 'summary_detail': {'base': u'http://maps.google.com/maps/ms?ie=UTF8&hl=zh-CN&vps=1&jsv=255b&msa=0&output=georss&msid=109685068115364659392.00048b5b630141d82b83a', 'type': 'text/html', 'value': u'',
i want to know , is this data useful for me ?
thanks
The patch
http://feedparser.googlecode.com/issues/attachment?aid=-5035140636427960669&name=georss-gml.patch&token=dcfce8c56d5beb3ebf566bc3c16994e2
attached to
http://code.google.com/p/feedparser/issues/detail?id=62
will let you parse GeoRSS of different flavors.
Related
flutter dart How to list all values of a specific key value in a map
I want to get the value of 'id' of map as list. Expected output: [1,35, 93, 82, 28] [{'id': 1, 'name':'flutter', 'title':'dart'}, {'id': 35, 'name':'flutter', 'title':'dart'}, {'id': 93, 'name':'flutter', 'title':'dart'}, {'id': 82, 'name':'flutter', 'title':'dart'}, {'id': 28, 'name':'flutter', 'title':'dart'}, ];
You can use .map to iterate through each object and get the value you want: void main() { final list = [ {'id': 1, 'name': 'flutter', 'title': 'dart'}, {'id': 35, 'name': 'flutter', 'title': 'dart'}, {'id': 93, 'name': 'flutter', 'title': 'dart'}, {'id': 82, 'name': 'flutter', 'title': 'dart'}, {'id': 28, 'name': 'flutter', 'title': 'dart'}, ]; final idList = list.map((e) => e['id']).toList(); // [1, 35, 93, 82, 28] }
Outlook REST API returns events without start and end dates
When requesting GET https://outlook.office.com/api/v2.0/me/calendars/{calendar_id}/events the response (for some events) does not have a Start and End date. The full structure for such events is as follows: { 'OriginalStartTimeZone': None, 'End': { 'TimeZone': 'tzone://Microsoft/Utc', 'DateTime': '0001-01-01T00:00:00.0000000Z' }, 'HasAttachments': False, 'ResponseRequested': True, 'ShowAs': 'Free', 'Recurrence': None, 'Start': { 'TimeZone': 'tzone://Microsoft/Utc', 'DateTime': '0001-01-01T00:00:00.0000000Z' }, 'BodyPreview': '', 'AllowNewTimeProposals': True, 'Location': {...}, 'Attendees': [...], 'TransactionId': None, 'Type': 'SingleInstance', 'ResponseStatus': { 'Response': 'NotResponded', 'Time': '0001-01-01T00:00:00Z' }, 'Body': {...}, 'OnlineMeeting': None, 'IsRoomRequested': False, 'OnlineMeetingProvider': 'Unknown', 'IsCancelled': False, 'IsAllDay': False, 'ReminderMinutesBeforeStart': 0, 'Subject': '...', 'Categories': [], 'LastModifiedDateTime': '2020-03-11T18:31:15.548Z', 'AutoRoomBookingOptions': None, 'OriginalEndTimeZone': None, 'CreatedDateTime': '2020-03-11T18:34:34.259429Z', 'IsOnlineMeeting': False, '#odata.id': '...', 'IsDraft': False, 'WebLink': '...', 'ChangeKey': '...', 'SeriesMasterId': None, 'IsOrganizer': True, 'iCalUId': None, 'AutoRoomBookingStatus': 'None', 'Locations': [], 'Id': '...', 'IsReminderOn': False, 'Calendar#odata.associationLink': '...', 'Calendar#odata.navigationLink': '...', 'Importance': 'Normal', 'Organizer': {...}, '#odata.etag': '...', 'Sensitivity': 'Normal', 'OnlineMeetingUrl': None } Is this normal behavior? If so, how can this be displayed? How can I create such an event to reproduce it?
data in x-axis in highcharts with 15mins timeblock
I am facing issue in displaying 96 Timeblock on x-axis in highcharts. Array which needs to be displayed is ["00:00", "00:15", "00:30", "00:45", "01:00", "01:15", "01:30", "01:45", "02:00", "02:15", "02:30", "02:45", "03:00", "03:15", "03:30", "03:45", "04:00", "04:15", "04:30", "04:45", "05:00", "05:15", "05:30", "05:45", "06:00", "06:15", "06:30", "06:45", "07:00", "07:15", "07:30", "07:45", "08:00", "08:15", "08:30", "08:45", "09:00", "09:15", "09:30", "09:45", "10:00", "10:15", "10:30", "10:45", "11:00", "11:15", "11:30", "11:45", "12:00", "12:15", "12:30", "12:45", "13:00", "13:15", "13:30", "13:45", "14:00", "14:15", "14:30", "14:45", "15:00", "15:15", "15:30", "15:45", "16:00", "16:15", "16:30", "16:45", "17:00", "17:15", "17:30", "17:45", "18:00", "18:15", "18:30", "18:45", "19:00", "19:15", "19:30", "19:45", "20:00", "20:15", "20:30", "20:45", "21:00", "21:15", "21:30", "21:45", "22:00", "22:15", "22:30", "22:45", "23:00", "23:15", "23:30", "23:45"], I need all these values to be displayed on x-axis with 15mins interval, { startOnTick: false, endOnTick: false, min: 0, //type: 'datetime', //pointInterval:1, tickInterval: 0.25, max: Math.max(this.deviation.allTimeBlocks.length), minRange: 1000 * 60 * 60 * 60, type: 'datetime', scrollbar: { enabled: true }, tickPixelInterval: 0.25, //tickmarkPlacement: 'on', title: { text: 'Time (hrs)', style: { color: this.Highcharts.getOptions().colors[1] } }, categories: ["00:00", "00:15", "00:30", "00:45", "01:00", "01:15", "01:30", "01:45", "02:00", "02:15", "02:30", "02:45", "03:00", "03:15", "03:30", "03:45", "04:00", "04:15", "04:30", "04:45", "05:00", "05:15", "05:30", "05:45", "06:00", "06:15", "06:30", "06:45", "07:00", "07:15", "07:30", "07:45", "08:00", "08:15", "08:30", "08:45", "09:00", "09:15", "09:30", "09:45", "10:00", "10:15", "10:30", "10:45", "11:00", "11:15", "11:30", "11:45", "12:00", "12:15", "12:30", "12:45", "13:00", "13:15", "13:30", "13:45", "14:00", "14:15", "14:30", "14:45", "15:00", "15:15", "15:30", "15:45", "16:00", "16:15", "16:30", "16:45", "17:00", "17:15", "17:30", "17:45", "18:00", "18:15", "18:30", "18:45", "19:00", "19:15", "19:30", "19:45", "20:00", "20:15", "20:30", "20:45", "21:00", "21:15", "21:30", "21:45", "22:00", "22:15", "22:30", "22:45", "23:00", "23:15", "23:30", "23:45"], },
You can use scrollablePlotArea: chart: { scrollablePlotArea: { minWidth: 2500 } } Demo: https://jsfiddle.net/BlackLabel/t8cLzpes/ API reference: https://api.highcharts.com/highcharts/chart.scrollablePlotArea.minWidth
How to use customized cards with Microsoft Teams webhook
Adaptive cards receive "bad request 400" error I'm trying to send a POST request from AWS Lambda running Python 3.7 using the urlopen method I have a regular card request that is working but an adaptive card will hit the error mentioned above. Example of working card: {'#context': 'https://schema.org/extensions', '#type': 'MessageCard', 'themeColor': 'd63333', 'title': 'Red Alert - There is an issue Example alarm name', 'text': 'Example alarm name has changed from OK to ALARM - Threshold Crossed: 1 datapoint (10.0) was greater than or equal to the threshold (1.0).'} Example of customized card (getting bad request error - 400): {'#context': 'https://schema.org/extensions', '#type': 'AdaptiveCard', 'padding': 'none', 'body': [{'type': 'Container', 'style': 'emphasis', 'items': [{'type': 'ColumnSet', 'columns': [{'type': 'Column', 'items': [{'type': 'Image', 'horizontalAlignment': 'Right', 'url': 'https://miro.medium.com/max/1000/1*sszpZOih_xJV_lZsDbog-Q.png', 'height': '50px', 'altText': 'MC Logo'}], 'width': 'auto'}]}]}, {'type': 'Container', 'padding': {'top': 'none', 'left': 'default', 'bottom': 'default', 'right': 'default'}, 'items': [{'type': 'Container', 'items': [{'type': 'ColumnSet', 'spacing': 'Large', 'separator': 1, 'columns': [{'type': 'Column', 'verticalContentAlignment': 'center', 'items': [{'type': 'Image', 'horizontalAlignment': 'Center', 'style': 'Person', 'url': 'https://www.sccpre.cat/mypng/detail/57-574129_4-warning-stamp-vector-png-transparent-svg-warning.png', 'width': '60px', 'altText': 'warning logo'}], 'width': '60px'}, {'type': 'Column', 'items': [{'type': 'TextBlock', 'size': 'Medium', 'text': 'Example alarm name issue description', 'wrap': 1}, {'type': 'TextBlock', 'spacing': 'None', 'text': 'MC ETL Process notifier', 'isSubtle': 1}], 'width': 'stretch'}]}, {'type': 'FactSet', 'facts': [{'title': 'Incident time:', 'value': '06/07/2019 03:10:12 AM CT'}, {'title': 'Component:', 'value': 'AWS Glue - insert funds job'}, {'title': 'Overall nightly done:', 'value': '73%'}]}, {'type': 'TextBlock', 'spacing': 'Small', 'weight': 'Bolder', 'color': 'Accent', 'size': 'Medium', 'text': 'Click to restart'}, {'type': 'TextBlock', 'spacing': 'Small', 'weight': 'Bolder', 'color': 'Accent', 'size': 'Medium', 'text': 'Click to review logs'}]}]}], 'version': '1.0'} What is wrong with my POST request?
Currently, Teams incoming Webhooks does not support Adaptive Cards. You can send only Message Card in connector messages. We are working on the Adaptive Card support but do not have timeline to share.
How can you set colors per level in a Highcharts Sunburst chart?
Can you control colors per level in a Highcharts Sunburst chart? In this demo chart, is it possible to make the continents level and the sub-continent level, one single colour and the last level (countries) scaled colours? var data = [{ 'id': '0.0', 'parent': '', 'name': 'The World' }, { 'id': '1.3', 'parent': '0.0', 'name': 'Asia' }, { 'id': '1.1', 'parent': '0.0', 'name': 'Africa' }, { 'id': '1.2', 'parent': '0.0', 'name': 'America' }, { 'id': '1.4', 'parent': '0.0', 'name': 'Europe' }, { 'id': '1.5', 'parent': '0.0', 'name': 'Oceanic' }, /* Africa */ { 'id': '2.1', 'parent': '1.1', 'name': 'Eastern Africa' }, { 'id': '3.1', 'parent': '2.1', 'name': 'Ethiopia', 'value': 104957438 }, { 'id': '3.2', 'parent': '2.1', 'name': 'Tanzania', 'value': 57310019 }, { 'id': '3.3', 'parent': '2.1', 'name': 'Kenya', 'value': 49699862 }, { 'id': '3.4', 'parent': '2.1', 'name': 'Uganda', 'value': 42862958 }, { 'id': '3.5', 'parent': '2.1', 'name': 'Mozambique', 'value': 29668834 }, { 'id': '3.6', 'parent': '2.1', 'name': 'Madagascar', 'value': 25570895 }, { 'id': '3.7', 'parent': '2.1', 'name': 'Malawi', 'value': 18622104 }, { 'id': '3.8', 'parent': '2.1', 'name': 'Zambia', 'value': 17094130 }, { 'id': '3.9', 'parent': '2.1', 'name': 'Zimbabwe', 'value': 16529904 }, { 'id': '3.10', 'parent': '2.1', 'name': 'Somalia', 'value': 14742523 }, { 'id': '3.11', 'parent': '2.1', 'name': 'South Sudan', 'value': 12575714 }, { 'id': '3.12', 'parent': '2.1', 'name': 'Rwanda', 'value': 12208407 }, { 'id': '3.13', 'parent': '2.1', 'name': 'Burundi', 'value': 10864245 }, { 'id': '3.14', 'parent': '2.1', 'name': 'Eritrea', 'value': 5068831 }, { 'id': '3.15', 'parent': '2.1', 'name': 'Mauritius', 'value': 1265138 }, { 'id': '3.16', 'parent': '2.1', 'name': 'Djibouti', 'value': 956985 }, { 'id': '3.17', 'parent': '2.1', 'name': 'Réunion', 'value': 876562 }, { 'id': '3.18', 'parent': '2.1', 'name': 'Comoros', 'value': 813912 }, { 'id': '3.19', 'parent': '2.1', 'name': 'Mayotte', 'value': 253045 }, { 'id': '3.20', 'parent': '2.1', 'name': 'Seychelles', 'value': 94737 }, { 'id': '2.5', 'parent': '1.1', 'name': 'Western Africa' }, { 'id': '3.42', 'parent': '2.5', 'name': 'Nigeria', 'value': 190886311 }, { 'id': '3.43', 'parent': '2.5', 'name': 'Ghana', 'value': 28833629 }, { 'id': '3.44', 'parent': '2.5', 'name': 'Côte Ivoire', 'value': 24294750 }, { 'id': '3.45', 'parent': '2.5', 'name': 'Niger', 'value': 21477348 }, { 'id': '3.46', 'parent': '2.5', 'name': 'Burkina Faso', 'value': 19193382 }, { 'id': '3.47', 'parent': '2.5', 'name': 'Mali', 'value': 18541980 }, { 'id': '3.48', 'parent': '2.5', 'name': 'Senegal', 'value': 15850567 }, { 'id': '3.49', 'parent': '2.5', 'name': 'Guinea', 'value': 12717176 }, { 'id': '3.50', 'parent': '2.5', 'name': 'Benin', 'value': 11175692 }, { 'id': '3.51', 'parent': '2.5', 'name': 'Togo', 'value': 7797694 }, { 'id': '3.52', 'parent': '2.5', 'name': 'Sierra Leone', 'value': 7557212 }, { 'id': '3.53', 'parent': '2.5', 'name': 'Liberia', 'value': 4731906 }, { 'id': '3.54', 'parent': '2.5', 'name': 'Mauritania', 'value': 4420184 }, { 'id': '3.55', 'parent': '2.5', 'name': 'The Gambia', 'value': 2100568 }, { 'id': '3.56', 'parent': '2.5', 'name': 'Guinea-Bissau', 'value': 1861283 }, { 'id': '3.57', 'parent': '2.5', 'name': 'Cabo Verde', 'value': 546388 }, { 'id': '3.58', 'parent': '2.5', 'name': 'Saint Helena, Ascension and Tristan da Cunha', 'value': 4049 }, { 'id': '2.3', 'parent': '1.1', 'name': 'North Africa' }, { 'id': '3.30', 'parent': '2.3', 'name': 'Egypt', 'value': 97553151 }, { 'id': '3.31', 'parent': '2.3', 'name': 'Algeria', 'value': 41318142 }, { 'id': '3.32', 'parent': '2.3', 'name': 'Sudan', 'value': 40533330 }, { 'id': '3.33', 'parent': '2.3', 'name': 'Morocco', 'value': 35739580 }, { 'id': '3.34', 'parent': '2.3', 'name': 'Tunisia', 'value': 11532127 }, { 'id': '3.35', 'parent': '2.3', 'name': 'Libya', 'value': 6374616 }, { 'id': '3.36', 'parent': '2.3', 'name': 'Western Sahara', 'value': 552628 }, { 'id': '2.2', 'parent': '1.1', 'name': 'Central Africa' }, { 'id': '3.21', 'parent': '2.2', 'name': 'Democratic Republic of the Congo', 'value': 81339988 }, { 'id': '3.22', 'parent': '2.2', 'name': 'Angola', 'value': 29784193 }, { 'id': '3.23', 'parent': '2.2', 'name': 'Cameroon', 'value': 24053727 }, { 'id': '3.24', 'parent': '2.2', 'name': 'Chad', 'value': 14899994 }, { 'id': '3.25', 'parent': '2.2', 'name': 'Congo', 'value': 5260750 }, { 'id': '3.26', 'parent': '2.2', 'name': 'Central African Republic', 'value': 4659080 }, { 'id': '3.27', 'parent': '2.2', 'name': 'Gabon', 'value': 2025137 }, { 'id': '3.28', 'parent': '2.2', 'name': 'Equatorial Guinea', 'value': 1267689 }, { 'id': '3.29', 'parent': '2.2', 'name': 'Sao Tome and Principe', 'value': 204327 }, { 'id': '2.4', 'parent': '1.1', 'name': 'South America' }, { 'id': '3.37', 'parent': '2.4', 'name': 'South Africa', 'value': 56717156 }, { 'id': '3.38', 'parent': '2.4', 'name': 'Namibia', 'value': 2533794 }, { 'id': '3.39', 'parent': '2.4', 'name': 'Botswana', 'value': 2291661 }, { 'id': '3.40', 'parent': '2.4', 'name': 'Lesotho', 'value': 2233339 }, { 'id': '3.41', 'parent': '2.4', 'name': 'Swaziland', 'value': 1367254 }, /***********/ /* America */ { 'id': '2.9', 'parent': '1.2', 'name': 'South America' }, { 'id': '3.98', 'parent': '2.9', 'name': 'Brazil', 'value': 209288278 }, { 'id': '3.99', 'parent': '2.9', 'name': 'Colombia', 'value': 49065615 }, { 'id': '3.100', 'parent': '2.9', 'name': 'Argentina', 'value': 44271041 }, { 'id': '3.101', 'parent': '2.9', 'name': 'Peru', 'value': 32165485 }, { 'id': '3.102', 'parent': '2.9', 'name': 'Venezuela', 'value': 31977065 }, { 'id': '3.103', 'parent': '2.9', 'name': 'Chile', 'value': 18054726 }, { 'id': '3.104', 'parent': '2.9', 'name': 'Ecuador', 'value': 16624858 }, { 'id': '3.105', 'parent': '2.9', 'name': 'Bolivia', 'value': 11051600 }, { 'id': '3.106', 'parent': '2.9', 'name': 'Paraguay', 'value': 6811297 }, { 'id': '3.107', 'parent': '2.9', 'name': 'Uruguay', 'value': 3456750 }, { 'id': '3.108', 'parent': '2.9', 'name': 'Guyana', 'value': 777859 }, { 'id': '3.109', 'parent': '2.9', 'name': 'Suriname', 'value': 563402 }, { 'id': '3.110', 'parent': '2.9', 'name': 'French Guiana', 'value': 282731 }, { 'id': '3.111', 'parent': '2.9', 'name': 'Falkland Islands', 'value': 2910 }, { 'id': '2.8', 'parent': '1.2', 'name': 'Northern America' }, { 'id': '3.93', 'parent': '2.8', 'name': 'United States', 'value': 324459463 }, { 'id': '3.94', 'parent': '2.8', 'name': 'Canada', 'value': 36624199 }, { 'id': '3.95', 'parent': '2.8', 'name': 'Bermuda', 'value': 61349 }, { 'id': '3.96', 'parent': '2.8', 'name': 'Greenland', 'value': 56480 }, { 'id': '3.97', 'parent': '2.8', 'name': 'Saint Pierre and Miquelon', 'value': 6320 }, { 'id': '2.7', 'parent': '1.2', 'name': 'Central America' }, { 'id': '3.85', 'parent': '2.7', 'name': 'Mexico', 'value': 129163276 }, { 'id': '3.86', 'parent': '2.7', 'name': 'Guatemala', 'value': 16913503 }, { 'id': '3.87', 'parent': '2.7', 'name': 'Honduras', 'value': 9265067 }, { 'id': '3.88', 'parent': '2.7', 'name': 'El Salvador', 'value': 6377853 }, { 'id': '3.89', 'parent': '2.7', 'name': 'Nicaragua', 'value': 6217581 }, { 'id': '3.90', 'parent': '2.7', 'name': 'Costa Rica', 'value': 4905769 }, { 'id': '3.91', 'parent': '2.7', 'name': 'Panama', 'value': 4098587 }, { 'id': '3.92', 'parent': '2.7', 'name': 'Belize', 'value': 374681 }, { 'id': '2.6', 'parent': '1.2', 'name': 'Caribbean' }, { 'id': '3.59', 'parent': '2.6', 'name': 'Cuba', 'value': 11484636 }, { 'id': '3.60', 'parent': '2.6', 'name': 'Haiti', 'value': 10981229 }, { 'id': '3.61', 'parent': '2.6', 'name': 'Dominican Republic', 'value': 10766998 }, { 'id': '3.62', 'parent': '2.6', 'name': 'Puerto Rico', 'value': 3663131 }, { 'id': '3.63', 'parent': '2.6', 'name': 'Jamaica', 'value': 2890299 }, { 'id': '3.64', 'parent': '2.6', 'name': 'Trinidad and Tobago', 'value': 1369125 }, { 'id': '3.65', 'parent': '2.6', 'name': 'Guadeloupe', 'value': 449568 }, { 'id': '3.66', 'parent': '2.6', 'name': 'Bahamas', 'value': 395361 }, { 'id': '3.67', 'parent': '2.6', 'name': 'Martinique', 'value': 384896 }, { 'id': '3.68', 'parent': '2.6', 'name': 'Barbados', 'value': 285719 }, { 'id': '3.69', 'parent': '2.6', 'name': 'Saint Lucia', 'value': 178844 }, { 'id': '3.70', 'parent': '2.6', 'name': 'Curaçao', 'value': 160539 }, { 'id': '3.71', 'parent': '2.6', 'name': 'Saint Vincent and the Grenadines', 'value': 109897 }, { 'id': '3.72', 'parent': '2.6', 'name': 'Grenada', 'value': 107825 }, { 'id': '3.73', 'parent': '2.6', 'name': 'Aruba', 'value': 105264 }, { 'id': '3.74', 'parent': '2.6', 'name': 'United States Virgin Islands', 'value': 104901 }, { 'id': '3.75', 'parent': '2.6', 'name': 'Antigua and Barbuda', 'value': 102012 }, { 'id': '3.76', 'parent': '2.6', 'name': 'Dominica', 'value': 73925 }, { 'id': '3.77', 'parent': '2.6', 'name': 'Cayman Islands', 'value': 61559 }, { 'id': '3.78', 'parent': '2.6', 'name': 'Saint Kitts and Nevis', 'value': 55345 }, { 'id': '3.79', 'parent': '2.6', 'name': 'Sint Maarten', 'value': 40120 }, { 'id': '3.80', 'parent': '2.6', 'name': 'Turks and Caicos Islands', 'value': 35446 }, { 'id': '3.81', 'parent': '2.6', 'name': 'British Virgin Islands', 'value': 31196 }, { 'id': '3.82', 'parent': '2.6', 'name': 'Caribbean Netherlands', 'value': 25398 }, { 'id': '3.83', 'parent': '2.6', 'name': 'Anguilla', 'value': 14909 }, { 'id': '3.84', 'parent': '2.6', 'name': 'Montserrat', 'value': 5177 }, /***********/ /* Asia */ { 'id': '2.13', 'parent': '1.3', 'name': 'Southern Asia' }, { 'id': '3.136', 'parent': '2.13', 'name': 'India', 'value': 1339180127 }, { 'id': '3.137', 'parent': '2.13', 'name': 'Pakistan', 'value': 197015955 }, { 'id': '3.138', 'parent': '2.13', 'name': 'Bangladesh', 'value': 164669751 }, { 'id': '3.139', 'parent': '2.13', 'name': 'Iran', 'value': 81162788 }, { 'id': '3.140', 'parent': '2.13', 'name': 'Afghanistan', 'value': 35530081 }, { 'id': '3.141', 'parent': '2.13', 'name': 'Nepal', 'value': 29304998 }, { 'id': '3.142', 'parent': '2.13', 'name': 'Sri Lanka', 'value': 20876917 }, { 'id': '3.143', 'parent': '2.13', 'name': 'Bhutan', 'value': 807610 }, { 'id': '3.144', 'parent': '2.13', 'name': 'Maldives', 'value': 436330 }, { 'id': '2.11', 'parent': '1.3', 'name': 'Eastern Asia' }, { 'id': '3.117', 'parent': '2.11', 'name': 'China', 'value': 1409517397 }, { 'id': '3.118', 'parent': '2.11', 'name': 'Japan', 'value': 127484450 }, { 'id': '3.119', 'parent': '2.11', 'name': 'South Korea', 'value': 50982212 }, { 'id': '3.120', 'parent': '2.11', 'name': 'North Korea', 'value': 25490965 }, { 'id': '3.121', 'parent': '2.11', 'name': 'Taiwan', 'value': 23626456 }, { 'id': '3.122', 'parent': '2.11', 'name': 'Hong Kong', 'value': 7364883 }, { 'id': '3.123', 'parent': '2.11', 'name': 'Mongolia', 'value': 3075647 }, { 'id': '3.124', 'parent': '2.11', 'name': 'Macau', 'value': 622567 }, { 'id': '2.12', 'parent': '1.3', 'name': 'South-Eastern Asia' }, { 'id': '3.125', 'parent': '2.12', 'name': 'Indonesia', 'value': 263991379 }, { 'id': '3.126', 'parent': '2.12', 'name': 'Philippines', 'value': 104918090 }, { 'id': '3.127', 'parent': '2.12', 'name': 'Vietnam', 'value': 95540800 }, { 'id': '3.128', 'parent': '2.12', 'name': 'Thailand', 'value': 69037513 }, { 'id': '3.129', 'parent': '2.12', 'name': 'Myanmar', 'value': 53370609 }, { 'id': '3.130', 'parent': '2.12', 'name': 'Malaysia', 'value': 31624264 }, { 'id': '3.131', 'parent': '2.12', 'name': 'Cambodia', 'value': 16005373 }, { 'id': '3.132', 'parent': '2.12', 'name': 'Laos', 'value': 6858160 }, { 'id': '3.133', 'parent': '2.12', 'name': 'Singapore', 'value': 5708844 }, { 'id': '3.134', 'parent': '2.12', 'name': 'Timor-Leste', 'value': 1296311 }, { 'id': '3.135', 'parent': '2.12', 'name': 'Brunei', 'value': 428697 // 'color': '' }, { 'id': '2.14', 'parent': '1.3', 'name': 'Western Asia' }, { 'id': '3.145', 'parent': '2.14', 'name': 'Turkey', 'value': 80745020 }, { 'id': '3.146', 'parent': '2.14', 'name': 'Iraq', 'value': 38274618 }, { 'id': '3.147', 'parent': '2.14', 'name': 'Saudi Arabia', 'value': 32938213 }, { 'id': '3.148', 'parent': '2.14', 'name': 'Yemen', 'value': 28250420 }, { 'id': '3.149', 'parent': '2.14', 'name': 'Syria', 'value': 18269868 }, { 'id': '3.150', 'parent': '2.14', 'name': 'Azerbaijan', 'value': 9827589 }, { 'id': '3.115', 'parent': '2.10', 'name': 'Kyrgyzstan', 'value': 6045117 }, { 'id': '3.116', 'parent': '2.10', 'name': 'Turkmenistan', 'value': 5758075 }, /***********/ /* Europe */ { 'id': '2.15', 'parent': '1.4', 'name': 'Eastern Europe' }, { 'id': '3.162', 'parent': '2.15', 'name': 'Russia', 'value': 143989754 }, { 'id': '3.163', 'parent': '2.15', 'name': 'Ukraine', 'value': 44222947 }, { 'id': '3.164', 'parent': '2.15', 'name': 'Poland', 'value': 38170712 }, { 'id': '3.165', 'parent': '2.15', 'name': 'Romania', 'value': 19679306 }, { 'id': '3.166', 'parent': '2.15', 'name': 'Czechia', 'value': 10618303 }, { 'id': '3.167', 'parent': '2.15', 'name': 'Hungary', 'value': 9721559 }, { 'id': '3.168', 'parent': '2.15', 'name': 'Belarus', 'value': 9468338 }, { 'id': '3.169', 'parent': '2.15', 'name': 'Bulgaria', 'value': 7084571 }, { 'id': '3.170', 'parent': '2.15', 'name': 'Slovakia', 'value': 5447662 }, { 'id': '3.171', 'parent': '2.15', 'name': 'Moldova', 'value': 4051212 }, { 'id': '3.172', 'parent': '2.15', 'name': 'Cyprus', 'value': 1179551 }, { 'id': '2.16', 'parent': '1.4', 'name': 'Northern Europe' }, { 'id': '3.173', 'parent': '2.16', 'name': 'United Kingdom', 'value': 66181585 }, { 'id': '3.188', 'parent': '2.17', 'name': 'Greece', 'value': 11159773 }, { 'id': '3.189', 'parent': '2.17', 'name': 'Portugal', 'value': 10329506 }, { 'id': '3.190', 'parent': '2.17', 'name': 'Serbia', 'value': 8790574 }, { 'id': '3.191', 'parent': '2.17', 'name': 'Croatia', 'value': 4189353 }, { 'id': '3.192', 'parent': '2.17', 'name': 'Bosnia and Herzegovina', 'value': 3507017 }, { 'id': '3.193', 'parent': '2.17', 'name': 'Albania', 'value': 2930187 }, { 'id': '3.194', 'parent': '2.17', 'name': 'Republic of Macedonia', 'value': 2083160 }, { 'id': '3.195', 'parent': '2.17', 'name': 'Slovenia', 'value': 2079976 }, { 'id': '3.196', 'parent': '2.17', 'name': 'Montenegro', 'value': 628960 }, { 'id': '3.197', 'parent': '2.17', 'name': 'Malta', 'value': 430835 }, { 'id': '3.198', 'parent': '2.17', 'name': 'Andorra', 'value': 76965 }, { 'id': '3.199', 'parent': '2.17', 'name': 'Gibraltar', 'value': 34571 }, { 'id': '3.200', 'parent': '2.17', 'name': 'San Marino', 'value': 33400 }, { 'id': '3.201', 'parent': '2.17', 'name': 'Vatican City', 'value': 792 }, { 'id': '2.18', 'parent': '1.4', 'name': 'Western Europe' }, { 'id': '3.202', 'parent': '2.18', 'name': 'Germany', 'value': 82114224 }, { 'id': '3.203', 'parent': '2.18', 'name': 'France', 'value': 64979548 }, { 'id': '3.204', 'parent': '2.18', 'name': 'Netherlands', 'value': 17035938 }, { 'id': '3.205', 'parent': '2.18', 'name': 'Belgium', 'value': 11429336 }, { 'id': '3.206', 'parent': '2.18', 'name': 'Austria', 'value': 8735453 }, { 'id': '3.207', 'parent': '2.18', 'name': 'Switzerland', 'value': 8476005 }, { 'id': '3.215', 'parent': '2.20', 'name': 'Solomon Islands', 'value': 611343 }, { 'id': '3.216', 'parent': '2.20', 'name': 'New Caledonia', 'value': 276255 }, { 'id': '3.217', 'parent': '2.20', 'name': 'Vanuatu', 'value': 276244 }, { 'id': '2.21', 'parent': '1.5', 'name': 'Micronesia' }, { 'id': '3.218', 'parent': '2.21', 'name': 'Guam', 'value': 164229 }, { 'id': '3.219', 'parent': '2.21', 'name': 'Kiribati', 'value': 116398 }, { 'id': '3.220', 'parent': '2.21', 'name': 'Federated States of Micronesia', 'value': 105544 }, { 'id': '3.221', 'parent': '2.21', 'name': 'Northern Mariana Islands', 'value': 55144 }, { 'id': '3.222', 'parent': '2.21', 'name': 'Marshall Islands', 'value': 53127 }, { 'id': '3.223', 'parent': '2.21', 'name': 'Palau', 'value': 21729 }, { 'id': '3.224', 'parent': '2.21', 'name': 'Nauru', 'value': 11359 }, { 'id': '2.22', 'parent': '1.5', 'name': 'Polynesia' }, { 'id': '3.225', 'parent': '2.22', 'name': 'French Polynesia', 'value': 283007 }, { 'id': '3.226', 'parent': '2.22', 'name': 'Samoa', 'value': 196440 }, { 'id': '3.227', 'parent': '2.22', 'name': 'Tonga', 'value': 108020 }, { 'id': '3.228', 'parent': '2.22', 'name': 'American Samoa', 'value': 55641 }, { 'id': '3.229', 'parent': '2.22', 'name': 'Cook Islands', 'value': 17380 }, { 'id': '3.230', 'parent': '2.22', 'name': 'Wallis and Futuna', 'value': 11773 }, { 'id': '3.231', 'parent': '2.22', 'name': 'Tuvalu', 'value': 11192 }, { 'id': '3.232', 'parent': '2.22', 'name': 'Niue', 'value': 1618 }, { 'id': '3.233', 'parent': '2.22', 'name': 'Tokelau', 'value': 1300 }]; // Splice in transparent for the center circle Highcharts.getOptions().colors.splice(0, 0, 'transparent'); Highcharts.chart('container', { chart: { height: '100%' }, title: { text: 'World population 2017' }, subtitle: { text: 'Source <href="https://en.wikipedia.org/wiki/List_of_countries_by_population_(United_Nations)">Wikipedia</a>' }, series: [{ type: "sunburst", data: data, allowDrillToNode: true, cursor: 'pointer', dataLabels: { format: '{point.name}', filter: { property: 'innerArcLength', operator: '>', value: 16 } }, levels: [{ level: 1, levelIsConstant: false, dataLabels: { filter: { property: 'outerArcLength', operator: '>', value: 64 } } }, { level: 2, colorByPoint: true }, { level: 3, colorVariation: { key: 'brightness', to: -0.5 } }, { level: 4, colorVariation: { key: 'brightness', to: 0.5 } }] }], tooltip: { headerFormat: "", pointFormat: 'The population of <b>{point.name}</b> is <b>{point.value}</b>' } }); <script src="https://code.highcharts.com/highcharts.js"></script> <script src="https://code.highcharts.com/modules/sunburst.js"></script> <script src="https://code.highcharts.com/modules/exporting.js"></script> <div id="container"></div> Offical highcharts example here: https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/demo/sunburst
Yes, each level inherits the previous level's settings unless overwritten. So by simply setting the initial level's color, and removing all mention of color for the following levels, all levels will be that color. You would then need to set the last level to what you prefer. The levels definition would then look like this: levels: [{ level: 1, levelIsConstant: false, color: 'red', dataLabels: { filter: { property: 'outerArcLength', operator: '>', value: 64 } } }, { level: 4, colorByPoint: true }] var data = [{ 'id': '0.0', 'parent': '', 'name': 'The World' }, { 'id': '1.3', 'parent': '0.0', 'name': 'Asia' }, { 'id': '1.1', 'parent': '0.0', 'name': 'Africa' }, { 'id': '1.2', 'parent': '0.0', 'name': 'America' }, { 'id': '1.4', 'parent': '0.0', 'name': 'Europe' }, { 'id': '1.5', 'parent': '0.0', 'name': 'Oceanic' }, /* Africa */ { 'id': '2.1', 'parent': '1.1', 'name': 'Eastern Africa' }, { 'id': '3.1', 'parent': '2.1', 'name': 'Ethiopia', 'value': 104957438 }, { 'id': '3.2', 'parent': '2.1', 'name': 'Tanzania', 'value': 57310019 }, { 'id': '3.3', 'parent': '2.1', 'name': 'Kenya', 'value': 49699862 }, { 'id': '3.4', 'parent': '2.1', 'name': 'Uganda', 'value': 42862958 }, { 'id': '3.5', 'parent': '2.1', 'name': 'Mozambique', 'value': 29668834 }, { 'id': '3.6', 'parent': '2.1', 'name': 'Madagascar', 'value': 25570895 }, { 'id': '3.7', 'parent': '2.1', 'name': 'Malawi', 'value': 18622104 }, { 'id': '3.8', 'parent': '2.1', 'name': 'Zambia', 'value': 17094130 }, { 'id': '3.9', 'parent': '2.1', 'name': 'Zimbabwe', 'value': 16529904 }, { 'id': '3.10', 'parent': '2.1', 'name': 'Somalia', 'value': 14742523 }, { 'id': '3.11', 'parent': '2.1', 'name': 'South Sudan', 'value': 12575714 }, { 'id': '3.12', 'parent': '2.1', 'name': 'Rwanda', 'value': 12208407 }, { 'id': '3.13', 'parent': '2.1', 'name': 'Burundi', 'value': 10864245 }, { 'id': '3.14', 'parent': '2.1', 'name': 'Eritrea', 'value': 5068831 }, { 'id': '3.15', 'parent': '2.1', 'name': 'Mauritius', 'value': 1265138 }, { 'id': '3.16', 'parent': '2.1', 'name': 'Djibouti', 'value': 956985 }, { 'id': '3.17', 'parent': '2.1', 'name': 'Réunion', 'value': 876562 }, { 'id': '3.18', 'parent': '2.1', 'name': 'Comoros', 'value': 813912 }, { 'id': '3.19', 'parent': '2.1', 'name': 'Mayotte', 'value': 253045 }, { 'id': '3.20', 'parent': '2.1', 'name': 'Seychelles', 'value': 94737 }, { 'id': '2.5', 'parent': '1.1', 'name': 'Western Africa' }, { 'id': '3.42', 'parent': '2.5', 'name': 'Nigeria', 'value': 190886311 }, { 'id': '3.43', 'parent': '2.5', 'name': 'Ghana', 'value': 28833629 }, { 'id': '3.44', 'parent': '2.5', 'name': 'Côte Ivoire', 'value': 24294750 }, { 'id': '3.45', 'parent': '2.5', 'name': 'Niger', 'value': 21477348 }, { 'id': '3.46', 'parent': '2.5', 'name': 'Burkina Faso', 'value': 19193382 }, { 'id': '3.47', 'parent': '2.5', 'name': 'Mali', 'value': 18541980 }, { 'id': '3.48', 'parent': '2.5', 'name': 'Senegal', 'value': 15850567 }, { 'id': '3.49', 'parent': '2.5', 'name': 'Guinea', 'value': 12717176 }, { 'id': '3.50', 'parent': '2.5', 'name': 'Benin', 'value': 11175692 }, { 'id': '3.51', 'parent': '2.5', 'name': 'Togo', 'value': 7797694 }, { 'id': '3.52', 'parent': '2.5', 'name': 'Sierra Leone', 'value': 7557212 }, { 'id': '3.53', 'parent': '2.5', 'name': 'Liberia', 'value': 4731906 }, { 'id': '3.54', 'parent': '2.5', 'name': 'Mauritania', 'value': 4420184 }, { 'id': '3.55', 'parent': '2.5', 'name': 'The Gambia', 'value': 2100568 }, { 'id': '3.56', 'parent': '2.5', 'name': 'Guinea-Bissau', 'value': 1861283 }, { 'id': '3.57', 'parent': '2.5', 'name': 'Cabo Verde', 'value': 546388 }, { 'id': '3.58', 'parent': '2.5', 'name': 'Saint Helena, Ascension and Tristan da Cunha', 'value': 4049 }, { 'id': '2.3', 'parent': '1.1', 'name': 'North Africa' }, { 'id': '3.30', 'parent': '2.3', 'name': 'Egypt', 'value': 97553151 }, { 'id': '3.31', 'parent': '2.3', 'name': 'Algeria', 'value': 41318142 }, { 'id': '3.32', 'parent': '2.3', 'name': 'Sudan', 'value': 40533330 }, { 'id': '3.33', 'parent': '2.3', 'name': 'Morocco', 'value': 35739580 }, { 'id': '3.34', 'parent': '2.3', 'name': 'Tunisia', 'value': 11532127 }, { 'id': '3.35', 'parent': '2.3', 'name': 'Libya', 'value': 6374616 }, { 'id': '3.36', 'parent': '2.3', 'name': 'Western Sahara', 'value': 552628 }, { 'id': '2.2', 'parent': '1.1', 'name': 'Central Africa' }, { 'id': '3.21', 'parent': '2.2', 'name': 'Democratic Republic of the Congo', 'value': 81339988 }, { 'id': '3.22', 'parent': '2.2', 'name': 'Angola', 'value': 29784193 }, { 'id': '3.23', 'parent': '2.2', 'name': 'Cameroon', 'value': 24053727 }, { 'id': '3.24', 'parent': '2.2', 'name': 'Chad', 'value': 14899994 }, { 'id': '3.25', 'parent': '2.2', 'name': 'Congo', 'value': 5260750 }, { 'id': '3.26', 'parent': '2.2', 'name': 'Central African Republic', 'value': 4659080 }, { 'id': '3.27', 'parent': '2.2', 'name': 'Gabon', 'value': 2025137 }, { 'id': '3.28', 'parent': '2.2', 'name': 'Equatorial Guinea', 'value': 1267689 }, { 'id': '3.29', 'parent': '2.2', 'name': 'Sao Tome and Principe', 'value': 204327 }, { 'id': '2.4', 'parent': '1.1', 'name': 'South America' }, { 'id': '3.37', 'parent': '2.4', 'name': 'South Africa', 'value': 56717156 }, { 'id': '3.38', 'parent': '2.4', 'name': 'Namibia', 'value': 2533794 }, { 'id': '3.39', 'parent': '2.4', 'name': 'Botswana', 'value': 2291661 }, { 'id': '3.40', 'parent': '2.4', 'name': 'Lesotho', 'value': 2233339 }, { 'id': '3.41', 'parent': '2.4', 'name': 'Swaziland', 'value': 1367254 }, /***********/ /* America */ { 'id': '2.9', 'parent': '1.2', 'name': 'South America' }, { 'id': '3.98', 'parent': '2.9', 'name': 'Brazil', 'value': 209288278 }, { 'id': '3.99', 'parent': '2.9', 'name': 'Colombia', 'value': 49065615 }, { 'id': '3.100', 'parent': '2.9', 'name': 'Argentina', 'value': 44271041 }, { 'id': '3.101', 'parent': '2.9', 'name': 'Peru', 'value': 32165485 }, { 'id': '3.102', 'parent': '2.9', 'name': 'Venezuela', 'value': 31977065 }, { 'id': '3.103', 'parent': '2.9', 'name': 'Chile', 'value': 18054726 }, { 'id': '3.104', 'parent': '2.9', 'name': 'Ecuador', 'value': 16624858 }, { 'id': '3.105', 'parent': '2.9', 'name': 'Bolivia', 'value': 11051600 }, { 'id': '3.106', 'parent': '2.9', 'name': 'Paraguay', 'value': 6811297 }, { 'id': '3.107', 'parent': '2.9', 'name': 'Uruguay', 'value': 3456750 }, { 'id': '3.108', 'parent': '2.9', 'name': 'Guyana', 'value': 777859 }, { 'id': '3.109', 'parent': '2.9', 'name': 'Suriname', 'value': 563402 }, { 'id': '3.110', 'parent': '2.9', 'name': 'French Guiana', 'value': 282731 }, { 'id': '3.111', 'parent': '2.9', 'name': 'Falkland Islands', 'value': 2910 }, { 'id': '2.8', 'parent': '1.2', 'name': 'Northern America' }, { 'id': '3.93', 'parent': '2.8', 'name': 'United States', 'value': 324459463 }, { 'id': '3.94', 'parent': '2.8', 'name': 'Canada', 'value': 36624199 }, { 'id': '3.95', 'parent': '2.8', 'name': 'Bermuda', 'value': 61349 }, { 'id': '3.96', 'parent': '2.8', 'name': 'Greenland', 'value': 56480 }, { 'id': '3.97', 'parent': '2.8', 'name': 'Saint Pierre and Miquelon', 'value': 6320 }, { 'id': '2.7', 'parent': '1.2', 'name': 'Central America' }, { 'id': '3.85', 'parent': '2.7', 'name': 'Mexico', 'value': 129163276 }, { 'id': '3.86', 'parent': '2.7', 'name': 'Guatemala', 'value': 16913503 }, { 'id': '3.87', 'parent': '2.7', 'name': 'Honduras', 'value': 9265067 }, { 'id': '3.88', 'parent': '2.7', 'name': 'El Salvador', 'value': 6377853 }, { 'id': '3.89', 'parent': '2.7', 'name': 'Nicaragua', 'value': 6217581 }, { 'id': '3.90', 'parent': '2.7', 'name': 'Costa Rica', 'value': 4905769 }, { 'id': '3.91', 'parent': '2.7', 'name': 'Panama', 'value': 4098587 }, { 'id': '3.92', 'parent': '2.7', 'name': 'Belize', 'value': 374681 }, { 'id': '2.6', 'parent': '1.2', 'name': 'Caribbean' }, { 'id': '3.59', 'parent': '2.6', 'name': 'Cuba', 'value': 11484636 }, { 'id': '3.60', 'parent': '2.6', 'name': 'Haiti', 'value': 10981229 }, { 'id': '3.61', 'parent': '2.6', 'name': 'Dominican Republic', 'value': 10766998 }, { 'id': '3.62', 'parent': '2.6', 'name': 'Puerto Rico', 'value': 3663131 }, { 'id': '3.63', 'parent': '2.6', 'name': 'Jamaica', 'value': 2890299 }, { 'id': '3.64', 'parent': '2.6', 'name': 'Trinidad and Tobago', 'value': 1369125 }, { 'id': '3.65', 'parent': '2.6', 'name': 'Guadeloupe', 'value': 449568 }, { 'id': '3.66', 'parent': '2.6', 'name': 'Bahamas', 'value': 395361 }, { 'id': '3.67', 'parent': '2.6', 'name': 'Martinique', 'value': 384896 }, { 'id': '3.68', 'parent': '2.6', 'name': 'Barbados', 'value': 285719 }, { 'id': '3.69', 'parent': '2.6', 'name': 'Saint Lucia', 'value': 178844 }, { 'id': '3.70', 'parent': '2.6', 'name': 'Curaçao', 'value': 160539 }, { 'id': '3.71', 'parent': '2.6', 'name': 'Saint Vincent and the Grenadines', 'value': 109897 }, { 'id': '3.72', 'parent': '2.6', 'name': 'Grenada', 'value': 107825 }, { 'id': '3.73', 'parent': '2.6', 'name': 'Aruba', 'value': 105264 }, { 'id': '3.74', 'parent': '2.6', 'name': 'United States Virgin Islands', 'value': 104901 }, { 'id': '3.75', 'parent': '2.6', 'name': 'Antigua and Barbuda', 'value': 102012 }, { 'id': '3.76', 'parent': '2.6', 'name': 'Dominica', 'value': 73925 }, { 'id': '3.77', 'parent': '2.6', 'name': 'Cayman Islands', 'value': 61559 }, { 'id': '3.78', 'parent': '2.6', 'name': 'Saint Kitts and Nevis', 'value': 55345 }, { 'id': '3.79', 'parent': '2.6', 'name': 'Sint Maarten', 'value': 40120 }, { 'id': '3.80', 'parent': '2.6', 'name': 'Turks and Caicos Islands', 'value': 35446 }, { 'id': '3.81', 'parent': '2.6', 'name': 'British Virgin Islands', 'value': 31196 }, { 'id': '3.82', 'parent': '2.6', 'name': 'Caribbean Netherlands', 'value': 25398 }, { 'id': '3.83', 'parent': '2.6', 'name': 'Anguilla', 'value': 14909 }, { 'id': '3.84', 'parent': '2.6', 'name': 'Montserrat', 'value': 5177 }, /***********/ /* Asia */ { 'id': '2.13', 'parent': '1.3', 'name': 'Southern Asia' }, { 'id': '3.136', 'parent': '2.13', 'name': 'India', 'value': 1339180127 }, { 'id': '3.137', 'parent': '2.13', 'name': 'Pakistan', 'value': 197015955 }, { 'id': '3.138', 'parent': '2.13', 'name': 'Bangladesh', 'value': 164669751 }, { 'id': '3.139', 'parent': '2.13', 'name': 'Iran', 'value': 81162788 }, { 'id': '3.140', 'parent': '2.13', 'name': 'Afghanistan', 'value': 35530081 }, { 'id': '3.141', 'parent': '2.13', 'name': 'Nepal', 'value': 29304998 }, { 'id': '3.142', 'parent': '2.13', 'name': 'Sri Lanka', 'value': 20876917 }, { 'id': '3.143', 'parent': '2.13', 'name': 'Bhutan', 'value': 807610 }, { 'id': '3.144', 'parent': '2.13', 'name': 'Maldives', 'value': 436330 }, { 'id': '2.11', 'parent': '1.3', 'name': 'Eastern Asia' }, { 'id': '3.117', 'parent': '2.11', 'name': 'China', 'value': 1409517397 }, { 'id': '3.118', 'parent': '2.11', 'name': 'Japan', 'value': 127484450 }, { 'id': '3.119', 'parent': '2.11', 'name': 'South Korea', 'value': 50982212 }, { 'id': '3.120', 'parent': '2.11', 'name': 'North Korea', 'value': 25490965 }, { 'id': '3.121', 'parent': '2.11', 'name': 'Taiwan', 'value': 23626456 }, { 'id': '3.122', 'parent': '2.11', 'name': 'Hong Kong', 'value': 7364883 }, { 'id': '3.123', 'parent': '2.11', 'name': 'Mongolia', 'value': 3075647 }, { 'id': '3.124', 'parent': '2.11', 'name': 'Macau', 'value': 622567 }, { 'id': '2.12', 'parent': '1.3', 'name': 'South-Eastern Asia' }, { 'id': '3.125', 'parent': '2.12', 'name': 'Indonesia', 'value': 263991379 }, { 'id': '3.126', 'parent': '2.12', 'name': 'Philippines', 'value': 104918090 }, { 'id': '3.127', 'parent': '2.12', 'name': 'Vietnam', 'value': 95540800 }, { 'id': '3.128', 'parent': '2.12', 'name': 'Thailand', 'value': 69037513 }, { 'id': '3.129', 'parent': '2.12', 'name': 'Myanmar', 'value': 53370609 }, { 'id': '3.130', 'parent': '2.12', 'name': 'Malaysia', 'value': 31624264 }, { 'id': '3.131', 'parent': '2.12', 'name': 'Cambodia', 'value': 16005373 }, { 'id': '3.132', 'parent': '2.12', 'name': 'Laos', 'value': 6858160 }, { 'id': '3.133', 'parent': '2.12', 'name': 'Singapore', 'value': 5708844 }, { 'id': '3.134', 'parent': '2.12', 'name': 'Timor-Leste', 'value': 1296311 }, { 'id': '3.135', 'parent': '2.12', 'name': 'Brunei', 'value': 428697 // 'color': '' }, { 'id': '2.14', 'parent': '1.3', 'name': 'Western Asia' }, { 'id': '3.145', 'parent': '2.14', 'name': 'Turkey', 'value': 80745020 }, { 'id': '3.146', 'parent': '2.14', 'name': 'Iraq', 'value': 38274618 }, { 'id': '3.147', 'parent': '2.14', 'name': 'Saudi Arabia', 'value': 32938213 }, { 'id': '3.148', 'parent': '2.14', 'name': 'Yemen', 'value': 28250420 }, { 'id': '3.149', 'parent': '2.14', 'name': 'Syria', 'value': 18269868 }, { 'id': '3.150', 'parent': '2.14', 'name': 'Azerbaijan', 'value': 9827589 }, { 'id': '3.115', 'parent': '2.10', 'name': 'Kyrgyzstan', 'value': 6045117 }, { 'id': '3.116', 'parent': '2.10', 'name': 'Turkmenistan', 'value': 5758075 }, /***********/ /* Europe */ { 'id': '2.15', 'parent': '1.4', 'name': 'Eastern Europe' }, { 'id': '3.162', 'parent': '2.15', 'name': 'Russia', 'value': 143989754 }, { 'id': '3.163', 'parent': '2.15', 'name': 'Ukraine', 'value': 44222947 }, { 'id': '3.164', 'parent': '2.15', 'name': 'Poland', 'value': 38170712 }, { 'id': '3.165', 'parent': '2.15', 'name': 'Romania', 'value': 19679306 }, { 'id': '3.166', 'parent': '2.15', 'name': 'Czechia', 'value': 10618303 }, { 'id': '3.167', 'parent': '2.15', 'name': 'Hungary', 'value': 9721559 }, { 'id': '3.168', 'parent': '2.15', 'name': 'Belarus', 'value': 9468338 }, { 'id': '3.169', 'parent': '2.15', 'name': 'Bulgaria', 'value': 7084571 }, { 'id': '3.170', 'parent': '2.15', 'name': 'Slovakia', 'value': 5447662 }, { 'id': '3.171', 'parent': '2.15', 'name': 'Moldova', 'value': 4051212 }, { 'id': '3.172', 'parent': '2.15', 'name': 'Cyprus', 'value': 1179551 }, { 'id': '2.16', 'parent': '1.4', 'name': 'Northern Europe' }, { 'id': '3.173', 'parent': '2.16', 'name': 'United Kingdom', 'value': 66181585 }, { 'id': '3.188', 'parent': '2.17', 'name': 'Greece', 'value': 11159773 }, { 'id': '3.189', 'parent': '2.17', 'name': 'Portugal', 'value': 10329506 }, { 'id': '3.190', 'parent': '2.17', 'name': 'Serbia', 'value': 8790574 }, { 'id': '3.191', 'parent': '2.17', 'name': 'Croatia', 'value': 4189353 }, { 'id': '3.192', 'parent': '2.17', 'name': 'Bosnia and Herzegovina', 'value': 3507017 }, { 'id': '3.193', 'parent': '2.17', 'name': 'Albania', 'value': 2930187 }, { 'id': '3.194', 'parent': '2.17', 'name': 'Republic of Macedonia', 'value': 2083160 }, { 'id': '3.195', 'parent': '2.17', 'name': 'Slovenia', 'value': 2079976 }, { 'id': '3.196', 'parent': '2.17', 'name': 'Montenegro', 'value': 628960 }, { 'id': '3.197', 'parent': '2.17', 'name': 'Malta', 'value': 430835 }, { 'id': '3.198', 'parent': '2.17', 'name': 'Andorra', 'value': 76965 }, { 'id': '3.199', 'parent': '2.17', 'name': 'Gibraltar', 'value': 34571 }, { 'id': '3.200', 'parent': '2.17', 'name': 'San Marino', 'value': 33400 }, { 'id': '3.201', 'parent': '2.17', 'name': 'Vatican City', 'value': 792 }, { 'id': '2.18', 'parent': '1.4', 'name': 'Western Europe' }, { 'id': '3.202', 'parent': '2.18', 'name': 'Germany', 'value': 82114224 }, { 'id': '3.203', 'parent': '2.18', 'name': 'France', 'value': 64979548 }, { 'id': '3.204', 'parent': '2.18', 'name': 'Netherlands', 'value': 17035938 }, { 'id': '3.205', 'parent': '2.18', 'name': 'Belgium', 'value': 11429336 }, { 'id': '3.206', 'parent': '2.18', 'name': 'Austria', 'value': 8735453 }, { 'id': '3.207', 'parent': '2.18', 'name': 'Switzerland', 'value': 8476005 }, { 'id': '3.215', 'parent': '2.20', 'name': 'Solomon Islands', 'value': 611343 }, { 'id': '3.216', 'parent': '2.20', 'name': 'New Caledonia', 'value': 276255 }, { 'id': '3.217', 'parent': '2.20', 'name': 'Vanuatu', 'value': 276244 }, { 'id': '2.21', 'parent': '1.5', 'name': 'Micronesia' }, { 'id': '3.218', 'parent': '2.21', 'name': 'Guam', 'value': 164229 }, { 'id': '3.219', 'parent': '2.21', 'name': 'Kiribati', 'value': 116398 }, { 'id': '3.220', 'parent': '2.21', 'name': 'Federated States of Micronesia', 'value': 105544 }, { 'id': '3.221', 'parent': '2.21', 'name': 'Northern Mariana Islands', 'value': 55144 }, { 'id': '3.222', 'parent': '2.21', 'name': 'Marshall Islands', 'value': 53127 }, { 'id': '3.223', 'parent': '2.21', 'name': 'Palau', 'value': 21729 }, { 'id': '3.224', 'parent': '2.21', 'name': 'Nauru', 'value': 11359 }, { 'id': '2.22', 'parent': '1.5', 'name': 'Polynesia' }, { 'id': '3.225', 'parent': '2.22', 'name': 'French Polynesia', 'value': 283007 }, { 'id': '3.226', 'parent': '2.22', 'name': 'Samoa', 'value': 196440 }, { 'id': '3.227', 'parent': '2.22', 'name': 'Tonga', 'value': 108020 }, { 'id': '3.228', 'parent': '2.22', 'name': 'American Samoa', 'value': 55641 }, { 'id': '3.229', 'parent': '2.22', 'name': 'Cook Islands', 'value': 17380 }, { 'id': '3.230', 'parent': '2.22', 'name': 'Wallis and Futuna', 'value': 11773 }, { 'id': '3.231', 'parent': '2.22', 'name': 'Tuvalu', 'value': 11192 }, { 'id': '3.232', 'parent': '2.22', 'name': 'Niue', 'value': 1618 }, { 'id': '3.233', 'parent': '2.22', 'name': 'Tokelau', 'value': 1300 } ]; // Splice in transparent for the center circle Highcharts.getOptions().colors.splice(0, 0, 'transparent'); Highcharts.chart('container', { chart: { height: '100%' }, title: { text: 'World population 2017' }, subtitle: { text: 'Source <href="https://en.wikipedia.org/wiki/List_of_countries_by_population_(United_Nations)">Wikipedia</a>' }, series: [{ type: "sunburst", data: data, allowDrillToNode: true, cursor: 'pointer', dataLabels: { format: '{point.name}', filter: { property: 'innerArcLength', operator: '>', value: 16 } }, levels: [{ level: 1, levelIsConstant: false, color: 'red', dataLabels: { filter: { property: 'outerArcLength', operator: '>', value: 64 } } }, { level: 4, colorByPoint: true }] }], tooltip: { headerFormat: "", pointFormat: 'The population of <b>{point.name}</b> is <b>{point.value}</b>' } }); <script src="https://code.highcharts.com/highcharts.js"></script> <script src="https://code.highcharts.com/modules/sunburst.js"></script> <script src="https://code.highcharts.com/modules/exporting.js"></script> <div id="container"></div> Working JSFiddle example: http://jsfiddle.net/ewolden/g2jmsqrz/4/