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

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