Map demo + Guide#2402
Conversation
|
All the demos for this PR have been deployed at https://huggingface.co/spaces/gradio-pr-deploys/pr-2402-all-demos |
freddyaboulton
left a comment
There was a problem hiding this comment.
Awesome demo @dawoodkhan82 ! 🗺️
I gave a sneak peek of this demo at the talk yesterday and people were into it.
I think there's a small bug in the tooltip text. Might be good to add this to the demos tab as well.
| @@ -0,0 +1,165 @@ | |||
| # How to Use the Plot Component for Maps | |||
There was a problem hiding this comment.
Should we upload this to the demos page under the tabular section? WDYT @dawoodkhan82 @aliabd ?
freddyaboulton
left a comment
There was a problem hiding this comment.
If we're worried about the size of the csv we can host on Hub datasets as well.
|
|
||
| Above, we create a scatter plot on mapbox by passing it our list of latitudes and longitudes to plot markers. We also pass in our custom data of names and prices for additional info to appear on every marker we hover over. Next we use `update_layout` to specify other map settings such as zoom, and centering. | ||
|
|
||
| More info [here](https://plotly.com/python/scattermapbox/) on scatter plots using Mapbox and Plotly. |
There was a problem hiding this comment.
It would be good to describe what other map types besides Scattermapbox are supported.
Agreed, the CSV is rather large. You could even just include the python code to download the CSV file from the Kaggle link using the |
|
Otherwise, the Guide reads great! Nice work @dawoodkhan82 |
Description
Created map demo with plotly, and an associated guide for it.
https://huggingface.co/spaces/dawood/NYC-Airbnb-Map
Please include:
Closes: #2338, #1993
Checklist:
A note about the CHANGELOG
Hello 👋 and thank you for contributing to Gradio!
All pull requests must update the change log located in CHANGELOG.md, unless the pull request is labeled with the "no-changelog-update" label.
Please add a brief summary of the change to the Upcoming Release > Full Changelog section of the CHANGELOG.md file and include
a link to the PR (formatted in markdown) and a link to your github profile (if you like). For example, "* Added a cool new feature by
[@myusername](link-to-your-github-profile)in[PR 11111](https://github.com/gradio-app/gradio/pull/11111)".If you would like to elaborate on your change further, feel free to include a longer explanation in the other sections.
If you would like an image/gif/video showcasing your feature, it may be best to edit the CHANGELOG file using the
GitHub web UI since that lets you upload files directly via drag-and-drop.