Displaying Hover Information on POINT Data in Pyviz/ hvplot - geopandas

https://hvplot.pyviz.org/user_guide/Geographic_Data.html
In the Geopandas section you can find two examples displaying Data, but only the second one, with 'Polygon' Geodata intead of 'Points', is presenting all of the extra Information from the geopandas file, while hovering over the Map.
I've tried to manipulate the Points to Polygons but hope there is a better solution.
geopandas hover Information only lat,lon
geopandas hover Information complete Dataframe

Related

Cesium labels on a polyline (similiar to a textpath)?

I would like to recreate bent country labels according to the area of the country.
In d3 (or SVG) I can construct a polyline and then use a textpath to have text along it. Example: https://www.w3.org/TR/SVG2/images/text/text-path-startoffset.svg
Is it possible in Cesium to do something similar?
In Leaflet it is implemented like that: http://makinacorpus.github.io/Leaflet.TextPath/
There's no native support for that in the current version of Cesium. It may be mentioned on a wishlist or on a roadmap somewhere, but there are no short-term plans that I know of to add it to Cesium.
Even so, you may be able to find a workaround. For example, SVGs can be used as texturemap image sources in Cesium, so you could possibly use D3 to produce curved text on-the-fly and load the results into a Cesium billboard image or even a Cesium Globe inlay image. It would probably take some experimenting to figure out how to actually wire this up and how well it would work.

Wrong pivot point for certain fbx models imported into THREEJS

I am working on a project which requires taking fbx models and viewing them in a THREEJS viewer. Most of the time these models come in with the correct pivot points but other times they do not. I am having a hard time figuring out what is causing this issue.
I am using this script to do the conversion from fbx to json:
https://github.com/mrdoob/three.js/blob/master/utils/converters/fbx/convert_to_threejs.py
You can find an example of an fbx file that has the wrong pivot point here:
http://s000.tinyupload.com/index.php?file_id=42525924957536854290
This model contains only one mesh and was exported from Maya with FBX Plugin version 2014.0.1. The pivot should be near the center of the model but it located at the bottom of the model when loaded in threejs. It appears to be placing the pivot at (0,0,0).
I ran a test on this model using the online model viewer at https://clara.io/. When I import the model using the fbx everything looks normal as can be seen here:
Next, I then export this model as THREEJS Scene json by using File -> Export All -> Threejs Scene. When I import the json I just exported via clara.io back into clara.io the pivot is wrong. This is the model after reimporting it as json into clara.io
Any suggestions on how to get the pivot points to always match up between Maya and Threejs would be greatly appreciated.
The issue is that ThreeJS doesn't support Pivots that are different than Transform origin of a model. This is actually somewhat standard for Game Engines.
What I would suggest is to first "Reset Pivots" in Clara.io on this object, and then go into Vertex mode in Clara.io on this object and select all vertices. Move the vertices so that they are relative to the Reset Pivot. This is letting you set any pivot you want because you are moving the vertices relative to the origin of this model. Then when you export, you will have your new pivot.
We can look at adding support for baking pivots. But it is a little complex because there are multiple distinct pivots -- one for scale and a separate one for rotation, so I guess we have to give you the option of which you want to bake into the object.
Best regards,
Ben Houston, ben#clara.io

D3.js Force Layout: Possible to Have "Resting State" be a Specific Shape?

I'm working on a dashboard (in Ruby) with rotating views where each set of data includes a D3 visualization.
For the final visualization, I want to pull the circles into a heart shape. I can use a force layout to pull them into a circle (similar to the Obama Budget example), but I haven't had success modifying that into other shapes.
I've read through all the d3 force layout Q&As on Stack Overflow as well as going through related D3 tutorials online.
Does anyone have suggestions for how to do this with D3 (or another tool/library)?
Potential options I'm currently researching:
1) Custom svg "canvass" shape
2) Append to heart-shaped div (found one made with :before/:after pseudo selectors but it currently will only display nodes in the before section)

how to place interactive button control with d3 charting library?

I'm on a project which has a requirement to make data visualization. But more than just data visualization, there're some tricky interactive requirements.
Imagine a scatter plot, instead of little circles, clickable rectangles(like button) are placed on the chart. When user clicks on those buttons, the rectangles turns into some input fields, user can type make some inputs.
How to draw these buttons and input fields with d3.js?
After doing some research, the root of the problem is : how to put html in svg? Then there's plenty of questions and answers out there. Basically the solution is to use svg element: foreighObject. refer to this SO question:
Insert HTML code inside SVG Text element

d3 choropleth creates a very small map

I am trying to create a choropleth using d3 for New Jersey state. I have geojson file created as nj.json. You can see it here:
http://mntest.elasticbeanstalk.com/nj.json
When I try to use it to display on web page, it shows a very small New Jersey map, so small it is easy to miss. See it here:
http://mntest.elasticbeanstalk.com/choropleth_test.html
It shows as a small dot a couple of inches below the text.
Can somebody take a look at the source code and guide me how to increase the map size.
Thanks,
D3 newbie
To change the size of the displayed map, set the scale factor of your projection. You might also want to reset the center of the projection to center what you want to show.
This question might be helpful as well.

Resources