Learning Python Data Visualization by Chad Adams
Author:Chad Adams [Adams, Chad]
Language: eng
Format: epub, pdf
Publisher: Packt Publishing
Published: 2014-08-25T00:00:00+00:00
Now, let's look at our new pyramid chart in the next screenshot. We can see quite a bit of data. Each horizontal line shows you the number of miles traveled per mission, and as more of the launch time progresses, we can see the miles taper off for some of the earlier forms of space travel with satellites and shuttles using more miles.
Open the pyramid_chart.svg file, and the result will be as shown in the following screenshot:
Worldmap charts
I don't think the worldmap charts need much introduction. It's a worldmap that is separated into countries, which outputs to an SVG file. The worldmap chart is a fantastic feature of the pygal library and is partially why I like this Python charting library. This is because not many Python charting libraries have maps as a feature, let alone ones that use the SVG output, making the map charts pygal produce very portable chart files, in our modern HTML5 mobile world we live in today.
A simple worldmap is easy to build with a little bit of dummy data using the pygal library. Let's build a simple worldmap with only United States and China highlighted as an example. Copy the following code into your editor of choice, run your Python script, and let's take a look at the results. Also, ensure that you save your output SVG file as world_map.svg.
# -*- coding: utf-8 -*- import pygal worldmap_chart = pygal.Worldmap() worldmap_chart.title = 'Highlighting China and the United States' worldmap_chart.add('China', ['cn']) worldmap_chart.add('United States', ['us']) #Render file. worldmap_chart.render_to_file('world_map.svg')
Download
Learning Python Data Visualization by Chad Adams.pdf
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Hello! Python by Anthony Briggs(9911)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(9795)
The Mikado Method by Ola Ellnestam Daniel Brolund(9775)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(8293)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(7775)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(7758)
Grails in Action by Glen Smith Peter Ledbrook(7693)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(7557)
Windows APT Warfare by Sheng-Hao Ma(6796)
Layered Design for Ruby on Rails Applications by Vladimir Dementyev(6521)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(6409)
Blueprints Visual Scripting for Unreal Engine 5 - Third Edition by Marcos Romero & Brenden Sewell(6389)
Kotlin in Action by Dmitry Jemerov(5062)
Hands-On Full-Stack Web Development with GraphQL and React by Sebastian Grebe(4315)
Functional Programming in JavaScript by Mantyla Dan(4037)
Solidity Programming Essentials by Ritesh Modi(3980)
WordPress Plugin Development Cookbook by Yannick Lefebvre(3769)
Unity 3D Game Development by Anthony Davis & Travis Baptiste & Russell Craig & Ryan Stunkel(3712)
The Ultimate iOS Interview Playbook by Avi Tsadok(3688)
