I am trying to visualise some data for a construction project. Each week, for a few years, different vehicles will be accessing the site. I need to produce a graph showing when each vehicle will be accessing the site. The way I'd like to do this is to have a single graph that shows all vehicles on, so that weeks without any vehicles are empty and can be clearly identified, where as busy weeks will have lots of data visible at the same time.
I want to have the y axis be vehicle type (let's say cars, vans and trucks for now) and x axis be time (weeks of the year). I want to use bubbles to display the number of each vehicle, so if there is a dot at the coordinates (Van, Week 1) you will know that vans will be used during week 1, and the bubble size will tell you how many.
My question is essentially - what is this graph called? I want it to be called something like a "discrete stacked bubble plot" or something but that doesn't exist. Please see my example below. Any ideas on how to do this? Or am I approaching the problem the wrong way?
Example of what I want it to look like
Related
I'm working on a dataset of SMS records [datetime_entry, sms_sent] and I was looking to copy a really effective trend visual from a well cited Electricity demand study. Does anyone know the name of this plot, or the implementation of something similar in Python (as I'm not sure this was done in Python).
I know how to subplot the 4 charts after splitting the data by quarter, I'm just stumped on the plot type and stylization.
This is what matplotlib calls an eventplot.
Essentially each vertical line represents an occurance of a Mwh demand during that specific hour. So each row in the plot should have as many vertical lines as there are days in that quarter.
While it works in this plot for these data, relying on the combination of alpha level + data density can be slightly unreliable as the data change as the number of overlapping points is not readily visible. So you can also create a similar visualization using hist2d, where you manually specify your bins.
I have worked out a table somewhat like the one in the link. The ultimate goal for plotting is to find out if there is a seasonal change pattern for certain products in a state. I have tried to figure out a 3-D plot in python, with x-axis being product name, y-axis being month and z-axis being YR2012 and YR2013 respectively.
And another small question related to this is how could I make python know that the SALESMONTH column contains month type of data rather than plain integers.
Thanks!
The data I have is a set of occurrences of a general event in various US states for a given set of years. All I care about illustrating is 1) the year of the occurrence(s), and 2) the location (state) of the occurrence(s).
I am using state capital latitude and longitudes as the location of each point plotted, and want each point on the map to have a color corresponding to the number of occurrences in that state, in that year. I would like to create a map subplot; essentially create one of these maps for each year of available data and plot all those maps together to visualize the change in location of events over time.
So far, the closest thing I have found I can do is create a scattergeo plot using python and plotly (i.e. the figure at the bottom of this: https://plot.ly/python/map-subplots-and-small-multiples/ ), which gives me the desired map subplot over time, but I cannot figure out how to make each of the submaps into a heat map, rather than a simple scatterplot. Any ideas would be greatly appreciated! As you can probably tell I'm a python noob, but I hope I was able to make my problem clear!
I have three lists in python. the lists are given below
Server_name=['server_1','server_1','server_1', 'server_1','server_2', 'server_2','server_2','server_2']
Month_name=['may','may','june','aug','may','june','july','sept']
Error_count=[10,20,10,30,40,10,20,50]
I want to plot a graph something like below
The above diagram shows that the for all the servers and corresponding month the total count of errors are taken and the graph is plot.
I have tried different scenarios but was unable to get the perfect graph with legends and total count for all three entities.
How should I built my code so I can get the above graph, please suggest
Appreciate your help.
Try using vincent module. It is used to produce these type of graphs
https://github.com/wrobstory/vincent
The data I'd like to visualize is my personal sleep data sourced from a Zeo (www.myzeo.com if you're not familiar). The data is ~50x1000 table with each row representing a night of sleep and each column is an integer from 0-5 representing the sleep 'type' recorded in a 30 second interval. So the first column is the score for the 1st 30 seconds of sleep, the 2nd column the score for the 2nd 30 second interval of sleep and so on.
To start, I'd like to simply map one row (night) of sleep data where the sleep type is mapped to a color. I've been browsing matplotlib's gallery and examples, but its a bit overwhelming to a beginner to figure out what the most appropriate plot type is.
It seems like this color bar (2nd one?) might be close to what I'm looking for, but I'm not sure.
Any recommendations?
This is an extremely specific and narrowly focused question. That said, I see two problems with the color bar visualization proposed:
It only differentiates between different data segments by color. A short interval of sleep disruption may be too narrow to be easily visible (a slice 1 pixel in width is not very large)
Depending on your audience, many color palettes don't cater well to those with color blindness. That could further degrade the ability of a colorbar based plot to convey information.
If you look at the example charts on the MyZeo site, they use a bar chart that conveys information based on color and height. So long as the number of intervals sampled is reasonable, a bar or line chart would be fair choices for your data. (Though if your dataset would require 1,000 separate bars, you may want to consider dithering your dataset so that it displays cleanly)
This matplotlib example appears to provide a bar chart with coloring based on height:
http://matplotlib.org/examples/pylab_examples/hist_colormapped.html
If you do become interested in data visualization, books such as Tufte's The visual display of quantitative information may be worth the read: it's a classic primer on the design choices involved when displaying several dimensions of information on the same figure.