0
$\begingroup$

I am trying to find a way to visualize the data related to road accidents. The data has following dimensions:

Year Accident happened (Numeric) | Location of Accident (String) | Count of Accidents (Numeric) | Education Level of Driver (String)

I tried using the Google Bubblechart but that expects 3 numeric dimensions and the 4th dimension (can be number/string) is optional. Please suggest which visualization chart can be used for such data. Please note that I need to utilize any library that works on a web page (so not looking for Excel or such like option).

$\endgroup$
2
$\begingroup$

A simple option would be to 'slice' the data along one of the dimensions, then create a series of plots visualizing the remaining dimensions (one plot for each level of the slice). For example, plot year, location, and count for each level of education. If there are many levels of education, you can bin the levels to obtain fewer plots in the sequence. You can also try slicing along different dimensions to obtain different views of the data.

Another alternative would be to perform dimensionality reduction. For example, you can define a distance metric that quantifies the dissimilarity between data points (using all dimensions), then use multidimensional scaling, t-SNE, or various other algorithms to obtain a two or three dimensional representation that captures the structure of the data in some sense (as defined by your distance metric and chosen algorithm).

$\endgroup$
0
$\begingroup$

That's a difficult question and depends highly on how many categories you have for your two categorical variables (Location and Education level). Out of my head, I could imagine something like a 3-Dimensional Waterfall-Plot, where the third dimension is based on location/education level. (X/Y would be time and count). The remaining dimension could either be wrapped as multiple small plots, or you could use some color-scheme to represent the categories.

But if that's only a useful approach if you are working with a small numbers of categories.

...If you have a lot of locations, you could also try to use a map, if that makes sense for your usecase.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.