data-visualization

Generating spatial heat map via ggmap in R based on a value

那年仲夏 提交于 2019-11-30 16:27:11
I'd like to generate a choropleth map using the following data points: Longitude Latitude Price Here is the dataset - https://www.dropbox.com/s/0s05cl34bko7ggm/sample_data.csv?dl=0 . I would like the map to show the areas where the price is higher and the where price is lower. It should most probably look like this (sample image): Here is my code: library(ggmap) map <- get_map(location = "austin", zoom = 9) data <- read.csv(file.choose(), stringsAsFactors = FALSE) data$average_rate_per_night <- as.numeric(gsub("[\\$,]", "", data$average_rate_per_night)) ggmap(map, extent = "device") + stat

Creating a Text Labeled x-Axis with an Ordinal Scale in D3.js

帅比萌擦擦* 提交于 2019-11-30 13:04:57
I'm building a bar chart in d3.js with an ordinal x-axis whose ticks should label the chart with text. Could anyone explain how the ordinal scale "maps" x ticks to the corresponding bar positions? Specifically, if I want to designate the x tick labels with an array of text values to the corresponding bars in a bar chart. Currently I'm setting the domain as the following: var labels = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t"]; var xScale = d3.scale.ordinal() .domain(labels) However, values of 1-19 are showing after the text labels. As seen in this fiddle:

ggplot use small pie charts as points with geom_point

天大地大妈咪最大 提交于 2019-11-30 11:37:51
问题 I would like to make a graph with ggplot as shown below. The idea is to plot "percentage matches" between two categorical variables. It is easy to come close by altering the size of points, but I wondered if it is possible to make these small pie charts... An example code for plotting this with the size of points as a measure of the score. temp <- data.frame(Exercise=c(1, 1, 1, 2, 2, 2), Name=c(1, 2, 3, 1, 2, 3), Score=c(0.2, 0.5, 0.3, 0.9, 1.0, 0.6)) ggplot(temp) + geom_point(aes(Exercise,

Venn diagram from list of clusters and co-occurring factors

旧时模样 提交于 2019-11-30 11:06:41
问题 This question was migrated from Cross Validated because it can be answered on Stack Overflow. Migrated 8 years ago . I've got an input file with a list of ~50000 clusters and presence of a number of factors in each of them (~10 million entries in total), see a smaller example below: set.seed(1) x = paste("cluster-",sample(c(1:100),500,replace=TRUE),sep="") y = c( paste("factor-",sample(c(letters[1:3]),300, replace=TRUE),sep=""), paste("factor-",sample(c(letters[1]),100, replace=TRUE),sep=""),

Data Visualization libraries [closed]

蹲街弑〆低调 提交于 2019-11-30 10:56:31
I am currently in the startup of my new project. It's a data visualisation project, where I want to develop an application that can visualise data (no matter where it comes from). Right now,I am trying to find a visualisation library that I can use. Which one do you recommend? For me it looks like the main libraries are in javascript(D3.js). I wanted to develop an desktop application, but maybe I should just face it and switch to web based? I have experience in java,python and C#. MarcoL What kind of data do you have to visualize? Before starting with a list of solutions I would recommend to

D3 Tree Layout - Custom Vertical Layout when children exceed more than a certain number

吃可爱长大的小学妹 提交于 2019-11-30 10:04:34
I'm trying to use the D3 Tree Layout to create a family tree of sorts and one of the things I noticed is that when I have many children nodes, it would stretch out horizontally across the screen. Ideally I would like a more vertical layout for these nodes so that people don't have to scroll across the screen and can just keep looking down the tree. Here is what I currently see: Now it might not be that bad, but if I had say 20 children, it would span across the whole screen and that is something I kind of want to avoid. I have seen questions like this but this doesn't help me because I want a

choosing a diagramming library for .Net [closed]

喜你入骨 提交于 2019-11-30 09:18:55
I have a customer who needs to convert a diagramming application (which was developed in MFC a long time ago) to C#. The application displays large networks (lots of graphical elements), and lets the user edit/manipulate the data through a graphical ui. I decided that it would be best to use a library rather than to develop all from scracth (all graphic objects/selection/tools/events/etc) I am looking for a commercial solution. I found three that seem to be very mature, and I wonder if anyone had used them and can write his/her opinon: Tom Sawyer Visualization IBM ILog Diagrammer for .Net

Auto-Interval precision in MS Chart

跟風遠走 提交于 2019-11-30 08:30:24
I'm currently using the charting within .NET using System.Windows.Forms.DataVisualization.Charting.Chart . Thus far it seems very powerful, and works great. However, there is a huge problem in terms of how it is auto-calculating intervals. I use a lot of double values, and in libraries like ZedGraph, it handles this perfectly. It selects min/max/interval just fine. However, in MS Chart, it may select 206.3334539832 as a minimum, and intervals of a similar decimal precision. Obviously this looks quite ugly. So, I tried simply making the axis format {0.00} and it works great when it loads the

Force a gap between points on the x axis (MS .Net Chart Controls, Column Chart)

只谈情不闲聊 提交于 2019-11-30 07:35:09
问题 I have a column chart with multiple series each containing multiple points. Currently the columns all touch each other. I want to force a gap between each column. How can I achieve this? I found that applying a PointWidth ( Chart1.Series[seriesName]["PointWidth"] = (0.6).ToString(); ) gives me a separation between the x value groups but not between each series point in an individual group (which I need). Using an empty spacer series as suggested elsewhere does not solve the problem. I am

Using both color and size attributes in Hexagon Binning (ggplot2)

大城市里の小女人 提交于 2019-11-30 07:23:56
问题 I am hoping to construct some charts to display the shooting tendencies/effectiveness of some NBA players and teams. I would like to format the hexagons as follows: size will represent the number of shots and color will represent the relative efficiency (pts/attempt) from that location. Here is a great example of what I'm looking for, created by Kirk Goldsberry: I have been able to use hexbins and hexTapply to achieve something close to the desired result, but the shapes are circles. Here is