Questions tagged [data-visualization]

Plotting data graphically, static or interactive.

Filter by
Sorted by
Tagged with
2
votes
0answers
41 views

Function that plots data frames, supporting several variants

I defined a function that generates tables and creates countplots and barplots based on the arguments that it receives. But the snippets of code inside the function are repeated several times, which ...
3
votes
1answer
1k views

D3 Updating stacked bar chart

In my data there can be different number of bars in each chart. Here is a picture: When pressing the button labeled change bars layout the view of the charts toggles between horizontal and vertical ...
10
votes
1answer
308 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 ...
5
votes
1answer
455 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 ...
4
votes
1answer
187 views

Plot random generated 'n' non-colliding circles using Matplotlib

I have a function which plots n randomly generated non-colliding circles. The circle is a Circle object, part of ...
5
votes
1answer
316 views

Haskell K-means implementation

The following is a Haskell backend to a K-means visualisation: I have omitted the API code (exists in a separate module), the relevant endpoints simply call ...
1
vote
1answer
403 views

Galton Board Simulation

This program is written for Windows 7 under MinGW using gcc. I'm seeking recommendations for improving the program's portability. ...
10
votes
3answers
166 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 ...
9
votes
1answer
163 views

Chart of Percentage questions Answered

Every day, Duga reports the number of unanswered questions and percentage of answered questions (after she calls the API endpoint /info) in The 2nd Monitor (so we ...
5
votes
1answer
2k 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
171 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 ...
9
votes
2answers
5k 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: ...
6
votes
2answers
160 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 ...
11
votes
1answer
107 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 ...
3
votes
0answers
114 views

Boilerplate-free mixin pattern for a TypeScript charting library

The TypeScript handbook provides a mixin pattern but it requires a bunch of boilerplate, doesn't work for getters/setters and doesn't support defining default values (or any constructor work) in the ...
2
votes
0answers
234 views

Generating data for Highcharts

I have written a code to generate chart data for the Highcharts library and need to know if there are any improvements possible. I have applied generics but think it could be fine tuned further. Could ...
24
votes
3answers
4k 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: ...
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
1answer
12k views

Dynamically change data in Chart.js charts with jQuery slider

I created this little JavaScript application which gets data from a post request and uses this data to show a line chart with the total income over a year and a bar chart for the daily income. The ...
3
votes
1answer
1k views

D3 stacked bar chart with linear x axis

In all the examples I've come across so far, (like this, this or this) I see stacked charts in d3 have an ordinal scale. I presume this is because stacked charts are considered an extension of bar ...
3
votes
0answers
674 views

Python, matplotlib, 3d plot, how to make this code effective, light, fast?

I have already make a 3D mesh. See below: And the code below: ...
3
votes
0answers
3k views

Reading a csv file and making a histogram in Python using NumPy and Matplotlib

I have written the following code which reads a csv file that contains a bunch of words and their sentiment value. Words like abandon may have a value of -1, while words like progress and freedom have ...
2
votes
1answer
62 views

Plotting points representing many events on a canvas

I have a web app which uses Node canvas to plot points on a graph. Each point is called an 'event'. An event is an array of usually 6 'parameters' represented as numbers. My app allows users to plot 2 ...
3
votes
1answer
980 views

Histogram output from parse of json-ish data in python

The idea is exploratory data analysis, the output rendered as a histogram to get an idea of relative frequency of records: The example data set looks like this: ...
3
votes
1answer
396 views

Simple D3 code for drawing area charts

I am quite new to D3 and JavaScript in general, so I'm sure there is a way to write the following in a lot less code: ...
1
vote
0answers
28 views

Parsing server request data for visualization in C3.js

The following is a snippet from a script I have that fetches a list of objects representing requests to a server and graphs them using C3.js. I've only included the relevant code that parses the list ...
5
votes
1answer
589 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 ...
1
vote
1answer
339 views

Counting the frequency of certain entries in a list of JSON objects

I have a list of JSON objects that looks like this: [{ url: '/home', ... }, { url: '/analytics', ... }] I'm using the following function to count the ...
4
votes
1answer
827 views

Graphing a linear equation using javascript and html

I'm open to any feedback even if it's just a quick browsing over to get a quick opinion of my code. As part of a job interview process I was given a coding challenge to complete. The challenge was ...
4
votes
2answers
212 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
1k 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
101 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 ...
11
votes
2answers
388 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 ...
13
votes
1answer
1k 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 ...
0
votes
1answer
99 views

A simple Python graphing tool

I've written a primitive Python script which "draws graphs" based on a list. It works, but it's a lot of lines for what I am trying to reach. The idea of the script is to function as a module that can ...
7
votes
1answer
1k 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 ...
12
votes
2answers
941 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 ...
1
vote
0answers
73 views

P5 Isothermic Map Generator From Data Points

In my earth science class at school we had a lab where we went around the campus measuring the temperature at different place and marking it on a map. Afterword we were told to color the map using ...
6
votes
1answer
344 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.. ...
10
votes
1answer
5k 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 ...
3
votes
0answers
50 views

Reusable, manipulatable plots

I'm interested in mimicking a simple version of Mathematica's Manipulate function in javascript. This is my first project in javascript, but I was hoping to make a library that I can use to quickly ...
5
votes
1answer
162 views

Plotting a graph of survey answers in Laravel

I'm using PHP (Laravel) to iterate over the survey_answers table and build datasets which I can show in a graph. I'm just wondering if this is the way to go. ...
4
votes
0answers
163 views

ggplot2: a script for stacked and a line chart

So far I was successful to get what I need using below mentioned script, but I'm sure my script is far from being perfect (if it is possible at all). So, I'd greatly appreciate your comments on how ...
5
votes
2answers
3k 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 ...
0
votes
1answer
304 views

Calls one column of a dataframe, turns it into an array and plots it

My code calls 1 column of a dataframe, turns it into an array and plots it. I want to able to do this for all the columns without having to repeat the code many times. How can I do this? ...
3
votes
2answers
193 views

Plotting a 2D iso-probability curve

I have a library function that returns a pair of two numbers like this def library_function(x0, x1): return x0**2 + x1**2, 10*x0*x1 + 1 (Actually, it is a ...
3
votes
2answers
563 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 ...
5
votes
0answers
124 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,...
3
votes
3answers
5k views

Plotting from a Pandas dataframe

I want to improve my code. Is it possible to get the plot without repeating the same instructions multiple lines? The data comes from a Pandas' dataframe, but I am only plotting the last column (...
3
votes
0answers
102 views

JFreeChart generic plotting tool

I have created a bit of code that plots data for a project (XY Line Chart). It works. But it isn't what I'd consider good. I am looking to improve it in two ways: Make it more generic, so that I can ...