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

Map Chart #118

Closed
reza1615 opened this issue Mar 26, 2020 · 13 comments
Closed

Map Chart #118

reza1615 opened this issue Mar 26, 2020 · 13 comments

Comments

@reza1615
Copy link

reza1615 commented Mar 26, 2020

There is huge potential on the map chart. It can be based on some free online maps or GeoJSON files. Plotly has an interesting map plot.
i.e. https://plotly.com/python/scatter-plots-on-maps/

@aschonfeld
Copy link
Collaborator

I added "Maps" chart type as an option, but the data you supplied on houses seems to only have data for the northwest corner of washington so it produces kind of a dull map. :(

Need some more global data or at least data from around the entire US

@reza1615
Copy link
Author

reza1615 commented Mar 29, 2020

In the map chart window please link to GeoJson URL to download. and based on the downloaded file path it can generate the map.
https://plotly.com/python/mapbox-county-choropleth/

@reza1615
Copy link
Author

I updated Lat and Long in the CSV file to have whole USA cities also added deltatime dtype. please use this zip file.
kc_house_data_2.zip

@aschonfeld
Copy link
Collaborator

Looks like there still might be an issue with your lat/long values. This shows that they extend all the way to the north pole!

image

Sorry the kids had me watching Polar Express today :)

@reza1615
Copy link
Author

I had only 52 airports in all states so for the rest I added some random change to the lat and long.
try to filter them and only get 100-200 cases

@reza1615
Copy link
Author

I updated the file. Now I added USA cities and states. you can test your code by state column.
also, I included 320K cities in USA in another file.
03.zip

aschonfeld pushed a commit that referenced this issue Mar 30, 2020
* #121, added "not equal" toggle to filters
* #132, updated resize button to "Refresh Widths"
* added "Animate" toggle to scatter, line & bar charts
aschonfeld pushed a commit that referenced this issue Mar 30, 2020
* #121, added "not equal" toggle to filters
* #132, updated resize button to "Refresh Widths"
* added "Animate" toggle to scatter, line & bar charts
@reza1615
Copy link
Author

reza1615 commented Apr 1, 2020

@aschonfeld : Just as FYI. For Lat and Long I found this link http://download.geonames.org/export/dump/
It hosted all countries lat and long.

aschonfeld pushed a commit that referenced this issue Apr 2, 2020
* #129, show dtype when hovering over header in "Highlight Dtypes" mode and description tooltips added to main menu
* made "No Aggregation" the default aggregation in charts
* bugfix for line charts with more than 15000 points
* updated "Value Counts" & "Category Breakdown" to return top on initial load
* #118, added scattergeo & choropleth maps
* #121, added "not equal" toggle to filters
* #132, updated resize button to "Refresh Widths"
* added "Animate" toggle to scatter, line & bar charts
* #131, changes to "Reshape Data" window
* #130, updates to pivot reshaper
* #128, additional hover display of code snippets for column creation
* #112, updated "Group" selection to give users the ability to select group values
aschonfeld pushed a commit that referenced this issue Apr 2, 2020
* #129, show dtype when hovering over header in "Highlight Dtypes" mode and description tooltips added to main menu
* made "No Aggregation" the default aggregation in charts
* bugfix for line charts with more than 15000 points
* updated "Value Counts" & "Category Breakdown" to return top on initial load
* #118, added scattergeo & choropleth maps
* #121, added "not equal" toggle to filters
* #132, updated resize button to "Refresh Widths"
* added "Animate" toggle to scatter, line & bar charts
* #131, changes to "Reshape Data" window
* #130, updates to pivot reshaper
* #128, additional hover display of code snippets for column creation
* #112, updated "Group" selection to give users the ability to select group values
@aschonfeld aschonfeld mentioned this issue Apr 2, 2020
aschonfeld pushed a commit that referenced this issue Apr 2, 2020
* #129, show dtype when hovering over header in "Highlight Dtypes" mode and description tooltips added to main menu
* made "No Aggregation" the default aggregation in charts
* bugfix for line charts with more than 15000 points
* updated "Value Counts" & "Category Breakdown" to return top on initial load
* #118, added scattergeo & choropleth maps
* #121, added "not equal" toggle to filters
* #132, updated resize button to "Refresh Widths"
* added "Animate" toggle to scatter, line & bar charts
* #131, changes to "Reshape Data" window
* #130, updates to pivot reshaper
* #128, additional hover display of code snippets for column creation
* #112, updated "Group" selection to give users the ability to select group values
@reza1615
Copy link
Author

reza1615 commented Apr 2, 2020

For map chart would you please use mapbox. It has more details and different maps.
https://plotly.com/python/scattermapbox/

based on below link if you set layout.mapbox.style properly it doesn't need token like
https://plotly.com/python/mapbox-layers/

image

@aschonfeld
Copy link
Collaborator

I can add scattermapbox to the "Map Type" drop-down. Nice find. Not sure how performant it will be but I'll def include it.

Just a heads up, anything that requires loading from the internet might be a while because this tool was supposed to be something that didn't require outside network connections. That being said I think if I present the user with a clear enough exception when they don't have a connection to the outside world it should be fine.

@reza1615
Copy link
Author

reza1615 commented Apr 2, 2020

For offline support we should have access to GEOJSON to upload customized map. now offline map only have world (without country, state borders) + USA

@aschonfeld
Copy link
Collaborator

@reza1615 I've added the following static files to the app so that offline map generation is now possible (with some major hacking to plotly's JS as well 😉 )

  • Scope -> world, Location Type -> ISO-3, country names: world_110m.json
  • Scope -> usa, Location Type -> USA-states: usa_110m.json 67ms
  • Scope -> europe: europe_110m.json
  • Scope -> asia -> asia_110m.json
  • Scope -> africa -> africa_110m.json
  • Scope -> north america -> north-america_110m.json
  • Scope -> south america -> south-america_110m.json

I'll create a separate ticket for allowing users to load their own custom topojson files..

@reza1615
Copy link
Author

reza1615 commented Apr 4, 2020

Asia and world json have bug see them in github. last night I reported to plotly.js

@aschonfeld
Copy link
Collaborator

added v1.8.3

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

No branches or pull requests

2 participants