Skip to content

Carto Notes

Yoh Kawano edited this page Mar 23, 2017 · 9 revisions

Public/private settings

  • Each layer has a dataset and an equivalent map on Carto
  • Dataset must be set on PRIVATE
  • Map must be set on LINK

Map notes

No changes will take effect unless the map is REPUBLISHED:

  • Click on "LINK" under the title
  • Click on "UPDATE"
  • Do this every time you make a change

Popup

  • Click: set to NONE
    ** IMPORTANT NOTE: Due to a carto bug, the first time the map is created, click must be turned on with all variables checked on. Check that the layer shows up on the website, and then come back and turn it off
  • Hover: Due to a carto bug, hover must be turned on initially. All variables need to be checked on. Once the layer shows up on the site, come back and switch to HTML mode. Get rid of everything inside the two outer divs:
<div class="CDB-Tooltip CDB-Tooltip--isLight">
	<ul class="CDB-Tooltip-list">
	</ul>
</div>

Style

The style defines the choropleth settings for the map. Switch to CartoCSS mode and enter the following:

#layer{
	polygon-fill: #F7F7F7;
	polygon-opacity: 0.8;
	line-color: #000000;
	line-width: 0.5;
	line-opacity: 0.5;
}
#layer [ _cost <= 10000000000] {
	polygon-fill: #e31a1c;
}
#layer [ _cost <= 200000000] {
	polygon-fill: #636363;
}
#layer [ _cost <= 100000000] {
	polygon-fill: #969696;
}
#layer [ _cost <= 50000000] {
	polygon-fill: #CCCCCC;
}
#layer [ _cost <= 10000000] {
	polygon-fill: #F7F7F7;
}

There are 5 "buckets" with the top bucket being bright red. These are the "million dollar" regions. Depending on the layer being displayed, the breakdowns will differ. Make sure to set the divisions adequately for each layer (discuss this with team for consensus).

Clone this wiki locally