fabiochiu/medium-articles huggingface dataset:
How INSIGHT drives Stranger Things’ success
By: Acrotrend Consultancy
Tags: Business Intelligence, Customer Insight, Data Science, Stranger Things, Data Visualization

Last time we looked at how data is at the heart of Netflix’s success in helping them to predict successful movies and TV shows. If you missed that post, you can read it here.

As we move through the DATA > INSIGHT > ACTION loop, this blog post deep-dives further into the INSIGHT aspect of Netflix’s data.

We have already established that Netflix collects A LOT of data. Storage of that data so that it is readily accessible for analysis is a challenge. In order to do this, Netflix has to use a Data Warehouse combined with a Data Analytics tool to create a Single Customer View, measure KPIs and visualise the data to generate insights.

How does this insight maximise Netflix’s return on investment?

For Netflix, ROI means achieving the maximum customer happiness and loyalty per dollar spent. To maximise user happiness, Netflix has to continually provide really relevant content to its subscribers’ interests. However, with a price tag of $6 million per episode, totalling $45 million for the Stranger Things series, getting it wrong, could be a very expensive mistake to make. But Netflix has ensured that their spend has been successful through using historical data to predict subscriber satisfaction.

Their Machine Learning and Data Science approach to identify high potential content is so successful that, compared to the rest of the TV industry, where just 35% of shows are renewed past their first season, Netflix renews 93% of its original series.

To measure users’ happiness, Netflix uses various and complicated algorithms. This enables Netflix to quickly get quantitative answers (insights) to specific questions and to predict viewing rates for Stranger Things. When Netflix’s decision-makers were reviewing the Stranger Things project, I assume they had concerns such as:

Netflix will input those concerns along with some requirements into a smart algorithm. This algorithm will produce a list of indicators that helps Netflix’s decision-makers understand if the show would be a good investment. Going forward, using machine learning and data science, the system will also be able to share recommendations about how Netflix can improve the existing predictive score and maximise their investment.

For instance, for Stranger Things it could be:

Using powerful analytical tools such as Looker, Power BI and Tableau Netflix can investigate the recommendations that have been generated. Through manipulating the data and creating visualisations insights can be produced at a very granular level.

The main goal from this activity is to find a way to minimise the risk as well as define the action plan before and after making the decision to buy into a TV series or movie.

Predicting successful content is not the only area where machine learning and data science is being used to drive more outcomes as you can see below:

In our next Stranger Things post we complete the DATA >> INSIGHT >> ACTION loop and look at how Netflix puts the initial two stages of the process into action.
Story Cycle
Tags: Poetry, Music, Freeform, Audible Sundays, Photography

Audible Sundays

Story Cycle

Photo by LB

On the road we drove with the light

Immersed in the planet’s revolution

Merging with the cycles in the skies

As our story took form after the rain
Please Don’t Ask Me to Help You Put on a Sari
By: Mita Mallick
Tags: Society, Culture, Identity Self Care, Race, Identity

She asked me to help her put on a sari. So what?

It’s the “so what?” that gets me. It has been part of the narrative of my experience growing up Brown in this country. Of a whole host of things people have asked me and continue to ask me, the list includes:

“Do you know Dr. Raj? He’s the dentist we go to and he is Indian.”

“Do you know our neighbor Anuradha? She’s Indian and makes great samosas.”

“Do you know this woman named Kiran? She’s Indian and she’s also in marketing!”

We are surrounded by labels. And so at work and in our communities, we want to check the box.

Dr. Raj. Anuradha. Kiran. Apparently, I should also know every Indian person within a 50-mile radius. And sometimes the ones out of state, too.

After having worked for many years in marketing, I know we marketers make our living putting labels on products. That’s how we sell lots of stuff. Gluten free. Contains SPF 50. Paraben free. All natural. Dairy free. Made with no preservatives.

We are surrounded by labels. And so at work and in our communities, we want to check the box. We want to put people in boxes. We want to label each other. It’s an easier shortcut for our brains. To categorize, sort, and place people in the appropriate boxes. And stick a label on them.

Let me go and ask the “Korean” person I know where I can get some good bibimbap. Let me go ask the “Hispanic” person I know how to translate these instructions into Spanish for me. Let me go ask the “German” person I know where the closest beer garden is. Let me go ask the “Japanese” person I know if they can help me put on a kimono. Ugh.

When I walk into my workspaces and workplaces, my Brownness enters the room before I even have the chance to sit down and say hello. People put me into a box based on what they see as my identity. Female. Check. Asian. Check. Indian. Check. I am immediately labeled. Because that is the quickest and easiest way to understand my Brownness.

Labels do not belong on people.
Paul McDonald
By: Arin Segal
Tags: Mcdonald, American, Music, Paul, Idol

Paul and I chatted about his music and plans after idol. He even sang some of one of his new songs!
“Lidsville”
By: Background Noise Comics
Tags: Creative Process, Freelance, Freelancing, Comics, Creativity

Running a freelance business means wearing many hats. More heads would really come in handy.
Charticulator
By: Josh Taylor
Tags: Visualization, Power Bi, Data Visualization

Charticulator

Microsoft Research has quietly open-sourced a game-changing visualization platform

Charticulator allows for truly bespoke visualisation through a drag-and-drop interface. Source: Charticulator

Data visualisation is an area where experimentation is rewarded. It is important to be able to rapidly prototype ideas when creating charts. It is easy to think up of impressive ways of building a graph to show a trend in a data set only to find out that, once created, it simply does not work as expected.

Even well thought out charts can turn into a mess when real data is added

Whilst open source tools such as Python and R have a large number of packages to support the creation of charts and graphs, iterating with code can be slow and introduces a steep learning curve. Given that visualisation of data is normally only a small part of a data scientist’s workflow, spending time understanding the specifics of a visualisation library can be painful.

Charticulator

The Charticulator platform not only enables charts to be created from data using a simple drag-and-drop interface, it enables full customisation of the elements within charts in the same way. The platform is open source (MIT license, source code here).

The way that all of the chart attributes can be built from data allows for almost anything to be created. When using the platform you can concentrate more on bringing your data to life than on the process of doing so.

If this sounds a bit abstract, it is probably better explained through the video below:

Building a bespoke chart in under 2 minutes (Source: Charticulator)

An added bonus

Whilst charts can be exported and saved in a number of formats, it is the ability to create a custom visual for Power BI which makes Charticulator even more powerful:

Export to Power BI to create and share outputs on interactive reports

The below video shows the process in more detail:

How to create a custom visual in Power BI using Charticulator. Source: Curbal

You can find Charticulator here!
Senseless Acts of Beauty
By: Violet Bee
Tags: Environment, Climate Change, Beauty, Parenting, Kindness

On the average day, I find it a challenge to go about a “normal” life while understanding that the world is collapsing around us. Even if you don’t think that climate change is going to cause societal break-down (or is already), day after day of dire news can easily lead to the climate grief inflicting so many of us.

I also am the mother of a toddler, who will hopefully continue to be blissfully unaware of the state of the world for a few more years. This means that I spend my days with Minnie Mouse, Anna & Elsa, wooden blocks, play dishes and a million other toys and games that are at odds with my thoughts and feelings.

I happened upon And Beauty for All one day, and it has provided me with a new sense of the beauty of these aspects of my life that are about love and joy and a happy child, regardless of what else is happening in the world.

While their focus is on the beauty of the natural world, I find I can easily apply it to my daughter’s excitement about going to dance class and our amazing trip to a kid-friendly, vegan, brunch drag show. Beauty is everywhere and we have lost our humanity if we let it be stolen from us, even or especially while facing tragedy.

On their website, they have a list of Simple things you can do and my favorite is “Encourage senseless acts of beauty and random acts of kindness.”

It’s such a simple idea, but the senseless acts of beauty really speaks to me. Whatever else we have left to give, here in the greatest trial of humanity, we can give ourselves and each other senseless acts of beauty. Where do you find your everyday beauty?
Out of control
By: Clara Zaitounian
Tags: Poem, Poets Unlimited, Weather, Poetry

The sky is cloudy like my thoughts

It is always moody like my neighbour next door

Summer is coming

And rain will not drizzle but pour

The sky is also like me you see

Mostly quiet but fiddly,

Unpredictable and noisy

Simply out of control
A Tale of Two Countries: Coronavirus Impacts on Energy Demand in China and India
Tags: Covid 19, Business, Energy, Environment, China

A Tale of Two Countries: Coronavirus Impacts on Energy Demand in China and India

The coronavirus outbreak is impacting energy demand in the world’s most populous countries, China and India, on different timescales

China was the first economy affected by the virus and is now in the process of recovering. Indian energy demand, on the other hand, had until recently remained relatively unscathed but is set to decline steeply after New Delhi imposed a nationwide lockdown.

Figure 1. Kayrros China implied crude demand index (Source: Kayrros)

Implied crude demand in China continued to recover in the last week of March from earlier in the month, ending at slightly over 2 MMb/d from its lows, but well-below levels that prevailed before the outbreak.

Chinese crude oil inventories extended earlier gains despite the implied recovery in refining activity, reaching a new record and bringing storage utilization close to 70%.

Kayrros satellite monitoring reveals that Chinese coal-fired power generation also rebounded last week from its earlier plunge and is now close to values seen in 2018 and 2019 at the same time of year. The increase is in line with the restart of various industries, such as cement plants. In Hubei Province, the epicenter of the pandemic, the number of active cement kilns rose between March 12-19, but later remained flat, showing that activity has yet to fully recover.

Activity of cement kilns in Hubei Province (Source: Kayrros)

As another sign of industrial activity uptick, NO2 concentrations over China have increased again.

NO2 Pollution over China (Source: Kayrros)

On March 24, India state oil refiners announced plans to reduce crude runs as domestic oil product demand took a nosedive amid the nationwide lockdown.

Kayrros analysis shows that implied crude demand dropped slightly in the week ended March 29. Crude oil inventories filled, and Kayrros measured a 2.7 MMb build in the country.

Kayrros India implied crude demand index (Source: Kayrros)

Kayrros satellite monitoring of coal power plants in India reveals a sharp drop in power generation since the end of March. Power generated from a sample of fifty-six coal power plants has reached multi-year lows.

This is a sanitized excerpt from a report released to Kayrros subscribers last week. To learn more, reach out to contact@kayrros.com.
Anal Sex Is For (Nearly) Everyone
By: Sexedplus Dan
Tags: LGBTQ, Sex, Sexuality, Health, Comics

Comics and articles about sex and relationships. Also at sexedplus.tumblr.com and on Facebook as Sex Positive Education.

Follow
Reducing JavaScript Bundle Size. Part One: Measurements and high-level…
By: Denny Scott
Tags: Webpack, JavaScript, React, Reactjs, Ecmascript 6

Javascript Bundles

Let’s first talk about JavaScript bundles. Bundles usual refer to JavaScript and CSS bundles sent from the server to the user’s browser. When we discuss it in passing, the primary focus is typically the size of the initial JavaScript bundle sent to the client to initialize the web app, and how that bundle impacts the amount of time before a user can use the app. However, what is the main bundle?

There was a time when we would send a couple of JavaScript files to make our webpage more interactive. More often than not, you would have a CDN link to JQuery, maybe some plugins, and then a main.js which held most of your custom coding. This wasn't a hard-fast rule, but in this scenario, you only had a single file with relatively little JavaScript. The JavaScript would be sent to the browser with the HTML and CSS when a user made a request to the server. The actual webpage and content were often entirely built on the server before being sent to the client. If the user wanted another page, they made a subsequent request to the server.

That’s not to say minification and size were not essential at the time!

The landscape is much different nowadays. Single Page Applications (SPA’s) mean that a user will make a request to a server and download the entire web app. From there, JavaScript will take care of routes, interactions, network requests, and more. That means there’s a ton more JavaScript than ever before. Furthermore, our projects have gone from a couple of .js files to hundreds or thousands. If we were to request all of these individually, it would take an eternity!

Instead, we use tools like Webpack, Parcel, or Rollup to take our files and package them into bundles for distribution. The default strategy of these bundling systems is to create a single bundle out of our .js files, as that will take the least amount of time and the fewest number of requests to collect the data. Of course, these systems do more than that, but for our purpose, this created bundle is our main bundle. To see this in action, we can create a new create-react-app .

npx create-react-app bundle-test

cd bundle-test

npm run build

We are using create-react-app as it’s a pure boilerplate to visualize changes, without needing to step into the code!

We will get into what these other “chunks” are later in the series; we’re just interested in the main.#.chunk.js. This chunk is the collection of all our components packaged into a single file by webpack. Any new code we write will be added to this chunk and downloaded as a single bundle.

However, why do we care about the size of the bundle?
How To Run Next.js App With Nodejs API on Minikube
By: Bhargav Bachina
Tags: Programming, Docker, Web Development, JavaScript, Kubernetes

Create a Deployment and Service Objects

A pod is a group of one or more containers that share the storage and network and has the specification on how to run the container. You can check the pod documentation here.

Let’s create a pod with the below file. Before that, You need to start the Minikube on your local machine with this command minikube start and create a pod with this kubectl create -f pod.yml

pod.yml

It takes some time to pull the image from the Docker Hub if you are doing it the first time or depending on the image size. Now you can see the pod is in the running status and exec into it to explore the file structure, etc.

// get the pod

kubectl get po // exec into running pod

kubectl exec webapp -it -- /bin/sh

kubectl get pod

Deployment

Creating just one pod is not enough and what if you want to scale out the application and want to run 10 replicas at the same time. What if you want to change the number of replicas depending on the demand. That’s where the deployment comes into the picture. We specify the desired state in the deployment object such as how many replicas you want to run etc.

Kubernetes makes sure that it always meets the desired state. It creates replica sets which inturn creates pods in the background. Let’s create a Deployment for our project with this command kubectl create -f deployment.yml

deployment.yml

We have 5 replicas in the specification and the deployment creates 5 pods and 1 replica set.

Deployment

Service

Service is an abstract way to expose an application running on a set of Pods as a network service. Let’s create a service with the type NodePort so that we can access the Next app from the browser. Here is the service object YAML

service.yml

Create a service with this command kubectl create -f service.yml and you can list the service with this kubectl get svc

Service

You can create one file called manifest.yml to place all the Kubernetes objects in one place and create all of the objects with one command kubectl create -f manifest.yml
One Week On: Facebook’s Reactions
By: Jason Mcmahon
Tags: Digital Marketing, Facebook Marketing, Facebook, Facebook Ads, Social Media

Last week Facebook FINALLY released a wider range of emotions for users to express themselves. We all know the arguments for the dislike button, so why Reactions instead?

Facebook recognised that not all posts are inherently likeable. Think about the times you’ve come across a post from a friend lamenting the passing of a pet, getting fired, or moaning about their bad day, not to mention the huge number of posts from consumers complaining to big businesses. Not really, likeable, yeah?

Reactions have already proven, in the last few days at least, to somewhat improve the accuracy of users’ feelings towards a post. Now we’ve got “Like”, “Love”, “Haha”, “Wow”, “Sad” and “Angry”.

Not exactly the “Dislike” button, which Mark Zuckerberg has made pretty clear won’t be happening, but certainly a step towards allowing us more emotional expression, right?

I’m sure you’re thinking though, do people even have time to be bothered selecting a certain emotion? Maybe not for every post they come across, but for posts they feel really passionate about, holding down the button for a second or two and selecting the corresponding emotion isn’t too much of a stretch. Facebook was cautious not to give users too many options, lest our attention span waned. Or is it because human expression is limitless and it’s not physically possible to list the number of emotions a user may have in reaction to a certain post?

Nevertheless, I’d say what they’ve come up with is a relatively good balance, given written communication can never fully express the emotions and intuition derived from physical, face-to-face human interaction.

As Mark Zuckerberg said himself:

“Not every moment you want to share is happy. Sometimes you want to share something that is sad or frustrating… The result is reactions, which allow you to express love, laughter, surprise, sadness or anger. Love is the most popular reaction so far, which feels about right to me!”
‘WHO IS’ JAKE&PAPA? BEHIND THE BROTHERHOOD AS PREMIERED BY REVOLT.COM
Tags: Revolt Tv, Music, Brotherhood, Press Release, Jakepapa

LOS ANGELES, CA — Thursday, May 25th, 2017 — Today, Jake&Papa take their fans on an behind-the-scenes look into the brotherhood so crux to their musical journey. With an assorted arrangement of visuals from their tour days with Tory Lanez, SXSW, critically acclaimed visit to Sway In The Morning, and their telling interview with legendary radio host, Big Boy, this video gives slight insight into what makes this R&B duo so incredible.

In the clip, as seen on REVOLT.com, Big Boy tells Jake&Papa, “It’s got to be good to look to the side and know that you trust this man because this is your blood brother.”

Papa of Jake&Papa replies, “I thank God for that everyday. This grind is hard, it’s tough, and if you don’t have somebody who’s like you’re mirror and doing it for the same reasons that you’re doing it, you’re in trouble.”

Watch behind the brotherhood of Jake&Papa here. Their project Tattoos&Blues EP was released via Priority Records on April 28th, with their single “Phones” (as produced by Bizness Boi). Take a listen to Tattoos&Blues on SoundCloud or via all DSPs worldwide.
As Rich as Ash
By: Jessica Lee Mcmillan
Tags: Poetry, Peace, Colors, Meditation, Weather

uninhabited daybreak

drives temperature of grey

in melancholy strides

dashboard radiates

the shivering nest,

windshield cadence

of gold fragments

in tepid light, lines betray

and colour only whispers

having overstayed,

the skin of existence

is an ambiguous sky,

a glossy invitation

to drift impartially,

to temper the red beat

in blooming calm

the fallow heart

is as rich as ash
Getting Your First Developer Job Without Any Experience
By: Oskar Yildiz
Tags: Tech, Startup, Software Development, Work, Programming

How I got my first job at 17 years old

At 17, I had dabbled around in a few programming languages with the most prominent one being Javascript. I became very fond of Javascript and was amazed at everything you could do with it. I didn’t have much prior experience at this point.

What I had was about a year of experience from learning on my own.

During the same year, I got my first freelancing gig to develop a WordPress website for a local business. This happened after a period of me wondering if I will ever get a job where I get to code during my teens. I was thrilled, on cloud nine.

I couldn’t believe that I was about to make money using a skill I had started learning a year earlier while being self-employed. The truth is that I didn’t know much WordPress at the time of getting that first freelancing gig but I wasn’t going to let that stop me.

After all, if I had managed to get thus far, why shouldn’t I be able to learn WordPress?

I’m sure you’ve heard the phrase, fake it till you make it. Try it, it works.

After that gig is when things took off. It wasn’t long until I found a local startup that was looking to hire developers. I quickly reached out and applied, not long after, I had got another gig.

I ended up working for that startup for about a year until I graduated high school.
#GreenHangoutLagos: Building Collaboration To Solve Lagos State Environmental Problem
By: Iccdi Africa
Tags: Climate Change, Environment, Sdgs, Lagos, Women

The Green Hangout Lagos brought together 53 young environmentalists to discuss the pressing issues facing the environment and SDGs in Lagos state. The ideas is to see how they can work together and create more collaboration in solving the pressing issues facing the environment and supporting the government’s effort in meeting the agenda 2030 of the United Nations and agenda 2063 of African Union.
How to Choose the Right NPM Package for Your Project
By: Nitai Aharoni
Tags: Programming, Open Source, NPM, Software Engineering, JavaScript

When Should I Use One?

Let’s say you’re developing the “next great application.” You run into a problem and decide you do not want or do not know how to write a particular feature.

One of the main reasons you’d want to install a package is to use pre-existing code. There’s no need to reinvent the wheel or do a lot of difficult time-consuming programming when you can download standalone tools you can use right away in your application.

“There must be an external cool library that someone has already written.”

OK, you’re probably right, but keep in mind that one of NPM’s cons is that the registry has no vetting process for submission. This means that packages found there can be low-quality, not secure, or malicious.

So how will you find the right package for your needs? And how will you know you can trust it to do the job over time? Out of thousands of packages to choose from, it may not be obvious which one to pick.

With so many available and new ones considered “what you should really turn to,” it may be daunting to choose the right one for your project.
Mark Zuckerberg says Facebook doesn’t tap your microphone for better ad targeting
By: Selene Kyle
Tags: Technews, Facebook

Back in 2016, Facebook denied the allegation that the social media listens in on your conversations via microphones in order to better target ads. During the joint hearingbefore the Senate Judiciary & Commerce Committees, Facebook CEO Mark Zuckerberg faced the same question, which he addressed with an absolute denial.

Senator Gary Peters (D-MI) asked Mr. Zuckerberg whether his company used audio from personal devices for ad targeting with a “yes or no,” he adamantly responded “no.” Then he explained that Facebook does have audio access, but only when users record videos on their devices for the social network. Otherwise, it doesn’t have any access to your microphone.

Here is Mark Zuckerberg’s full answer:

Senator, let me get clear on this, you’re talking about this conspiracy theory that gets passed around that we listen to what’s going on on your microphone and use that for ads. To be clear, we do allow people to take videos on their devices and share those, and videos have audio, so we do while you’re taking a video, record that and use that to make the service is better by making sure your videos have audio, but I think that is pretty clear. But I just wanted to make sure I was exhaustive there.

Well, Mr. Zuckerberg said his point. Now, it’s completely up to you whether you are satisfied or not. However, due to the recent data scandal, it seems to be difficult for everyone to put back trust on Facebook.
Practical Data Analysis Using Pandas: Global Terrorism Database
By: Saptashwa Bhattacharyya
Tags: Machine Learning, Data Science, Pandas, Python, Data Analysis

The Global Terrorism Database (GTD) is maintained by National Consortium for the Study of Terrorism and Response to Terrorism (START). The database file used in this notebook can be downloaded from Kaggle page (available in .csv format). It consists of the data of worldwide terrorist attacks from 1970 to 2017 including more than 180,000 attacks and 100 features. The GTD defines terrorism as —

“The threatened or actual use of illegal force and violence by a non-state actor to attain a political, economic, religious, or social goal through fear, coercion, or intimidation.”

Here in this post, we will use the data (over 150 MB) to learn pandas and various mapping libraries like Folium and Basemap and, eventually draw conclusions on different results.

What you can expect to learn from this post —

Pandas Groupby.

Pandas Crosstab.

Pandas Cut.

Pandas plot.

Leaflet Map using Folium.

Transform Coordinates (latitude and longitude) to map projections using Basemap.

And many more important concepts.

All the codes used for this post can be found in my GitHub. Link is given at the end of the post. Let’s begin!
React 2020 — P6: Class Component Props
By: Dino Cajic
Tags: JavaScript, Web Development, React, Reactjs, Programming

We covered class components in the previous article. We created a couple of Jim Carrey movie components and we stopped there since we didn’t want to keep creating new movie components for each Jim Carrey movie.

It would be beneficial if we had one component that allowed us to render any movie that Jim Carrey appeared in by passing in the movie name as the argument. If you’ve been following along, passing arguments should not be a new concept for you in React. We already looked at how to pass arguments in functional components; we just need to figure out how to do it in class-based components.

Let’s create a new file under src/components and call it BestJimCarreyMovies.js.

The file will contain a class-based component named BestJimCarreyMovies that returns a string “Movie by Jim Carrey.” The component should be exported so that it can be imported elsewhere.

We’ll import it in our src/App.js file and render it in our App component.

Once you make sure that you’re running your development server (npm start), check the browser.

The first two movies are from the two components that we created in the previous article.

In functional components we passed the props object as an argument to the functional component. The props object contains all of the properties that were declared. In class components, since we extend React.Component, we gain access to the props object through inheritance. To access a property or method inside of the object, we use the this keyword. If you’re not familiar with this, you’ll need to familiarize yourself with Object Oriented Programming. The easiest way that I can explain it is if you’re talking about yourself you use the I or my pronouns. For example, if you were talking about your eyes you would say my eyes. If you were talking about someone else’s eyes, you would say his/her/their eyes. With this (my) you’re pointing to yourself. Since props was inherited, it’s within the object, so you’ll reference it with this.

The process of creating the property is the same as what we did with functional components. When you render your component in the App component, you’ll attach a custom property to it; in this case we’ll create a custom property named movie.

In src/App.js <BestJimCarreyMovies movie="Ace Ventura" />

The movie gets attached to the props object and is accessible by using this.props.movie.

In src/components/BestJimCarreyMovies.js return(

<div>{ this.props.movie } by Jim Carrey</div>

)

If we check our browser, we can see that Ace Ventura by Jim Carrey is displayed. We can now render this component as many times as we want and pass a new argument to it each time.

I know you see where this is going. Why not abstract this out even further? Why not just create a Movie component and pass the movie title and actor as props?

We can render movies from Jim Carrey or from any other actor now.

That’s really all there is to the props object in class based components. See you in the next article when we cover JSX.
Pie Charts in Python
By: Sadrach Pierre
Tags: Data Science, Python, Technology, Programming, Software Development

A pie chart is a type of data visualization that is used to illustrate numerical proportions in data. The python library ‘matplotlib’ provides many useful tools for creating beautiful visualizations, including pie charts. In this post, we will discuss how to use ‘matplotlib’ to create pie charts in python.

Let’s get started!

For our purposes, we will be using the Netflix Movies and TV Shows data set, which can be found here.

To start, let’s read the data into a Pandas data frame;

import pandas as pd

df = pd.read_csv("netflix_titles.csv")

Next, let’s print the first five rows of data using the ‘.head()’ method:

print(df.head())

As we can see, the data contains columns with various categorical values. Pie charts typically show relative proportions of different categories in a data set. For our pie chart visualizations, the ‘rating’, ‘country’ ,and ‘type’ columns are good examples of data with categorical values we can group and visualize.

To get an idea of the distribution in categorical values for these columns, we can use the ‘Counter’ method from the collections module. Let’s apply the ‘Counter’ method to the ‘type’ column:

from collections import Counter

print(Counter(df['type']))

Let’s also look at the ‘rating’ column:
Learn to Collect, model, and deploy data-driven systems using Python and machine learning
By: Ian Gould
Tags: Machine Learning, Python, Data Science, Data Driven, Data Visualization

If you want to learn A to Z of Collecting, modeling, and deployment of data-driven systems using Python and machine learning, consider looking at this Coursera specialization by UC San Diego (View here).

The instructors of this four course specialization are:

Julian McAuley , Assistant Professor, Computer Science

, Assistant Professor, Computer Science Ilkay Altintas, Chief Data Science Officer, San Diego Supercomputer Center

Four Courses in the specialization

This specialization by University of California San Diego consists of four courses. We highly recommend that you take all the four courses as presented. Those who already have the knowledge of whats being taught in a particular course, they can choose to skip and go to the next course.

Following are the four courses:

Basic Data Processing and Visualization Design Thinking and Predictive Analytics for Data Products Meaningful Predictive Modeling Deploying Machine Learning Models

To learn more about these courses, please go here

Who should take this specialization?

Anyone who has intermediate knowledge of the subject and is aiming to become a Data Scientist, Senior Data Analyst, or Data Engineer. Apart from this, anyone who wants to further enhance their Machine Learning, Python Programming, Predictive Analytics Data Processing and Data Visualization skills.

The specialization is 100% online, you can start from anywhere, just choose your own schedule and maintain it. So go ahead and give this specialization a go! You get 7 days of free trial if you land of the specialization page through any of the links in this post.

Those who can’t afford the price may consider applying for the financial aid program coursera runs. Those who are deserving may end up enrolling in the specialization for free.

Always aim for the Coursera certificate

If you choose to go for this specialization, make sure to get the certificate by fulfilling all the conditions. Coursera certificates are recognized by top tech companies. Therefore, make sure to mention it on your resume and Linkedin profiles to get an edge over the competitors.

Hope you find this post insightful, we look forward to bring more resources like this in future. Just follow us on social media to get the latest updates.
Outlier — Candidati per diventare un relatore!
By: Mollie Pettit
Tags: Community, Data Visualisation, Outlierconference, Data Visualization, Dataviz

Sign up for The 'Gale

By Nightingale

Keep up with the latest from Nightingale, the journal of the Data Visualization Society Take a look
Women Deal With Men Like Joseph Epstein All The Time
By: Jessica Wildfire
Tags: Equality, Women, News, Society, Feminism

Women Deal With Men Like Joseph Epstein All The Time

There’s nothing new about the attack on Jill Biden.

I’d just defended my dissertation. We were out celebrating, when a guy sat down at our table. He started hitting on us. When he heard about my Ph.D., he decided to make his own.

He pulled out a pen and grabbed a napkin.

When he was done, he held it up with both hands. “What do you think?” he said. “It’s probably worth more than yours!”

It didn’t hurt my feelings. I had a tenure-track job with a major university waiting for me. All that guy had was a faux hawk. We ignored him until he left. Later, he poured a drink on someone and got thrown out.

It wasn’t until a few days ago that I remembered that otherwise forgettable moment, when reading an op-ed column that’s gotten a lot of attention lately.

Of course, I’m talking about Joseph Epstein’s “suggestion” that Jill Biden drop her credentials from her name and stick to being First Lady, now that the election is finally over. In the end, Epstein is no different from the guy with the faux hawk. They’re both intellectually insecure man-children who have their own issues to work through.

Sadly, they have a wide audience.
Domo arigato, Mr. Smalltalk
By: Richard Kenneth Eng
Tags: Programming, Programming Languages, Donald Trump, Startup, Smalltalk

My adventure began in 2007 when a dear friend of mine from Cherniak Software, a major Smalltalk shop, persuaded me to try Smalltalk. After many years of programming in C and C++ and FORTRAN and Tandem TAL and assembly language, I found that Smalltalk was a breath of fresh air! It was a beautifully simple and elegant language. It had a beautifully simple and elegant programming environment. It was astonishingly easy to learn, and yet it was unbelievably powerful (uncharacteristic of a simple instructional language intended to teach children how to program).

Years later, after I saw how Smalltalk was languishing in the marketplace, I decided to found Smalltalk Renaissance, a marketing and promotional nonprofit. I served as its Campaign Director during 2015.

I found it difficult to engage the Smalltalk community. After many years and many failed attempts to popularize Smalltalk, most had felt beaten down into submission. They began to rationalize that Smalltalk didn’t need to be popular. The community was smug and insular, and that was just fine with them.

I can’t say I blame them. Smalltalk has had a storied history and a lot of water under the bridge. But after all these years, it just didn’t seem worth getting their hopes up again.

Nevertheless, I was determined to give it another shot. It was no less than this great language deserved.

Forget Grassroots

My strategy was simple. For years, people had written numerous technical articles and blogs, and given numerous technical talks at conferences, demonstrating what you could do with Smalltalk and how you could do it. People had been contributing to various open source Smalltalk projects, in particular, the Pharo project, helping to improve the platform and making it more useful for businesses. However, the “if you build it, they will come” philosophy wasn’t working. Appealing to people on an intellectual basis wasn’t working. Smalltalk was still being ignored. What needed to be done, I surmised, was to appeal to people on an emotional basis, the way it’s done in marketing and advertising. Smalltalk needed to promote itself in the same way that Apple promotes iPhone and Mac computers, in the same way Donald Trump promotes himself as a Presidential contender.

Smalltalk needed to make a lot of noise in social media (not so much in conventional media because we don’t have the financial resources to do so). It needed to keep the marketing message very simple and highly focussed. It needed to bend the truth a little bit. It should appear flashy and exciting; Smalltalk had to attract as many eyeballs as possible. I had to take on the role of Steve Jobs, master marketer.
軟件專業人員的現代體系結構設計模式
By: 胡家維 Hu Kenneth
Tags: Software Development, Software Architecture, Software Engineering, Programming

Get this newsletter By signing up, you will create a Medium account if you don’t already have one. Review our Privacy Policy for more information about our privacy practices.

Check your inbox

Medium sent you an email at to complete your subscription.
One small change to your React components that lets you extend the style
By: Kitson Broadhurst
Tags: Styled Components, Programming, Front End Development, React, Coding

Let’s try that again, this time we’ll make sure to pass down our className prop:

// The same styled-component

const StyledOriginal = styled.div`

background: lightBlue;

width: 300px;

height: 150px;

text-align: center;

padding: 2rem;

` // The same React component, but this time with className

const OriginalComponent = ({ className }) => {

return (

<StyledOriginal className={className} >

<h3>Correct 👌</h3>

<p>We pass the className prop to the styled component. Look mom I'm green!</p>

</StyledOriginal>

)

} // We attempt to extend the original component and expect the background to be green

const ReStyledComponent = styled(OriginalComponent)`

background: lightGreen;

`

This time we get the desired result and a change in styles:

Note: This isn’t specific to styled-components. This issue would still occur if the outer most element was a simple <div> inside the original React component.

What if the className on my component is already in use?

There may be situations where you will want to apply a className to your component while passing down a className prop. This begins to get complicated.

Thankfully, we can use the spread operator to help us out:

const OriginalComponent = ({ title, bodyText, ...rest }) => {

return (

<StyledOriginal

className="in-use"

{...rest}

>

<h3>{ title } 👌</h3>

<p>{ bodyText }</p>

</StyledOriginal>

)

}

Here, we’re passing the ‘rest’ of the props down to our outer most element.

This means that by default, the className prop will be passed through.

TLDR:

Pass a className OR ...rest prop down to the outer most element of your component to make its styles extendible

Take a look at this Codepen for a live example.

Cheers

Kits
3 Million Judgments of Books by their Covers
By: Dean Casalena
Tags: Web Development, Data Visualization, Books

Last week, my friend Nate Gagnon and I launched Judgey, a browser-based game that gave users the opportunity to literally judge books by their covers. We’re both makers, and Nate is a writer, and I’m technical. So excuse me if I get technical — I promise to reward you with pretty graphs.

As it so happened, the internet approved of our goof, as did Goodreads (whose API we used), various public libraries and book stores, Book Riot, Adweek, and a few articles (some yet to surface). We also got a tenuous mention in The Washington Post (points if you can find it, but we’ll take it).

Having both seen what kind of traffic a reddit front page could bring (Nate for Forgotify and myself for Netflix’s “Spoil Yourself”) we did the needful technical bolstering to prevent a Reddit Hug of Death. I’d love to tell you about said bolstering, as well as technical aspects of the game’s development, but I’ll save that for a future post.

Spoiler: it will contain this graphic of some scores resulting from gameplay emulation for testing.

We tracked various datapoints of our first-week 300,000+ visitors using Google Analytics to monitor how many levels they completed and how judgmental they were. We waited to turn on more detailed event tracking until after the reddit spike, because Too Many Event Actions can get your tracking turned off entirely.

BUT THE POINT is that thanks to all you nice people, we saw 3 million books judged by their covers this last week, and we’ve crunched the numbers for the most recent 733,802 of these judgments.

One last preface: This isn’t a scientific study. The results do not account for how well known a book is (which would influence the rating despite the cover), nor do they account for the fact that Goodreads does not allow ratings under 1 star. Each book’s results certainly had a pattern however, some we found very interesting.

Click to enlarge

Tweet this graphic
Read on:Symphony — What’s in the first issue?
By: Dyson On
Tags: Magazine, Music, Innovation, Symphony, Dyson

#ON01.18 on:Symphony

Foreword

Sir James Dyson describes how and why his engineers decided to redesign musical instruments from scratch. He also explains that when it comes being an inventor, constantly engaging in creative side-projects and tasks are a vital part of the pilgrim’s progress.

Invented instrumental

Introducing the Cyclophone, a pipe organ made using recycled vacuums | Photography Matthew Beedle

Ever heard of an Ampsi-chord? How about a Cyclophone? No? Well that’s because Dyson engineers recently invented them. After months of hard work, six entirely new musical instruments were unveiled in Dyson’s Malmesbury HQ in front of a crowd of unsuspecting onlookers. Read all about how each new musical device works and, most importantly, how it sounds?

Click here to read the full story.

Q&A with Toby Purser, Conductor of the Orion Orchestra

Toby Purser conducting ahead of his performance at London’s Cadogan Hall | Photography Tom Cockram

Toby Purser is one of the music industry’s most respected rising stars. After a chance conversation with Sir James Dyson, Toby was selected to conduct a piece of music which was composed specifically for — and using — Dyson technology. We talk with him about what makes a good conductor and why he thinks music needs to constantly try new things.

Interview: Meet David Roche the man blending science and music

David Roche pictured in Downing College, Cambridge | Photography Tom Cockram

David Roche is an experimental, young composer who like to try and make music using unusual methodologies and techniques. In his most recent piece, David took up the challenge of making a serious piece of music for, about, and even using, Dyson technology. We ask what inspires him when making music?

The Dyson Symphony — A song of sound and science

On 18th February 2018, London’s prestigious musical venue, Cadogan Hall, hosted the first ever performance of an original piece of Dyson music, using never before played instruments designed and made by Dyson employees. This is the story of the unusual experiment to combine science and music.

Click here to read the full story.

What does music look like?

A piece of music made visual by American artist, Nicholas Rougeux | Image Nicholas Rougeux

It is one of those questions artists and scientists alike have wondered: if we could see it, what would music look like? This is precisely what artist, Nicholas Rougeux has attempted to envisage with his series Off the staff. For on: magazine he has recreated the programme of Dyson X Orion Orchestra’s collaboration feeding the sheet music for the performance through his algorithm making the music into art.

on: is Dyson’s magazine, which is published quarterly and distributed in Dyson Demo spaces. If you would like to read more from our issues please click here.
The Million Dollar Question: How To Survive And Become a Developer
By: Ann Adaya
Tags: Software Engineering, Software Development, Work, Programming, Web Developer

The Million Dollar Question: How To Survive And Become a Developer

It always seems impossible until it’s done.

Photo by Bahman Adlou on Unsplash

“Don’t be afraid to give up the good and go for the great.” — John Rockefeller

Whether you take on the challenge or not, choose and decide, what’s important is you stop wondering and start moving.

Stop daydreaming and start working towards it, it’s always easy to wonder and dream about good things, but if you don’t do anything to make it happen, then your dreams will be just like that, dreams.

What if it won’t work? What if it does.

So, how do we overcome this scary thought every aspiring developer is suffering?

The thing is that regrets don’t happen the moment we make a decision, it happens after, and by just thinking of that thought means we can do everything we can to not ever regret that decision, we do everything we can to make it work and make it happen.

I’ve made a lot of wrong decisions in my life — but the thing is that I don’t have any regrets on any of them, every mistake I made me wiser, stronger, and better.

Thinking of it now, everything does happen for a reason, all those rejections were just redirections — I have become who I am, and taking on this developer journey almost 5 years ago was the best one ever.

That first step

and the most important one.

Here’s a pro tip from one developer to another: We don’t regret the decisions we make the moment we made them, it happens after, so I do my very best not to regret any of it, regardless of the outcome, I’ll make sure I will give everything I’ve got and learn all the lessons it could give.

So make sure you give everything you can, do everything you needed to just to survive, and if things really don’t work out even if you give your best, there will be no regrets I promised you, know yourself, be yourself and you’ll know better.

But before that happens, give it a shot.

Coming from experience and surviving it, I might have earned the right to say this, you can do anything you truly want if you believe.

You can do anything but there will be rules and consequences, there will be struggles and there will be failures, success always comes after overcoming every struggle, it always is and always will be, so get over it and do the work.

Accept that reality, and everything in your life will change.

Just entertain that thought, what if it will work.