Published
Edited
Jun 10, 2021
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
human_generated_tags_all_counts_sorted
Insert cell
nlp_generated_tags_all_counts_sorted
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
codejson = d3.json('https://raw.githubusercontent.com/nasa/Open-Source-Catalog/master/code.json')
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
codejson_filter_by_date_and_source
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function filterCatalogByDate(catalog_array,date){
return catalog_array.filter(catalog_array => catalog_array["Update_Date"] > date);
}
Insert cell
function filterCatalogBySource(catalog_array){
if (source == "both" || source == "openSource"){return catalog_array}
else{
return []
}
}
Insert cell
function limitCatalogJsonByDate(catalog){
var catalog_new = []
for (var i=0; i< catalog.length; i++){
// if(new Date(catalog[i]["Update_Date"]) <= new Date(date_proj_added_after)){
if(catalog[i]["Update_Date"] >= date_proj_added_after){
catalog_new.push(catalog[i])
}
}
return catalog_new
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
data = human_generated_tags_most_common_obj
Insert cell
format = d3.format(".3f")
Insert cell
x = d3.scaleLinear()
.domain([0, d3.max(data, d => d.value)])
.range([margin.left, width - margin.right])

Insert cell
y = d3.scaleBand()
.domain(data.map(d => d.name))
.range([margin.top, height - margin.bottom])
.padding(0.1)
Insert cell
xAxis = g => g
.attr("transform", `translate(0,${margin.top})`)
.call(d3.axisTop(x).ticks(0))
.call(g => g.select(".domain").remove())
Insert cell
yAxis = g => g
.attr("transform", `translate(${margin.left},0)`)
// .attr("style",
// .call(d3.axisLeft(y).tickSizeOuter(0))
.call(d3.axisLeft(y).tickFormat("").tickSizeOuter(0))
Insert cell
height = data.length * 50 + margin.top + margin.bottom
Insert cell
margin = ({top: 30, right: 50, bottom: 10, left: 10})
Insert cell
Insert cell
d3 = require("d3@5")
Insert cell
import {radio} from "@jashkenas/inputs"
Insert cell
import {date} from "@jashkenas/inputs"
Insert cell
import {slider} from "@jashkenas/inputs"
Insert cell
import {table} from "@tmcw/tables@513"
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more