Questions tagged [data-visualization]

Plotting data graphically, static or interactive.

Filter by
Sorted by
Tagged with
5
votes
0answers
32 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: ...
6
votes
2answers
94 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 ...
0
votes
0answers
16 views

Angular component for plotting measurements [closed]

I have a rather large component that has two BehaviorSubject objects. Is this the correct way of doing things, or is there are better approach? ...
3
votes
1answer
659 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 ...
0
votes
0answers
17 views

Kotlin HTML timetable visualisation generator

A Kotlin class that I wrote fairly early on while learning Kotlin which is used by another program to build and generate HTML visualisations of timetables. I'd be grateful for any feedback, especially ...
3
votes
0answers
38 views

Django project for events of the day, grouped by keywords in common

I have made a website where people write about their day and see it analyzed. In particular, the website takes event titles and groups them together if they have any common words (after stemming the ...
6
votes
1answer
63 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 ...
3
votes
1answer
38 views

Wiki Link Mapper — A webcrawler which crawls links recursively and prints them into a graph

I would like some suggestions on how to make it better and also if any features that i should add to this Script. I am using beautifulsoup,requests for scraping and networkx for plotting the graph. ...
14
votes
1answer
825 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 ...
4
votes
1answer
79 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'...
3
votes
1answer
55 views

Plot ROC, PR, and PRI curves in C# using pre-calculated coordinates

I have written a small program in C# to plot ROC, PR (equal to AP) and ...
1
vote
0answers
17 views

Google ChartWrapper bar formatted table

The end result is a bar formatted table chart that has expanding and minimising rows. The code below works fine but I'd like to know if there is a cleaner way to achieve the same result (see JSFiddle ...
3
votes
1answer
50 views

Bar graph of Easter date distribution

Computing Easter for a given year is a classic computational problem. It is also one of the few cases when code seems to just have to live with magic numbers. Alternative to magic numbers: Decoding ...
1
vote
0answers
21 views

Salary-structure report using a web-presentation

I had to create a report which presents the salary structure of a firm. The data needed was provided by the client as CSV-files. I used PHP for the reading and preprocessing of the data. The actual ...
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 ...
2
votes
0answers
87 views

Angular polling and plotting component using Firebase

I could use some help refactoring my component and service. I have a lot of nested logic and wasn't sure what I could do to improve this. I'm new to Angular 7 and their piping syntax. I suspect this ...
3
votes
1answer
121 views

dc.js and crossfilter app to display multiple charts

Consider the following crossfilter / dc.js app (screenshot): ...
3
votes
1answer
113 views

Program which accepts grades and prints grade distribution

I'm doing the MOOC Java course (CTRL+F "distribution"): The input of the program is a set of exam scores of a course. Each score is an integer. When -1 is entered, the program stops asking for ...
1
vote
0answers
14 views

Creating Google Charts on SharePoint

I was creating a script to pull data from a SharePoint list and display its contents in graphical form on another page. My original script was very messy and I had asked advice on how I should ...
3
votes
1answer
39 views

Sample size, P-values (its relationship), and data visualization with plots. ggplot and T test

We know that P-values (within t-test context as an example..) is highly sensitive to sample size. A larger sample will yield a smaller p-value remaining everything else constant. On the other hand, ...
1
vote
1answer
94 views

Word count graph

I created a program in python that reads a file and outputs a frequency graph of the words it contains. Any feedback or tips would be appreciated. ...
2
votes
1answer
35 views

Create a histogram of the lengths of words

I am reading through K&R C 2nd Edition, and I am on exercise 1-13. The exercise is to write a program to print a histogram of the lengths of words in its input. I wrote a program that successfully ...
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 ...
3
votes
1answer
84 views

Plots of prior and posterior distributions for a model

I have an exercise that ask to plot the prior and posterior distribution in the Poisson-Gamma model. I did it (I think it's correct) inspired in the answer of this question https://stats.stackexchange....
2
votes
1answer
32 views

Console-based table structure - A python implementation

Some of you might remember my previous implementations of this idea in C++. The threads can be found here and here. I tried to implemented the same idea, but this time in python. A summary of the ...
1
vote
0answers
32 views

Moderate return-low risk vs high returns-high risk investments

To quantify Buffet's #1 rule of investing, "Don't lose money", I take the assumption that % returns of an investment follow a Normal distribution. Now a high return high risk investment might follow ...
5
votes
1answer
190 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 ...
2
votes
1answer
68 views

dplyr — tidyverse, pipes, correlation, same variable across time “a” “b”

Have a look at this dataset. The"a" and "b" are used to make possible differentiate when the same variable was measured. In this case X1a and X1b access the same variable, but "a" was (suppose..) in ...
1
vote
1answer
219 views

Using dplyr and pipes for logistic regression plotting

I have successfully created a plot of a binomial glm using example data. https://sciences.ucf.edu/biology/d4lab/wp-content/uploads/sites/125/2018/11/parasites.txt The predictors of the model include ...
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 ...
3
votes
0answers
172 views

K&R Exercise 1-13. Printing histogram of word lengths (vertical variant)

I'm going through the K&R book (2nd edition, ANSI C ver.) and want to get the most from it. How does the following solution look to you? Note that, for the sake of exercise, I don't want to use ...
3
votes
2answers
124 views

K&R Exercise 1-13. Printing histogram of word lengths (horizontal variant)

I'm going through the K&R book (2nd edition, ANSI C ver.) and want to get the most from it. How does the following solution look to you? Note that, for the sake of exercise, I don't want to use ...
2
votes
0answers
32 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 ...
5
votes
1answer
135 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 ...
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: ...
10
votes
1answer
218 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 ...
4
votes
1answer
49 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 ...
4
votes
1answer
155 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
178 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
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 ...
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
140 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 ...
6
votes
2answers
119 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 ...
4
votes
1answer
8k 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 ...
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 ...
3
votes
0answers
65 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
226 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 ...
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 ...
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: ...
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. ...