This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="http://d3js.org/d3.v3.js"></script> | |
<script type="text/javascript"> | |
(function(){ | |
// Probably not idiomatic javascript. | |
this.countValue=0; | |
updateView = function(message) { | |
var svg = d3.select(".d3io").select("svg") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
State | Crime | Count | |
---|---|---|---|
Alabama | Murder | 13.2 | |
Alaska | Murder | 10 | |
Arizona | Murder | 8.1 | |
Arkansas | Murder | 8.8 | |
California | Murder | 9 | |
Colorado | Murder | 7.9 | |
Connecticut | Murder | 3.3 | |
Delaware | Murder | 5.9 | |
Florida | Murder | 15.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Alabama | Murder | 13.2 | |
---|---|---|---|
Alaska | Murder | 10 | |
Arizona | Murder | 8.1 | |
Arkansas | Murder | 8.8 | |
California | Murder | 9 | |
Colorado | Murder | 7.9 | |
Connecticut | Murder | 3.3 | |
Delaware | Murder | 5.9 | |
Florida | Murder | 15.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Alabama | Murder | 13.2 | |
---|---|---|---|
Alaska | Murder | 10 | |
Arizona | Murder | 8.1 | |
Arkansas | Murder | 8.8 | |
California | Murder | 9 | |
Colorado | Murder | 7.9 | |
Connecticut | Murder | 3.3 | |
Delaware | Murder | 5.9 | |
Florida | Murder | 15.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Alabama | Murder | 13.2 | |
---|---|---|---|
Alaska | Murder | 10 | |
Arizona | Murder | 8.1 | |
Arkansas | Murder | 8.8 | |
California | Murder | 9 | |
Colorado | Murder | 7.9 | |
Connecticut | Murder | 3.3 | |
Delaware | Murder | 5.9 | |
Florida | Murder | 15.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license:gpl-2.0; | |
height:800px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import PlaygroundSupport | |
import SwiftUI | |
extension UIView { | |
var renderedImage: UIImage { | |
let image = UIGraphicsImageRenderer(size: self.bounds.size).image { context in | |
UIColor.lightGray.set(); UIRectFill(bounds) | |
context.cgContext.setAlpha(0.75) | |
self.layer.render(in: context.cgContext) | |
} | |
return image |