
Security News
Software Engineering Daily Podcast: Feross on AI, Open Source, and Supply Chain Risk
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.
simple-data-vis
Advanced tools
Simple Data Vis is a JavaScript module initially developed to visualize data gathered by the Simple Logging Service for its visualization page. It is however generic enough that can be used to visual various types of data including cloudant.com views.
Once installed the module can be used to access any REST API that returns JSON array of key/value pairs and have that data visually displayed onto the web page (using D3).
Node.js
npm install --save simple-data-vis
browser
Include the following files in your HTML file:
<script src="https://d3js.org/d3.v3.min.js"></script>
<script src="simpledatavis.js"></script>
Also include the desired visualizations:
<script type="text/javascript" src="vis/simpledatavis-barchart.js"></script>
<script type="text/javascript" src="vis/simpledatavis-bubblechart.js"></script>
<script type="text/javascript" src="vis/simpledatavis-piechart.js"></script>
The module can be initialized via JavaScript or using HTML data attributes:
HTML data attributes
<div type="text" data-vis="http://some-data-url"
data-vis-type="bar-chart"
data-vis-ondata="onDataCallback"></div>
data-vis - (Required) the url to retrieve the JSON data
data-vis-type - (Optional) the type of visualization to use to render the data (e.g., bar-chart, pie-chart, bubble-chart, etc.)
data-vis-ondata - (Optional) the callback function when data has been retrieved but before visualization is rendered
Additional attributes are available based on the visualization. See the Visualizations section for more information.
Javascript
var datavis = SimpleDataVis(dataUrl);
datavis
.on('end', function (data, svgnode) {
// chart has been created and available in the svgnode (D3 selection)
})
.render(selector);
where dataUrl is the url to retrieve the JSON data. The render() function is called passing in the selector where the visualization will be placed. For Node.js, the selector is not used/required instead the SVG will be available as a D3 selection in the onEnd callback.
Additional information available in the Simple Data Vis Wiki.
Examples can be found in the /demo folder of the respository.
FAQs
simple data visualizations using d3
The npm package simple-data-vis receives a total of 1 weekly downloads. As such, simple-data-vis popularity was classified as not popular.
We found that simple-data-vis demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.

Security News
GitHub has revoked npm classic tokens for publishing; maintainers must migrate, but OpenJS warns OIDC trusted publishing still has risky gaps for critical projects.

Security News
Rust’s crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.