Skip to content

Commit

Permalink
variable def window setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mjrouser committed Apr 14, 2015
1 parent 6ef57c6 commit 925a33d
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 7 deletions.
3 changes: 3 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ <h2>2010</h2>
</li>
</ul>
</div>
<div class="iwindow-title">
<h4>Data variable definition:</h4>
</div>
<div class="iwindow">

</div>
Expand Down
35 changes: 29 additions & 6 deletions src/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ define([
'script',
'underscore'
], function( Backbone, S, _){

var template = '<p> <%= blurb %> </p>'

var self = this;
var TEMPLATE = '<p> <%= this.blurb %> </p>';

//define router class
var MapRouter = Backbone.Router.extend ({
Expand Down Expand Up @@ -38,95 +39,114 @@ define([

showPcthchild: function(){
S.setPropertyBrewer('pcthhchild', 'PuRd');

$('div.iwindow').html('<p>Percentage of households per census tract with children residing in them.</P>');
},

showPct_finance: function(){

S.setPropertyBrewer('pctind_finance', 'PuRd');
$('div.iwindow').html('<p>Percentage of people per census tract employed in jobs qualified by the ACS as "finance."</P>');
},

showPct_professional: function(){

S.setPropertyBrewer('pctind_professional', 'PuRd');
$('div.iwindow').html('<p>Percentage of people per census tract employed in jobs qualified by the ACS as "professional."</P>');
},

showPctocc_profmanage: function(){

S.setPropertyBrewer('pctocc_profmanage', 'PuRd');
$('div.iwindow').html('<p></P>');
},

showPctcollege: function(){

S.setPropertyBrewer('pctcollege', 'PuRd');
$('div.iwindow').html('<p>Percentage of people per census tract that posses a college degree.</P>');
},

showPctinc_0_25k: function(){

S.setPropertyBrewer('pctinc_0k_25k', 'GnBu');
$('div.iwindow').html('<p>Go get ya f*cken shinebox!</P>');

},

showPctinc_25k_50k: function(){
S.setPropertyBrewer('pctinc_25k_50k', 'GnBu');
$('div.iwindow').html('<p>Am I funny to you?</P>');

},

showPctinc_50k_100k: function(){
S.setPropertyBrewer('pctinc_50k_100k', 'GnBu');
$('div.iwindow').html('<p></P>');

},

showPctinc_100k_more: function(){
S.setPropertyBrewer('pctinc_100k_more', 'GnBu');
$('div.iwindow').html('<p>Percentage of people per census tract that have an income of $100,000 or more.</P>');

},

showMedhhincome: function(){
S.setPropertyBrewer('medianhhincome', 'GnBu');
$('div.iwindow').html('<p>Median income of all households per census tract</P>');
},

showPctpoverty: function(){

S.setPropertyBrewer('pctpoverty', 'GnBu');
$('div.iwindow').html('<p>Percentage of people per census tract living under the federal poverty line.</P>');
},

showPctpublicassist: function(){
S.setPropertyBrewer('pctpublicassist', 'GnBu');
$('div.iwindow').html('<p>Calmer than you dude...</P>');
},

showUnits: function(){
S.setPropertyBrewer('units', 'OrRd');
$('div.iwindow').html('<p>Number of housing units per census tract.</P>');
},

showPctown: function(){
S.setPropertyBrewer('pctown', 'OrRd');
$('div.iwindow').html('<p>Percentage of housing units per census tract that are owner-occupied.</P>');
},

showPctrent: function(){
S.setPropertyBrewer('pctrent', 'OrRd');
$('div.iwindow').html('<p>Percentage of housing units per census tract that are renter-occupied.</P>');
},

showPctvacant: function(){
S.setPropertyBrewer('pctvacant', 'OrRd');
$('div.iwindow').html('<p>Percentage of housing units per census tract that are vacant.</P>');
},

showMedianvalue: function() {
S.setPropertyBrewer('medianvalue', 'OrRd');
$('div.iwindow').html('<p>Median value of housing units over a given census tract.</P>');

},

showMedianrent: function(){

S.setPropertyBrewer('medianrent', 'OrRd');
$('div.iwindow').html('<p>Median rent paid by residents of a given census tract.</P>');
},

showMedianpctincomerent : function(){
S.setPropertyBrewer('medianpctincomerent', 'GnBu');
$('div.iwindow').html("<p>Median percentage of residents' income that is paid for rent.</P>");
},

showPctsameres: function(){
S.setPropertyBrewer('pctsameres', 'OrRd');
$('div.iwindow').html('<p></P>');
}

});
Expand All @@ -141,12 +161,15 @@ define([
// to build first needed objects in maps : if the router is
// called as soon as initialized, it may call not present
// parameters.
setTimeout( function(){
setTimeout( function(){

var router = new MapRouter();
var router = new MapRouter();
Backbone.history.start();

} , 2000 ); // not really clean but easy
} , 2000 ); // not really clean but easy

//$('div.iwindow').html(_.template(TEMPLATE));


}

Expand Down
7 changes: 6 additions & 1 deletion src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,12 @@ div.map > h2 {
}

.iwindow {
height: 50px;
height: 150px;
text-align: center;
padding: 20px 10px;
}
.iwindow>p{
font-size: 1.33em;
}

.lwrapper{
Expand Down

0 comments on commit 925a33d

Please sign in to comment.