SQL Frames Data.gov Datasets Preview
SQL Frames is providing a free service to allow anyone easily preview the Data.gov datasets directly within their browser. No need to install any software.
Loading...
note
Data.gov has datasets from many different websites. Some of the websites may not allow accessing their datasets from within a webpage on another domain. In such cases you will see an error related to fetching the data.
Data.gov bookmarklet
SQL Frames Data.gov Data Preview Bookmarklet - SQL Frames Preview.
javascript:(() => {
const urls = [];
const ds = document.evaluate('//a[@data-format="csv"]',document,null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE);
for(let i=0;i<ds.snapshotLength;i++) urls.push(ds.snapshotItem(i).href.substring(4));
window.location = 'https://sqlframes.com/data_gov?datasets='+encodeURIComponent(urls.join(';'));
})();
note
The bookmarklet looks for all the csv files on the page and then constructs a SQL Frames url that passes all the csv file urls and redirects to this page. This page then uses the SQL Frames REPL app to render the csv data as DataFrames.
Create the bookmarklet
- Create the above bookmarklet in your browser. Detailed instructions for setting up bookmarklets for different browsers can be found here.
- Visit Data.gov (only unzipped csv datasets are supported).
- Go to the details page of any of the Datasets.
- From within the details page, access the bookmarklet. It redirects you to this page with the dataset urls.