Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Hands-On Big Data Modeling

You're reading from   Hands-On Big Data Modeling Effective database design techniques for data architects and business intelligence professionals

Arrow left icon
Product type Paperback
Published in Nov 2018
Publisher Packt
ISBN-13 9781788620901
Length 306 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Authors (3):
Arrow left icon
James Lee James Lee
Author Profile Icon James Lee
James Lee
Tao Wei Tao Wei
Author Profile Icon Tao Wei
Tao Wei
Suresh Kumar Mukhiya Suresh Kumar Mukhiya
Author Profile Icon Suresh Kumar Mukhiya
Suresh Kumar Mukhiya
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Preface 1. Introduction to Big Data and Data Management 2. Data Modeling and Management Platforms FREE CHAPTER 3. Defining Data Models 4. Categorizing Data Models 5. Structures of Data Models 6. Modeling Structured Data 7. Modeling with Unstructured Data 8. Modeling with Streaming Data 9. Streaming Sensor Data 10. Concept and Approaches of Big-Data Management 11. DBMS to BDMS 12. Modeling Bitcoin Data Points with Python 13. Modeling Twitter Feeds Using Python 14. Modeling Weather Data Points with Python 15. Modeling IMDb Data Points with Python 16. Other Books You May Enjoy

Modeling with data

Now, we are only interested in finding the temperature across Nepal. So, let's filter all the countries and extract entries related to Nepal only:

#take a look at Nepal
nepal=bycountry.loc[bycountry['Country'] == "Nepal"]
type(nepal)
nepal.infer_objects()

This should output only entries related to Nepal, as shown in the following screenshot:

Screenshot 14.2: Entries related to Nepal

Now let's save the temperature into a separate variable to normalize it:

temp=nepal['AverageTemperature']
temp=temp.dropna(how='any')

Here, the dropna function removes the missing value, and how = 'any' tells us that if any NA values are present, we should drop that row or column.

Now, let's preprocess the temperature to normalize it. And then plot the chart:

#pre-processing
scale=preprocessing.scale(temp)
plt.plot(scale...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at ₹800/month. Cancel anytime