Questions tagged [data-visualization]

Plotting data graphically, static or interactive.

Filter by
Sorted by
Tagged with
22
votes
3answers
3k views

Remove points in a straight line

I wrote this code to remove points that create a straight line when plotted. For instance, this has many points in a straight line: ...
14
votes
3answers
750 views

Analyze frequency and content of political fundraising E-mails

Since I'm a big politics nerd, I wanted to write a little script that would analyze the frequency and content of political fundraising emails. I signed up for the e-mails of 6 campaigns, donated a ...
14
votes
1answer
858 views

Plotting polynomials roots

NOTE: See follow up to this question here I created a simple python script to plot quadratic, cubic and quartic polynomials with integer coefficients between -4 and 4. It uses numpy to find the roots ...
12
votes
2answers
888 views

Speech Recognition Part 1: Generate Training Data

You've all heard of neural nets, no? One of the "hello world"s of neural nets is OCR with the MNIST dataset. My idea for speech recognition is to train the neural net with short labeled spectrograms ...
11
votes
1answer
95 views

Python genetic sequence visualizer

I'm a beginner at python, and this is my first major project. Inspired by this reddit post, I wrote a program that accepts a DNA sequence (in a FASTA file format) and generates a graphical ...
10
votes
2answers
350 views

Plotting polynomial roots with density

Follow up on Plotting polynomial roots I rewrote the program to C++ and am now using GNU GSL scientific library and gnuplot and also used OpenMP for multithreading. The result is that it takes about ...
10
votes
1answer
236 views

Displaying programming languages on a timeline

I did the following two exercises in Programming: Principles and Practice Using C++ (2nd Edition), by Stroustrup, which build upon each other: From Chapter 22 (Ideals and History), Write a ...
10
votes
3answers
162 views

Generating image gauges from a value, min and max

One of the things I was recently investigating was the ability to generate "gauge" charts—that is, a chart which shows where a value stands within a range of values. As an example, if we know ...
10
votes
1answer
4k views

Reading and processing histograms stored in ROOT files

The Context My daily workflow largely consists of producing, styling, and circulating plots from a dataset to my advisor and collaborators. We use the C++ framework ROOT to generate and store ...
9
votes
2answers
3k views

Showing two d3.js charts on the same page

I created two graphs in d3js: a bar chart and a donut chart. These two graphs use the same json object for data and share an input range and the radio button. This is the code: ...
9
votes
1answer
83 views

Predator-prey simulation

I made a random-walk predator-prey simulation that focuses on individual animals instead of the (maybe) more common array-based approach. I'd like to hear your opinion about this: how could the ...
8
votes
3answers
4k views

Generating a histogram efficiently from the datasets in a Map

I have a map in which I store total bytes as the key and count of users as the value: ...
8
votes
3answers
186 views

Turn logged data into fancy plot

I'm logging data from an embedded platform over UART. This gets saved to a log file and I want to process the saved log with Excel. I have no idea whether what I did was even remotely a good solution....
7
votes
2answers
979 views

2D lattice random walk plots in functional style

To practice writing code in the functional programming style, I wrote a program to plot two-dimensional lattice random walks. I'd appreciate any feedback about how to improve its "functionaliness". <...
7
votes
1answer
869 views

Saving temporary file for plotting audio waveform

I am developing a web application in Flask - Python. My goal is to let the user upload an mp3/wav file. This file will (for the scope of this question) get processed by the server and a picture ...
7
votes
2answers
647 views

Qt Custom Scatterplot

I have created a custom scatterplot in Qt and am wondering if there is a more efficient way to do it. Here is a sketch of the problem: The layout of the plotting area consists of a rectangular ...
7
votes
1answer
88 views

Git Insert Delete Graph

I attempted to recreate the github code frequency graph(example) with a daily granularity using perl and git log. How did I do, ...
6
votes
1answer
1k views

An ASCII histogram of a die rolled n times

A die is rolled n times. Each time, a random value has been inserted into a vector. This vector then is used to generate a sorted map (wrongly called hashmap in the code) that is later used to create ...
6
votes
2answers
123 views

Genetic Sequence Visualizer - Generating large images

Inspired by this reddit post, I have written a program that accepts a DNA sequence (in a FASTA file format) and generates a graphical representation. HIV virus and Ebola virus My program works like ...
6
votes
2answers
163 views

Prompting the user for plot parameters

Below is the current working code for an ongoing project. I am wondering if there is anything I can do to improve the code snippet below. My main concerns lie to two area. First being that I append ...
6
votes
1answer
119 views

Plotting level and temperature data from many Excel sheets

I've been working on a code that reads in all the sheets of an Excel workbook, where the first two columns in each sheet are "Date" and "Time", and the next two columns are either "Level" and "...
6
votes
2answers
104 views

Mandelbrot rendering code in R

I'm trying out a new continuous histogram coloring method for Mandelbrot rendering in R, and since it requires three loops (three passes), each of them doubly nested, there should be a way to ...
6
votes
1answer
2k views

Bean Machine Simulation

I could not find a solution from my book's website (student-level access) but I feel that I am missing something that I'm supposed to learn from this exercise. Instructions: Balls are dropped from ...
6
votes
1answer
66 views

Graphing refugee movements using plotly in Python

I've created a simple data visualization in python that shows the movement of refugees around the world. The code works but I feel it is a bit slow. it takes about 10 s (on my hardware at least) to ...
6
votes
1answer
299 views

Dynamic Radar Chart

I've created a dynamic radar chart which allows manipulation of points by clicking. My code works, but I'm sure the large amount of if.. ...
5
votes
2answers
128 views

Tracking Containers in a Train Station

This is a time line for control over the events of some containers in a train station. It gets all the data to build the time line by getting a JSON from a database via REST service. The app resets ...
5
votes
3answers
9k views

Vertical Histogram

I've been been working on a vertical histogram that prints an asterisk in place of a number in a certain range (say 1-10... and so on). My code is working as required. Is there a better, simpler or ...
5
votes
2answers
2k views

Plotting an input curve and its FFT using gnuplot in C++

I'm currently working on a project1 which will result in millions of FFTs being solved time and time again. I have a finished prototype in Python (using numpy, scipy, and the pyfftw3 package), but ...
5
votes
2answers
2k views

Genetic algorithm in Python that plots its evolution

After programming in Haskell for a while, I've gotten attached to a functional style. This is clearly evident in the code for my genetic algorithm. Could you provide me with some hints as to how I ...
5
votes
3answers
699 views

Print the length of words as input to a histogram with horizontal bars

It works, but I'm sure there's a lot of improvement I could make here. I didn't try to get it to work for words over 10 characters in length, and I also didn't want to use built in properties like <...
5
votes
1answer
100 views

Drawing a regression line with a timeseries

My code is using seaborn to draw a regression line with a timeseries data as the x axis, and whatever you want the y-axis to be. Since seaborn does not support this function directly, a dummy column ...
5
votes
1answer
191 views

Parsing and plotting complex numbers

I am trying to write a Haskell application that parses a bunch of complex numbers from a Mathematica output and then produces a PPM image. The end product looks like this: The code to create this is ...
5
votes
1answer
5k views

Optimizing for data import in Neo4j using py2neo

Here is my code for importing from a .csv to a neo4j graph using py2neo and cypher statements. I've noticed that it slows down significantly the bigger the graph gets. It takes several seconds just to ...
5
votes
2answers
187 views

Read, organize, and plot data from a formatted file

I have a data output file from a LabVIEW program (that I cannot modify), and I need to plot the data and fit to a theoretical curve. I accomplished this with Python (with which I am entirely self-...
5
votes
1answer
101 views

CSS & JS piechart

I made a pieChart function thanks to the main CSS properties rotate:xdeg, border-radius:100% ...
5
votes
1answer
153 views

Generating all unlabeled trees with up to n nodes

I want to visualize all unlabeled trees with \$n\$ or fewer nodes, not just count them. First idea/attempt: Take a list of all \$n-1\$ node trees, then append a new leaf to every tree in every way to ...
5
votes
1answer
1k views

Plotting a GPS track

I have performed this test and they have not given me a conclusive answer (they really have not given me any response). I have to paint a graphic, do you think the implementation is correct? Is there ...
5
votes
1answer
236 views

Data analytics on static file of 50,000+ tweets

I'm trying to optimize the main loop portion of this code, as well as learn any "best practices" insights I can for all of the code. This script currently reads in one large file full of tweets (50MB ...
5
votes
1answer
90 views

Simple plotting abstract base class and example subclass

I came across a CocoaControl ZFPlot and wanted to extend here. I ended up writing a base class (ZFPlot shown below) as well as several extensions (ZFLine, ZFScatter, ZFBar, none shown here for brevity)...
5
votes
1answer
2k views

Plotting a vector field in R + ggplot

I've written a small program that draws a vector field in R using ggplot for a given differential equation. There is a topic on the subject here however, the proposed solutions either don't provide ...
5
votes
1answer
142 views

Simulating coin flips and plotting a histogram

I started playing around recently with F# and I find it quite elegant and succinct language. A common problem I like to solve in every language I start to learn is the coin flip problem, with the ...
5
votes
1answer
455 views

Visualize data on interactive map + plot via d3.js

I created an interactive web map with d3. I am fairly new to web programming and am interested what you think about the code. The map is based on unemployment rates for each NUTS-2 region in europe. I ...
5
votes
1answer
3k views

Print the frequency of characters as a horizontal histogram

Well, I've used some of the feedback from my last posting to improve how I wrote this program. Mainly using the void parameter in main, initializing my int array to zero without using a for-loop, and ...
5
votes
1answer
68 views

Code to plot graphs with multiple panels efficiently

I quite often plot graphs looking at how some property or function varies with different parameters. Normally, I find the analysis code can be written fairly succinctly and separated into a suitable ...
5
votes
1answer
787 views

Using chartJS in Angularjs to plot IOT data

I am a Javascript and AngularJS beginner. Below is the code inside my chartController. What this does is get IOT data from a back-end call and display it in my front-end with a chart. There are two ...
5
votes
1answer
66 views

Draw a spark line with SwiftUI

I am using a set of data points (currently randomly generated), and drawing a line graph inside a box: ...
5
votes
0answers
116 views

Prerelease code for fingerprint viewing

I wanted to start contributing to the Open Source community, and decided to release some of the Python tools I have written awhile ago. The problem is that I am not really familiar with good practices,...
4
votes
2answers
76 views

Query to plot a histogram of song ratings

I wrote code to plot a rating distribution, which looks like this: The most important function is the stats function: ...
4
votes
1answer
1k views

D3js: transition from stacked bar chart to bar chart with different datasets

Could I get some advice on the following D3 code that transitions a stacked bar chart into a bar chart with two different datasets? I would like to know how to write cleaner and more efficient code. ...
4
votes
2answers
204 views

K&R C Exercise 1-14: Histogram of the frequency of types of characters

This is for K&R C Exercise 1-14: basically asking to create a program that prints a histogram of the frequency of types of characters. This is done with very basic C functions/knowledge as covered ...