-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhousingVoucher.html
93 lines (80 loc) · 3.83 KB
/
housingVoucher.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Housing Choice Voucher Units By Census Tract in Richmond, CA</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<link rel="stylesheet" href="https://cartodb-libs.global.ssl.fastly.net/cartodb.js/v3/3.15/themes/css/cartodb.css" /> <!-- when using https -->
<link href='http://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>
<style>
body {
margin: 0;
padding: 0;
background: whitesmoke;
font-family: Lato, sans-serif;
color: #0D0000;
}
header {
padding: 6px 10%;
}
h1 {
/* display: inline-block; */
text-align: center;
margin-right: 20px;
color: #001323;
}
#map {
width: 80%;
height: 540px;
margin: 10px auto;
border: solid;
}
footer {
padding: 6px 10%;
width: 80%;
}
p {
font-size: 1em;
color: #001323;
}
</style>
</head>
<body>
<header>
<h1>Housing Choice Voucher Units By Census Tract in Richmond, CA</h1>
</header>
<div id='map'></div>
<footer>
<p>Map authored by Matthew Bacinskas</p>
<!-- <p>Additional information about the data and map goes here.</p> -->
<p>This map shows the percentage of renter occupied units in Richmond, California that are Housing Choice Voucher (HCV) units. HCV data was downloaded from the United States Department of Housing and Urban Development's <a href="http://egis.hud.gov/">eGIS</a> website. Median household income data was downloaded from the United States Census Bureau's <a href="http://factfinder.census.gov/faces/nav/jsf/pages/index.xhtml">American Fact Finder</a> website and gathered from the American Community Survey 2010-2014 5-year estimates. Median household income data, expressed in 2014 inflation adjusted dollars, were included to give a better idea about what kind of neighborhoods HCV units are in and can also serve as a possible guide as to how exclusionary a neighborhood may be. Polygons are clickable to reveal further information for each census tract.
</p>
</footer>
<!-- Adding CartoDB.js library when using https-->
<script src="https://cartodb-libs.global.ssl.fastly.net/cartodb.js/v3/3.15/cartodb.js"></script>
<!-- JS code to display map and do other map related things -->
<script>
window.onload = function() {
// Create map object from Leaflet
var mapObj = new L.map(map, {
center: [37.944571, -122.357464], // 13th and Gaynor Ave.
zoom: 12 // zoom projection to adjust starting point zoom
});
// Set the base map tile
L.tileLayer('http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png', {
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="http://cartodb.com/attributions">CARTO</a>'
}).addTo(mapObj);
// Housing Voucher Layer
var vizjson_url = 'https://bazini627.carto.com/api/v2/viz/a28f263a-328f-11e6-9aa6-0e787de82d45/viz.json';
// Adding Housing Voucher layer to map
cartodb.createLayer(mapObj, vizjson_url)
.addTo(mapObj)
.done(function(layer) {
console.log("Map successfully created.");
})
.error(function(err) {
console.log("Map not created: " + err);
});
}
</script>
</body>