Data Analysis on PR Industry

Posted on Oct 20, 2018
The skills the author demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.

The Goal - Find best industry to work for

Data shows there are many factors that are important when choosing an industry to work in. Career growth opportunities, work-life balance, salary packages, working hours and job security, to name a few. But in any case, It’s important to consider jobs that are in-demand and recession-proof.

Starting your career in growing industries will make it easier to find gainful employment, build a valuable skillset, and help you climb up that career ladder.

In my work, I tried to find most growing industries by analyzing PR News.


What is PR News?

What is PR(public relations) and PR News? According to the Public Relations Society of America (PRSA), PR is "Public relations is a strategic communication process that builds mutually beneficial relationships between organizations and their publics."

The aim of public relations is to inform the public, prospective customers, investors, partners, employees, and other stakeholders and ultimately persuade them to maintain a positive or favorable view about the company, organization, or its leadership. The most used tools in this field is news release. And That is called “PR News”.

Data Analysis on PR Industry

Basic idea

Growing industries creates more PR News than dying industries.
So, If I can count the number of PR News for various industries over the same time period, I can find fast growing industries. And arguably, that's the industry to work for.

Data Analysis on PR Industry

Data Web Scraping

I chose to achieve my goal since it covers an extensive numbers of industries and all the news in it is very well categorized.

My scrapy spider crawled like as follows 
1. collect name and recent news url in 3rd level(which is lowest level) of industry category
2. for each collected industry, go the the recent news list and get news title and release date.
3. follow the previous news link and get the news title and release date until there is no news left.
4. jump to next industry category and do the same.

and results are as follows.

Scraping Result
Number of Cateories 177
Number of News gathered 95,459
Release Date Range April to Octover 2018
Data size 34Mb (Title, URL, Category)


Data Analysis


1st Question :

Is number of PR News release count is different between industries.

This was my first and most import question. If not, my entire scraping would be meaningless.

And simple news count against industries plot shows,

Data Analysis on PR Industry

significant differences between industries.


In top industries are Computer softwares, Medical pharmaceutical, Aerospace & Defense,

and in the bottom,There are public safety, Office products and Supermarkets.

Result looks reasonable. Thus, I can proceed to next analysis.


2nd Question :

Is a trend observed in time series

To find best industry to work for, I needed to find industries with upward trend of news count in time series. To get the time series data for each industries, I had to unstack and resample the data.

and simple plot of news count against date (example is blockchain industry) shows

At a glance, I could not see any trend, But there was periodic zero news count.  So I had looked into data and found that,

Obviously, News is not released in weekend. After removing weekends,

and trying different sampling,

Weekly Monthly(First and Last Month must be ignored since scraped data is not complete.)

I could clearly see that There is a trend. To get the trend for each all industries, I used polyfit function from numpy.

thrend_line function takes time series data frame as an argument and returns slope. If slope is greater than 0, then the time series data have an upward trend. After applying trend_line function to all industries, I could plot trend against industries.

Again, I could see top industries (which means industry with most upward trend) and bottom industries. But What I really needed to see is industries which have relatively high news count and relatively high trend at the same time.

To see the whole picture, I merged dataframes for my question 1 and 2 and plotted it in 3d area.

and it shows...

If you watch 3d plot in realtime, you can clearly distinguish that those 2 dots have high PR Count and High Trend.

Those 2 dots are as follows.

Industry PR News Count Trend
Data Analytics
Financial Technology

Those are the best industries to work for. It's very interesting that data analytics is the winner.


Conclusion and future improvements

I could find best industry based on my simple theory. But how credible is the result? I can not say "highly" because I could get data only just after april this year. For some reason, PR News sites does not keep their news for a long time.

So, To accomplish analysis based on precise long term data, Daily batch crawler preferably with database storage is needed.

And from this project, I could get 95,459 rows of data which consists of category, title and url for contents. Hopefully, These data will be useful for my machine learning NLP study. 


Thank you for taking the time to read about my project!

About Author

Leave a Comment

No comments found.

View Posts by Categories

Our Recent Popular Posts

View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI