Questions tagged [data-visualization]

Plotting data graphically, static or interactive.

112 questions
Filter by
Sorted by
Tagged with
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: ...
748 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 ...
798 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 ...
860 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 ...
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 ...
344 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 ...
211 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 ...
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 ...
3k 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 ...
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: ...
184 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....
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: ...
971 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". <...
809 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 ...
628 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 ...
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, ...
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 ...
109 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 ...
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 ...
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 "...
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 ...
285 views

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.. ...
126 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 ...
8k 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 ...
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 ...
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 ...
692 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 <...
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 ...
186 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 ...
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 ...
176 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-...
99 views

CSS & JS piechart

I made a pieChart function thanks to the main CSS properties rotate:xdeg, border-radius:100% ...
113 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 ...
924 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 ...
234 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 ...
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)...
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 ...
137 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 ...
447 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 ...
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 ...
66 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 ...
759 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 ...
107 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,...
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. ...
198 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 ...
74 views

CV written in LaTeX

I've created a CV eager for corrections. Once it is properly written it'd be converted into a template, in order to share it with the community. Can you suggest some starting corrections or ideas? (I'...
150 views

Javascript bar graph representation using CSS

This js was written strictly for a visualization of a graph redesign included in a stats report within our game systems. It all works properly, but I know there has to be a much neater way to organize ...
439 views

Plotting JSON locations using Google Road API with Javascript Promise chaining

I wrote this code for an personal application, just to help me visualize some data related to driving. I have one JSON on my machine, this JSON contains a set of locations (lat, lngs) and every ...