Published
Edited
Apr 16, 2022
3 forks
3 stars
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
headingData = [
"The Data Science Process"]
Insert cell
Insert cell
data_nested2 = ({
name: "Business Understanding",
children: [
{
name: "Business Understanding",
children: [ { name : "Aim", weight: 150 },
{ name : "Scope", weight: 100 }]
},
{
name: "Data Collection",
children: [
{ name : "Collecting Data", weight: 200 },
{ name : "Cleaning Data", weight: 200 },
{ name : "Preparing Data", weight: 100 },
]
},
{
name: "EDA",
children: [
{ name : "Univariate Analysis", weight: 80 },
{ name : "Bivariate Analysis", weight: 80 },
{ name : "Multivariate Analysis", weight: 80 },
]
},
{
name: "Predictive Modelling",
children: [
{ name : "Feature Engineering", weight: 40 },
{ name : "Modeling", weight: 10 }
]
},
{
name: "Presenting Results",
children: [
{ name : "Data Synthesizing", weight: 40 },
{ name : "Communicating", weight: 30 },
{ name : "Decision Making", weight: 30 }
]
},
]
});
Insert cell
colorItem = function(item) {
const colors = {
"Business Understanding": "#D8C7B3",
"Aim": "#D8C7B3",
"Scope": "#D8C7B3",
"Data Collection": "#ECB025",
"Collecting Data": "#ECB025",
"Cleaning Data": "#ECB025",
"Preparing Data": "#ECB025",
"EDA": "#EAAFA6",
"Univariate Analysis": "#EAAFA6",
"Bivariate Analysis": "#EAAFA6",
"Multivariate Analysis": "#EAAFA6",
"Modeling": "#9DA0B0",
"Predictive Modelling": "#9DA0B0",
"Feature Engineering": "#9DA0B0",
"Presenting Results": "#DC354A",
"Data Synthesizing": "#DC354A",
"Communicating": "#DC354A",
"Decision Making": "#DC354A",
};
return colors[item];
}
Insert cell
function colorHierarchy(hierarchy) {
if(hierarchy.depth >= 1){
hierarchy.color = colorItem(hierarchy.data.name);
}
if(hierarchy.children) {
hierarchy.children.forEach( child => colorHierarchy(child))
}
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
backgroundColor = "#F4E6D6"
Insert cell
html`<style>

@import url('https://fonts.googleapis.com/css2?family=Jura:wght@300;700&display=swap');

svg {
display:block;
background-color: ${backgroundColor};
}

text.header{
font-size:28px;
font-family: "Jura";
font-weight: 700;
text-anchor: middle;
text-transform: uppercase;
}

text.title{
font-size:15px;
font-family: "Jura";
font-weight: 700;
text-anchor: left;
text-transform: uppercase;
}

text.arc_label {
font-size:16px;
text-anchor: end;
alignent-baseline: central;
font-family: "Jura";
font-weight: 800;
}

text {
font-size:9px;
text-anchor: middle;
// alignent-baseline: central;
font-family: "Jura";
font-weight: 800;
text-transform: uppercase;
}

text.legend_label {
font-size:14px;
text-anchor: end;
alignent-baseline: central;
font-family: "Jura";
font-weight: 800;
}

text.legend_data {
font-size:14px;
text-anchor: start;
alignent-baseline: central;
font-family: "Jura";
font-weight: 700;
text-transform: uppercase;
}

</style>
`
Insert cell
import {wrap_text_nchar} from "@ben-tanen/svg-text-and-tspan-word-wrapping"
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