evidence-dev / labs Goto Github PK
View Code? Open in Web Editor NEWExperimental components and features for Evidence.
Home Page: https://labs.evidence.dev
Experimental components and features for Evidence.
Home Page: https://labs.evidence.dev
Currently AutoZoom (zoom to bounding) is enabled in the LeafletMap control. We have a use case for one particular view where we only want to render a single data point. In this case, the map zooms to the configured maxZoom (20), which is far to tight to be of any value. Either being able to control/configure the maxZoom (via property) or being able to disable the autoZoom function would allow simple workarounds to this problem.
Evidence is an amazing tool, especially with the new Universal SQL. In my opinion, it could use some more map visualisations. There is a svelte library for this that looks quite nice: https://github.com/dimfeld/svelte-maplibre
Here are some example maps: https://svelte-maplibre.vercel.app/examples/basic
Would it be possible to integrate these into Evidence Labs?
I don't know exactly how it can work, but for example if we'd like to visualise a geometry column in DuckDB:
COPY INTO something.geojson
: https://duckdb.org/docs/extensions/spatial.html#spatial-copy-functionsstates
in this line: https://github.com/dimfeld/svelte-maplibre/blob/master/src/routes/examples/geojson_polygon/%2Bpage.svelte#L10My background is more in Python/SQL, but I've used Svelte a little bit. Maybe I can help?
Hi, I'm not sure it should go here but I don't know under which category to file it. I've been going through your tutorial and playing with Evidence. I would like to add a small contribution in case it might be interesting to somebody. It's a working version of a simple slider that changes values in the markdown when the slider is used. It's connected to a hypothetical result of a query, so it would be fully operational for a database of file connection, not just hardcoded values. It can illustrate how a simple binding mechanism works between Evidence, Svelte in HTML
Two files are needed:
Slider.svelte
(put it in components
folder)
<script>
// export makes the variable a component property
export let value;
</script>
<input type='range' bind:value min=0 max=10 step=1 />
test-slider.md
<script>
import Slider from '$lib/Slider.svelte';
let score = 8;
</script>
## Using component **Slider**
- It's a slider component that lives in `./components`
- We import it here and bind its only attribute `value` to a variable `score` declared in `script` section
- Then we add some text that dynamically changes when we move the slider
- `value` comes from the imported `Slider.svelte`
- `score` is bound to this `value` variable
<Slider bind:value={score}/>
The score is: **{score}**
Hi @archiewood ,
I upgraded Evidence to the Universal SQL version 25.0.0
and I wanted to try out the Maps functions in the labs
plugin. However, I am getting an error I do not understand when trying out for instance the FranceMap
:
It seems to me that the config
value is undefined in the parameters that are being passed to the echartsCustomMap
. But I have no idea why:
I looked at the differences between the my dependencies (evidence 25.0.0
) and the labs
repo: 23.0.2
. But I could not find the issue.
Steps to replicate:
25.0.0
.labs
components as a plugin.FranceMap
or WorldMap
components (copy the required sql from labs to the new project) in a new page.Could you point me to the right direction?
Kind regards,
Lasse
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.