Published
Edited
Jun 29, 2018
1 fork
2 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
agencies = {
let agencies_using_nosa = new Set();
repos.forEach(repo => {
let agency_name = repo.agency.name;
// check if licenses are included with metadata
if (repo.permissions && repo.permissions.licenses && repo.permissions.licenses.length > 0) {
let licenses = repo.permissions.licenses;

// check if found a NOSA license
let found = licenses.find(license => {
let name = license.name ? license.name.toLowerCase() : null;
let url = license.URL ? license.URL.toLowerCase() : null;
// check if nasa or another search term appears in the license URL
if (url && search_terms.some(term => url.includes(term))) {
return true;
}
// check if nasa or another search term appears in the license name
if (name && search_terms.some(term => name.includes(term))) {
return true;
}
});
if (found) {
agencies_using_nosa.add(agency_name);
}
}
})
return agencies_using_nosa;
}
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more