Skip to main content
100%

Image Gallery

✓ Published0🌍 Public
Aac1714
Last edited Feb 5, 2016
Created on Feb 5, 2016

This example displays a gallery of thumbnail images from the /r/earthporn subreddit, fetched as JSON via D3’s `d3.json` request. It filters the returned posts to keep only those with JPEG thumbnails, then appends each thumbnail to the page as an `<img>` element inside an anchor tag linking to the full-resolution image. The code uses D3 v3’s selection and attribute methods to set the thumbnail height and source, with a black background and rounded image corners defined in CSS.

AI-generated description

forked from <a href='http://bl.ocks.org/syntagmatic/'>syntagmatic</a>'s block: <a href='http://bl.ocks.org/syntagmatic/76739ae4271e8c111d2e'>Image Gallery</a>

Similar vizzes