Saturday, April 10, 2021
  • Setup menu at Appearance » Menus and assign menu to Top Bar Navigation
Advertisement
  • AI Development
    • Artificial Intelligence
    • Machine Learning
    • Neural Networks
    • Learn to Code
  • Data
    • Blockchain
    • Big Data
    • Data Science
  • IT Security
    • Internet Privacy
    • Internet Security
  • Marketing
    • Digital Marketing
    • Marketing Technology
  • Technology Companies
  • Crypto News
No Result
View All Result
NikolaNews
  • AI Development
    • Artificial Intelligence
    • Machine Learning
    • Neural Networks
    • Learn to Code
  • Data
    • Blockchain
    • Big Data
    • Data Science
  • IT Security
    • Internet Privacy
    • Internet Security
  • Marketing
    • Digital Marketing
    • Marketing Technology
  • Technology Companies
  • Crypto News
No Result
View All Result
NikolaNews
No Result
View All Result
Home Data Science

5 Minute Analysis: Simplifying Iowa Liquor Sales

February 18, 2019
in Data Science
5 Minute Analysis: Simplifying Iowa Liquor Sales
587
SHARES
3.3k
VIEWS
Share on FacebookShare on Twitter

Credit: Data Science Central

In this 5 Minute Analysis we’ll preprocess, map, and explore complicated sales data for liquor stores in Iowa. Then we’ll extract the relevant latitude and longitude from a problematic column of the data and discover the city with the most sales. Next we’ll filter the data to that city and prepare the data for easy loading into Business Analysis tools such as Tableau and PowerBI. Finally we’ll use our extracted location data to visualize sales within the selected city.

You might also like

Vue.js vs AngularJS Development in 2021: Side-by-Side Comparison

5 Dominating IoT Trends Positively Impacting Telecom Sector in 2021

Four Alternative Data Trends to Watch in 2021

Dataset: Iowa Liquor Sales

This blog post explores and analyzes the data using Pivot Billions, available freely on docker.

* I recommend allocating 7.5 GB to your docker container for this analysis since this dataset is over 12 Million rows.

Add the Data and View its Structure

  1. Download the dataset from Kaggle.
  2. Access the Pivot Billions URL for your machine.
  3. Click the Plus (+) icon on the bottom left hand side of the window.
  4. Select Drag & Drop.

  1. Drag your downloaded “Iowa_Liquor_Sales.csv.zip” file to the Drag & Drop box in Pivot Billions.
  2. Click the dropdown arrow to the right of that file in Pivot Billions to view the schema of the data and see a sample.
  3. Then click Column Preview at the top of the screen.

Perform ETL Operations on and Load the Data

The Column Preview tab allows you to see the columns and types of each dataset and modify them as you see fit. You can also view or change which column or columns are set as primary keys and determine how datasets should be joined. When you are done viewing or modifying the data structure, you can import and load the data.

For our dataset, we’ll create two new columns from the StoreLocation column: Latitude and Longitude.

  1. Click the Plus (+) icon on the bottom left hand side of the window to add a new ETL box.
  2. Click the icon to the left of the ETL box to switch to Advanced ETL mode.
  3. Enter latitude into the Column Name box.
  4. Enter -eval s:latitude ‘””‘ -eval – ‘RxMap(StoreLocation,”^.*((.*),(.*)).*$”,latitude,”%%1%%”)’ into the Ess Syntax box.
  5. Click the Plus (+) icon again to create a second ETL box.
  6. Click the icon to the left of the new ETL box to switch to Advanced ETL mode.
  7. Enter longitude into the Column Name box.
  8. Enter -eval s:longitude ‘””‘ -eval – ‘RxMap(StoreLocation,”^.*((.*),(.*)).*$”,longitude,”%%2%%”)’ into the Ess Syntax box.
  9. Confirm the output is what is expected by clicking Check.
  10. Click Import at the top of the screen.

Explore, Filter, and Download the Wrangled Data.

We now have access to all 12,591,077 rows of the Iowa Liquor Sales data. This contains the original data in an easy tabular format along with the two new latitude and longitude features we’ve created.

By hovering over each column name you can sort the data by that column, view that column’s distribution over all of the data, filter by the data in that column, or rename that column. For example, we can view the distribution of sales by city for our data by clicking on the second-from-the-left icon (distribution) in for the City column.

As expected, the capital of Iowa (Des Moines) with the highest population of any city in the state has the highest total number of sales.

Now, for our analysis we’ll filter all of the data to only include data for the city of Des Moines.

  1. Click on the second-from-the-right icon (filter) in for the City column.
  2. Select Equals from the dropdown and then enter “Des Moines” and press enter. All of our data is immediately filtered to just Des Moines data.

The data is almost ready for Tableau or another business intelligence tool but the StoreLocation column is troublesome and prevents Tableau from reading the data. So we’ll go ahead and download the data without this column.

  1. Click the icon on the top right.
  2. Unselect the box next to StoreLocation to remove that column from your selected data.

  1. Now click the icon on the top right.
  2. Enter “DesMoinesSales” for the file name and then click Selected Columns.
  3. When the file is ready for download click the at the bottom of the screen as seen below.

Import and Graph the Data in Tableau

We can now easily import this data into Tableau and use its powerful visualizations to dive into Des Moines liquor sales by location.

  1. Unzip the “DesMoinesSales.csv.zip” file we just downloaded from PivotBillions.
  2. Open Tableau and click Text under Connect.
  3. Navigate to the folder where the “DesMoinesSales.csv” file is located and Open it.
  4. Then click on Sheet1.
  5. Right click Latitude under Measures and select Convert to Discrete and then Convert to Dimension.
  6. Repeat this for Longitude.
  7. Drag Longitude to Columns and Drag Latitude to Rows as seen below.
  8. Drag Sale Dollars to Size and drag whatever features you want to Detail.

It is clear from this SymbolMap plot that the sales for Des Moines are highest near the city center. However, it is also clear that there are many high volume locations throughout the city. We can now visualize the data however we see fit in Tableau. We could also easily remove our city filter from PivotBillions and load the whole preprocessed data into Tableau, or change our filter(s) to select a different subset or arrangement of the data.

To view and interact with this visualization or download the workbook to Tableau, see my Iowa Liquor Sales Workbook on Tableau Public.


Credit: Data Science Central By: Benjamin Waxer

Previous Post

10 Ways AI & Machine Learning Are Revolutionizing Omnichannel

Next Post

Australia has a challenge of scaling defence capabilities for large cyber attacks

Related Posts

Vue.js vs AngularJS Development in 2021: Side-by-Side Comparison
Data Science

Vue.js vs AngularJS Development in 2021: Side-by-Side Comparison

April 10, 2021
5 Dominating IoT Trends Positively Impacting Telecom Sector in 2021
Data Science

5 Dominating IoT Trends Positively Impacting Telecom Sector in 2021

April 10, 2021
Four Alternative Data Trends to Watch in 2021
Data Science

Four Alternative Data Trends to Watch in 2021

April 10, 2021
How to Improve Content Marketing Results with Big Data
Data Science

How to Improve Content Marketing Results with Big Data

April 10, 2021
Reinforcement Learning for Dynamic Pricing
Data Science

Reinforcement Learning for Dynamic Pricing

April 10, 2021
Next Post
Australian government computing network reset following security ‘incident’

Australia has a challenge of scaling defence capabilities for large cyber attacks

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recommended

Plasticity in Deep Learning: Dynamic Adaptations for AI Self-Driving Cars

Plasticity in Deep Learning: Dynamic Adaptations for AI Self-Driving Cars

January 6, 2019
Microsoft, Google Use Artificial Intelligence to Fight Hackers

Microsoft, Google Use Artificial Intelligence to Fight Hackers

January 6, 2019

Categories

  • Artificial Intelligence
  • Big Data
  • Blockchain
  • Crypto News
  • Data Science
  • Digital Marketing
  • Internet Privacy
  • Internet Security
  • Learn to Code
  • Machine Learning
  • Marketing Technology
  • Neural Networks
  • Technology Companies

Don't miss it

Vue.js vs AngularJS Development in 2021: Side-by-Side Comparison
Data Science

Vue.js vs AngularJS Development in 2021: Side-by-Side Comparison

April 10, 2021
IBM releases Qiskit modules that use quantum computers to improve machine learning
Machine Learning

IBM releases Qiskit modules that use quantum computers to improve machine learning

April 10, 2021
Hackers Tampered With APKPure Store to Distribute Malware Apps
Internet Privacy

Hackers Tampered With APKPure Store to Distribute Malware Apps

April 10, 2021
5 Dominating IoT Trends Positively Impacting Telecom Sector in 2021
Data Science

5 Dominating IoT Trends Positively Impacting Telecom Sector in 2021

April 10, 2021
One-stop machine learning platform turns health care data into insights | MIT News
Machine Learning

One-stop machine learning platform turns health care data into insights | MIT News

April 10, 2021
Machine learning: is there a limit to technological patents in Brazil?
Machine Learning

Disclosing AI Inventions – Part I: Identifying the Unique Disclosure Issues

April 10, 2021
NikolaNews

NikolaNews.com is an online News Portal which aims to share news about blockchain, AI, Big Data, and Data Privacy and more!

What’s New Here?

  • Vue.js vs AngularJS Development in 2021: Side-by-Side Comparison April 10, 2021
  • IBM releases Qiskit modules that use quantum computers to improve machine learning April 10, 2021
  • Hackers Tampered With APKPure Store to Distribute Malware Apps April 10, 2021
  • 5 Dominating IoT Trends Positively Impacting Telecom Sector in 2021 April 10, 2021

Subscribe to get more!

© 2019 NikolaNews.com - Global Tech Updates

No Result
View All Result
  • AI Development
    • Artificial Intelligence
    • Machine Learning
    • Neural Networks
    • Learn to Code
  • Data
    • Blockchain
    • Big Data
    • Data Science
  • IT Security
    • Internet Privacy
    • Internet Security
  • Marketing
    • Digital Marketing
    • Marketing Technology
  • Technology Companies
  • Crypto News

© 2019 NikolaNews.com - Global Tech Updates