When I visualize a fusion table as map type, boundaries for U.S counties appear to be small red dots at zoom level 1-5, and becomes polygons since zoom level 6. Is there a way that I could get rid of red dots but showing actually polygons no matter what zoom level user chooses?
Thanks!
fusion table which I'm using is here
That is a limitation of FusionTables. I made this example that uses KmlLayer for the zoom levels that don't show polygons, but it seems kind of silly.
Related
I am creating a map of Brazil with its state boundaries, which is straight forward to achieve using ggplot2 and geom_sf.
However, this time around, instead of color filling each state with data, I want to fill each state's boundaries with an external image (png), similar to this example of the largest employer in each state.
I have tried a few settings of geom_image and even geom_flag to no avail (hence why I am not posting any code here).
Are there any suggestions on how to approach this problem?
You can try cartography::getPngLayer/pngLayer. These two functions takes a png as input, geotag and crop it to the shape of a given polygon and creates a rasterbrick object (as a tile) that you can manipulate and plot:
https://dieghernan.github.io/cartographyvignette#png-layer
Is there are way to make the marker clusters change color based on the color of the circle markers that are clustered?
I made a map looking at homicides in my city: https://jwier85.github.io/murdermap/murdermapFINAL.html
I used green markers for solved homicides and red markers for unsolved homicides. The marker clusters, however, show as green whenever there are fewer than ten things clustered.
I know you can change based on the count, but is there a way I could make clusters of unsolved homicides red? Also, if I can do it in R that would be preferred.
I want to zoom in a particular region of the sky, and plot a map of only that region (e.g., the cold spot). How can I do this with healpix? I could not find options with mollview...etc.
try using gnomview: you can choose the center coordinates (with rot) that you want to plot and a size in x and y (xsize and ysize). This will render a gnomonic projection of the part of the sky you are interested in.
I am trying to render some geographic data onto the map in Tableau. However, some data points located at the same point, so the shape images of the data points overlaps together. By clicking on a shape, you could only get the top one.
How can we distinguish the overlapped data points in Tableau? I know that we can manually exclude the top data to see another, but is there any other way, for example, make a drop down list in the right click menu to select the overlapped data points?
Thank you!
There are a couple of ways to deal with this issue.
Some choices you can try are:
Add some transparency to the marks by editing the color shelf properties. That way at least you get a visual indication when there are multiple marks stacked on top of each other. This approach can be considered a poor man's heat map if you have many points in different areas as the denser/darker sections will have more marks. (But that just affects the appearance and doesn't help you select and view details for marks that are covered by others)
Add some small pseudo-random jitter to each coordinate using calculated fields. This will be easier when Tableau supports a rand() function, but in the meantime you can get creative enough using other fields and the math function to add a little jitter. The goal here is to slightly shift locations enough that they don't stack exactly, but not enough to matter in precision. Depends on the scale.
Make a grid style heat map where the color indicates the number of data points in each grid. To do this, you'll need to create calculated fields to bin together nearby latitudes or longitudes. Say to round each latitude to a certain number of decimal places, or use the hex bin functions in Tableau. Those calculated fields will need to have a geographic role and be treated as continuous dimensions.
Define your visualization to display one mark for each unique location, and then use color or size to indicate the number of data points at that location, as opposed to a mark for each individual data point
I want analyse the climate data in several cities and for each city a chart is produced using ggplot2. And as underlayer I made a map and want to locate the chart for each city in the map with the right position. I think it is not possible to plot them directly with ggplot2, unless I define a new geom. A better way may be using the Grid package and place the viewports in the right way somehow, that means the viewport center should be set to the precise place with longitude and latitude. Is it possible to use the coordination of another viewport(here the map plot)?