
Learn to build big data pipelines with R and sparklyr, and Power BI, performing ETL, predictive analytics, geospatial visualizations, and dashboards for earthquake data.
Install R on Windows, set the path variable and environment variables, verify via the command line, and install RStudio to begin working with R in big data pipelines.
Install Apache Spark on Windows by downloading Spark 3.0 preview with Hadoop 2.7, unzip to spark folder on C drive, and set Spark home, path, and Hadoop home with winutils.
Install Java 8 JDK from Oracle, accept the license, and verify with java -version; for older Spock versions, optionally create tape tmp and hive folders.
Verify the Apache Spark installation by launching SparkR, confirming it works, and running a small code snippet to print a list and perform a basic operation.
Install sparklyr in RStudio, import dplyr, configure a local spark session and driver, then run a test to verify the spark application initializes successfully.
Extract, transform, and load data from a source into a data frame, then preview the first five records to verify successful import and prepare for transformation.
Transform and clean the data by selecting key fields, creating a year field, and computing yearly quake counts, maximum magnitudes, and average magnitudes for dashboards and analytics.
Preview cleaned data frames and export them to csb files in a spark pipeline, saving to an output folder for dashboards and downstream machine learning work.
Load the test data, align it with the training data by selecting relevant fields and renaming columns to match the training schema for machine learning pre-processing.
Train a random forest regressor using latitude, longitude, and depth to predict earthquake magnitude from training data, test with out-of-sample data, and evaluate RMSE below 0.5.
Create the 2017 prediction data set by renaming the prediction field to predicted magnitude, add year and RMSE, and save as a CSV file for visualization on graphs or maps.
Install Power BI Desktop using two straightforward methods: download from the web or install via the Microsoft Store, then launch after installation.
Load csv data sources into Power BI Desktop, rename files to their folder names, and set the first row as headers while converting latitude, longitude, depth, and magnitude to decimals.
Create a geo map in Power BI by mapping latitude and longitude, sizing points by predicted magnitude, and layering 2015–2016 earthquakes with 2017 predictions.
Visualize earthquake types with a donut chart by dragging fields from the quakes data center, resizing visuals, and styling the chart with a red color palette.
Create an area chart to display maximum and average earthquake magnitude per year using the quake freq data center, and adjust colors and the x-axis scale from 1965 to 2016.
Construct a bar chart of earthquakes by year in Power BI, configuring axes, colors, and title, then expand to a dashboard with map, area chart, and end-to-end data pipeline.
Welcome to the Building Big Data Pipelines with R & Sparklyr & PowerBI course. In this course we will be creating a big data analytics solution using big data technologies for R.
In our use case we will be working with raw earthquake data, we will be applying big data processing techniques to extract transform and load the data into usable datasets. Once we have processed and cleaned the data, we will use it as a data source for building predictive analytics and visualizations.
Power BI Desktop is a powerful data visualization tool that lets you build advanced queries, models and reports. With Power BI Desktop, you can connect to multiple data sources and combine them into a data model. This data model lets you build visuals, and dashboards that you can share as reports with other people in your organization.
Sparklyr is an open-source library that is used for processing big data in R, by providing an interface between R and Apache Spark. It allows you to take advantage of Spark's ability to process and analyze large datasets in a distributed and interactive manner. It also provides interfaces to Spark's distributed machine learning algorithms and much more.
You will learn how to create big data processing pipelines using R
You will learn machine learning with geospatial data using the Sparklyr library
You will learn data analysis using Sparklyr, R and Power BI
You will learn how to manipulate, clean and transform data using Spark dataframes
You will learn how to create Geo Maps in Power BI Desktop
You will also learn how to create dashboards in Power BI Desktop