6

You could create an Object before layer.on('loaded'... with the legend keys you want to use for this dataset, for example: const LEGEND_KEYS = { LT: 'Least Threatened', VU: 'Vulnerable', CR: 'Critically Endangered', EN: 'Endangered' } And then, when updating the legend: colorLegendList += `<li><span ...


4

Yes, it is possible by using the reverse expression. Using the code from your example, it would be: color: ramp(globalQuantiles($sa_m3_km2, 10), reverse(temps)) You can find more about this expression in our documentation: https://carto.com/developers/carto-vl/reference/#cartoexpressionsreverse And an example from the reference using the JavaScript API: ...


4

Exactly! The 'loaded' event is only fired when the layer is loaded, but the 'updated' event is fired every time the layer is updated. You can take a look at this example: https://carto.com/developers/carto-vl/examples/#example-viewport-summary We recommend using the 'updated' event only if you need the widget information to change, but if it's going to ...


3

I think the problem here is that you're passing directly the attribute ($yield_ls) to the ramp expression, and the results are sorted by number of occurrences of each category. In order to classify the content you're receiving, you've to use the buckets as follows: color: ramp(buckets($yield_ls, [ "Fractured 0.0 - 0.1 l/s", "Fractured 0.1 - 0.5 l/s"...


3

Are you using the VL Bridge? If so, there is an undocumented method for the category widget's bridge: enableColorMapping. If the viz bridged to your as-category-widget has a color ramp, it will add the color to the categories automatically. Keep in mind that it's undocumented, so it might change in the future without notice. const bridge = new AsBridge....


3

You're probably making no mistake, Kristen. If you copy & paste exactly the last piece of code from that guide (with the whole html code), there is a relative link to style.css, which you have probably not noticed. The link in the code is: <link rel="stylesheet" type="text/css" href="../../style.css"> a file which you are probably missing ...


2

The data in the demos is probably specifically processed, but it is not difficult find these open datasets from 'the Internet'. For example, they are in Google BigQuery open datasets, and e.g. https://github.com/toddwschneider/nyc-taxi-data has many useful links.


2

Assumming the account in your local installatioin is named me, you can try to define your source like this, which I hope works for you: const source = new carto.source.Dataset( 'compact_regions', { user: 'me', apiKey: 'default_public' }, { serverURL: 'http://me.localhost.lan:8181' } ); If the dataset is not public you'll need to provide a ...


2

CARTO's Create Travel or Distance Buffers tutorial provides a guide which describes how to apply a buffer as follows: Import the template .carto file packaged from “Download resources” of this guide and create the map. Builder opens with TRI point data as the first map layer, and Census Tract polygons as the second map layer. From the TRI map layer,...


2

There is a non documented property for this. In the histogram is called noDataHeaderMessage https://github.com/CartoDB/airship/blob/master/packages/components/src/components/as-histogram-widget/as-histogram-widget.tsx#L156


2

To create different individual drive time buffers you can't use BUILDER, as it's not parametrized by a field. Instead, you need to use SQL directly to UPDATE your dataset with the geometries. So if your field for the commute time is commute_time then your query would look like the following queries. Mind that I'm putting the points as latitude/longitude to ...


2

You can change the properties of the widget right after the append call. For instance, you could change visibleCategories and it should work. If you need to read the properties back, you have to wait until the next tick. From a VL <--> Airship perspective, the widget will update on every update event on the layer it's bridged to. You could listen to that ...


2

The GeoJSON source method has an option to indicate the 'date' columns. Can you try with something like this? const dateColumns = ['date']; const options = { dateColumns }; const newSource = new carto.source.GeoJSON(JSON.parse(this.source), options); :wave


1

There're several issues here: Your GeoJSON doesn't include the feature geometry. It should have the geometry type and the coordinates: "geometry": { "type": "Point", "coordinates": [ 30, 10 ] } When using dates in a GeoJSON source, you've to declare which columns (properties) are "date". In this case, it's the 'TIME' property: const source = ...


1

Make sure you're changing not only the default config with setDefaultConfig, but also the default auth settings with setDefaultAuth correctly: carto.setDefaultAuth({ username: 'dev', apiKey: 'default_public' }); carto.setDefaultConfig({ serverURL: 'http://localhost/user/dev' }); This answer explains also that you may need to set the port in your ...


1

There's nothing that prevents you to add more layers to your Leaflet or Google Maps map aside from CARTO.js layers, same for Mapbox GL on CARTO VL. If you are referring to use CARTO.js methods then it only works against a CARTO Maps API server. In the case of VL you can also use GeoJSON or MVT as sources.


1

The solution is to change the trigger legend event from 'loaded' to 'updated': aquiferLayer.on('updated', () => {})


1

In CARTO, you can style points as buffers based on individual column values (such as average of commuting time) using both CartoCSS (used in Builder and CARTO.js) and CARTO VL. If you are using Builder or a CARTO.js application, you would need to apply first a query to convert your values. Why? Because we are going to pass to the CartoCSS marker-width ...


1

Unfortunately, the new version of Builder visualizations are not compatible with Odyssey.js. But as explained in this CARTO HELP article, you can use CARTO.js (and CARTO VL!) in combination with other storytelling libraries to create your own storymap.


1

With the new CARTO VL v1.1 we have just released, we added a new method to features called getRenderedCentroid. That allows creating a dynamic geojson layer, which then can be used to apply the common Mapbox GL labeling capabilities. We have prepared a few examples in our Dev Center, such as this one: https://carto.com/developers/carto-vl/examples/#example-...


Only top voted, non community-wiki answers of a minimum length are eligible