Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Choropleth map visualization #2317

Closed
arikfr opened this issue Feb 14, 2018 · 13 comments
Closed

Choropleth map visualization #2317

arikfr opened this issue Feb 14, 2018 · 13 comments

Comments

@arikfr
Copy link
Member

arikfr commented Feb 14, 2018

image

Possible libraries:

@arikfr arikfr added this to the Next milestone Feb 14, 2018
@kravets-levko kravets-levko changed the title Chrolopath map visualization Choropleth map visualization Feb 14, 2018
@deecay
Copy link
Contributor

deecay commented Feb 14, 2018

@SylvainMassol
Copy link

Yes leafletjs is a good library, support many formats like GeoJson, and it's already use in Redash.

@deecay
Copy link
Contributor

deecay commented Mar 5, 2018

I'm fiddling around with leaflet-choropleth module, and found out visualization shown below can be done quite easily.
image

However, I do not have real-life use cases, so I'm not sure what to do from here.

  1. Visualize one property from "properties" within geoJSON column in query result. (geoJSON for above example).
  2. Query result column "value" has value to visualize and column geoJSON has the polygons.
  3. Query result is just a table of columns "id" and "value", and this table should be merged with some other source of geoJSON.

@arikfr
Copy link
Member Author

arikfr commented Mar 5, 2018

The first use case we want to accomodate is to be able to visualize a dataset the looks like:

Country Users Count
JP 3201
US 2912
UK 215

I.e. take value per country and visualize it on a map.

Later we can expand this to be more granular (zoom in on specific continent, cities, etc).

This is why I feel like Leaflet might not be the try solution as it starts with too much details.

@arikfr
Copy link
Member Author

arikfr commented Mar 5, 2018

But it has different base maps we can use so maybe one of them is what we need?

@deecay
Copy link
Contributor

deecay commented Mar 5, 2018

Yes. There are different base maps.

The example polygons on the example page just happened to be district-size. Leaflet/geoJSON can have country level polygons too. There are several versions of country level polygons available, so I will try to find suitable one and come back with visual example.

@arikfr
Copy link
Member Author

arikfr commented Mar 5, 2018

Any "catalog" of those base maps?

@kravets-levko kravets-levko self-assigned this Mar 5, 2018
@kravets-levko
Copy link
Collaborator

@deecay FYI - I'm already on this issue, and will create PR tomorrow (I see you're also experimenting with it, so I decided to tell you)

@deecay
Copy link
Contributor

deecay commented Mar 5, 2018

Oh, that's nice. Can't wait to see it!

@deecay
Copy link
Contributor

deecay commented Mar 26, 2018

Please allow me to ask one question here. Now that this is merged, how do we go about adding geojson files?

Due to highly individual needs and large file size, I think there should be some kind of way for admin to add their own geojson, and not to include all the country or city geojson in the bundle.

@arikfr
Copy link
Member Author

arikfr commented Mar 26, 2018

The geojson files are not in the bundle -- they are loaded separately. It probably shouldn't be too complex to add a way to load custom files from a URL.

@RichardLitt
Copy link

@deecay if it is too complex, let us know! That probably just means we should document it better somewhere.

@sergikpas
Copy link

@arikfr when you plan release this feature? Any plans for next RC or Release?

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

No branches or pull requests

6 participants