How to Create Datavisual Shapes for R Package - r

How do I create datavisual shapes for R package.
Just like there are heatmaps, bar charts, pie charts, etc.
For instance, I wish to create a car as a datavisual shape in R. Perhaps use it as a map. And give users the options to label the components
What do I search in google to create such a thing?
For instance I would like R (I'm used to R) to generate a user-input program where
product-to-repair-tires will point to tires
tire-pressure will point to each of the 4 tires
number-of-oil-changes will point to oil tank
type-of-fuel (variables gasoline,diesel,liquified petroleum,etc) will point to fuel tank.
I want this custom visual to
Have words and/or icons pointing to it
Be treated as a map. For instance, tires passed inspection by 80%, brake pads passed by 20% (hence need a replacement), windshield wipers are 100% perfect, bumper is can widthstand impact 30% (need replacement)
Can be used to demonstrate car health over time. We can include this in a report like Carfax that show when the Car was manufactured to possible accidents, defects as it passed owners.
In other words, custom visual should tell the life and health of a car in few words.

Related

GEE obtain bands from image collection

I'm currently working on my bachelor's thesis and I am trying to work with Sentinel 5 - P's aerosol data.
I am trying to obtain Aerosol Layer Height (L3__AER_LH) data but I do not know the bands, which I need to 'select'.
The README file on L3__AER_LH reads as follows:
The data file contains the aerosol_mid_pressure and aerosol_mid_height which provide the
air pressure at the center of the aerosol layer and the height at the center of the aerosol layer relative
to the geoid, respectively.
But when I try running: .select('absorbing_aerosol_index'); I get no results.
Therefore, I have tried using print(collection.bandNames); but I recieve an 'undefined'.
Could someone help me obtain L3__AER_LH data from GEE?
Thank you for your time.
Therefore, I have tried using print(collection.bandNames); but I recieve an 'undefined'.
The best way to find out about bands programmatically is to look at the band names of one image, because band information for a collection is sometimes incomplete.
print(collection.first().bandNames());
That said, for datasets from the Earth Engine Data Catalog, you'll get documentation as well as the names by looking at their catalog pages (example), so doing so is a better option in that case.
That page tells you that the band names for L3_AER_LH (as provided by Earth Engine) include aerosol_pressure and aerosol_height.

choropleth map time-series map allowing zoom

I have been using both R and QGIS to study GIS, with the intention of publishing choropleth maps to the web. Both pieces of software allow a zoom function on static maps. But, for animated time-series, the only option appears to be to join a series of time snapshots into a movie file.
I would like the user to be able to zoom in during a time series animation.
I'm animating onto a map of New Zealand, and my time-series is events by suburb. While I can aggregate suburb into territorial local authority area to have larger polygons, this removes the suburb detail. Suburb is likely to remain of interest to users.
Will I have to create a series of animations, one for each general geographical area that people might be interested in (e.g. Auckland, Wellington, Christchurch)? That will provide a "selected zoom" option for users. It also means I have to create a set of static maps per predicted geographical location of user interest.
I can't find any solutions for combining zoom and time series with choropleth maps, at least with R and QGIS.
Does anyone have an example of this type of web implementation, preferably showing the options used (QGIS) or the code (R)?

Tableau map shapes overlapped

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

R and googleVis - possible to make a "motion map"?

I am typically using R to do statistical analysis, and rather new to the data visualization capabilities. I'm trying to figure out if there is some way to marry the motion chart package gvisMotionChart with the mapping package, gvisGeoMap. I'd like to display a video of events over time, appearing on a map on their date of occurrence at lat/lon coordinates and then fading out. Anyone know if it's possible to do this? Any additional concerns if I have over 50,000 records (daily over 5 years) that I want to feed in to be displayed?
Please note that I do not have to use the gvis packages--I am just using these to motivate the idea. If there are other dynamic mapping packages available in R that will just draw on a shapefile and my event records, all the better.
Thanks!

visualization - size of circle proportionate to the value of the item

I'm getting familiar with Graphviz and wonder if it's doable to generate a diagram/graph like the one below (not sure what you call it). If not, does anyone know what's a good open source framework that does it? (pref, C++, Java or Python).
According to Many Eyes‌​, this is a bubble chart. They say:
It is especially useful for data sets with dozens to hundreds of values, or with values that differ by several orders of magnitude.
...
To see the exact value of a circle on the chart, move your mouse over it. If you are charting more than one dimension, use the menu to choose which dimension to show. If your data set has multiple numeric columns, you can choose which column to base the circle sizes on by using the menu at the bottom of the chart.
Thus, any presentation with a lot of bubbles in it (especially with many small bubbles) would have to be dynamic to respond to the mouse.
My usual practice with bubble charts is to show three or four variables (x, y and another variable through the size of the bubble, and perhaps another variable with the color or shading of the bubble). With animation, you can show development over time too - see GapMinder. FlowingData provides a good example with a tutorial on how to make static bubble charts in R.
In the example shown in the question, though, the bubbles appear to be located somewhat to have similar companies close together. Even then, the exact design criteria are unclear to me. For example, I'd have expected Volkswagen to be closer to General Motors than Pfizer is (if some measure of company similarity is used to place the bubbles), but that isn't so in this diagram.
You could use Graphviz to produce a static version of a bubble chart, but there would be quite a lot of work involved to do so. You would have to preprocess the data to calculate a similarity matrix, obtain edge weights from that matrix, assign colours and sizes to each bubble and then have the preprocessing script write the Graphviz file with all edges hidden and run the Graphviz file through neato to draw it.

Resources