Skip to content

Instantly share code, notes, and snippets.

@ramiroaznar
Created August 14, 2017 12:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ramiroaznar/67ffca98607307160550acc267f3b239 to your computer and use it in GitHub Desktop.
Save ramiroaznar/67ffca98607307160550acc267f3b239 to your computer and use it in GitHub Desktop.
How to create a proportional symbol map with sqrt
select
*,
sqrt(pop_max)*50/5972.93897507751 as sqrt_pop
from
populated_places
where
pop_max > 0
order by pop_max desc
#layer {
marker-fill: ramp([sqrt_pop], cartocolor(Sunset), jenks);
marker-width: [sqrt_pop];
marker-allow-overlap: true;
marker-opacity: 0.7;
marker-line-width: 0;
marker-comp-op: multiply;
}
@ramiroaznar
Copy link
Author

viewer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment