Periscope
Please enable JavaScript to continue!
Sign Up
Login
Community
Home
Ask, Share and Learn
Add new
R and Python Code Examples
Helpful R and Python examples that can be easily re-used.
Filter
Newest
Active
Popular
Most likes
Most replies
Most views
Tags
Clear filter
Follow
Python - Beautiful Soup
Dear All, Please advise how to use beautifulsoup on the periscope. Thanks. from bs4 import BeautifulSoup import urllib2 url = " https://www.pythonforbeginners.com " content = urllib2 .…
steven Duong
steven_Duong
3 mths ago
1
reply
86
Neha Kumar
3 mths ago
R and Python Code Examples
Visualizing Statistical Significance in Samples over Time - Python
Let's say you're tracking a KPI, and want to see if any changes in your KPI are statistically significant. It would be nice to mark these points on your line graph to call attention to these…
Neha Kumar
Solutions Engineer
Neha_Kumar
4 mths ago
166
1
R and Python Code Examples
Radial Bar Chart with Pending Pipeline
Radial bar charts are a great way to visualize progress charts - but sometimes it's helpful to be able to visualize that progress with the additional context of more pipeline as well.…
Christine Quan
Christine_Quan
5 mths ago
238
2
R and Python Code Examples
Creating a split funnel chart in R
Funnel charts are a common way to visualize conversion for various stages in a business process. Sometimes, it could be interesting to visualize a funnel split by demographic - I recommend just…
Christine Quan
Christine_Quan
5 mths ago
252
2
R and Python Code Examples
Your Guide to Multivariate Linear Regressions in R
Once you’ve gotten familiar with bivariate linear regressions (one explanatory variable, and one response variable), you may want to delve into seeing how multiple explanatory variables contribute…
Neha Kumar
Solutions Engineer
Neha_Kumar
4 mths ago
168
1
R and Python Code Examples
Confidence Interval Printout - R
Let's say we want a printout of our confidence interval for an entire sample (Note, if you're looking for a visual of a confidence interval over time, check out the post here !…
Neha Kumar
Solutions Engineer
Neha_Kumar
5 mths ago
142
R and Python Code Examples
Text Pivots - Pandas
****The code for this solution is leveraged from this source *** Let's say you want to pivot a table, but you want the actual data in the pivoted cells to be a string.…
Neha Kumar
Solutions Engineer
Neha_Kumar
5 mths ago
162
1
R and Python Code Examples
Using Python to Plot only the Rolling Average Line
Want to show a rolling average to your data? Using the Periscope Data Python / R integration , we can accomplish this with a single line of Python code.…
Neha Kumar
Solutions Engineer
Neha_Kumar
6 mths ago
249
R and Python Code Examples
Using R to Plot only the Rolling Average Line
Want to show a rolling average to your data? Using the Periscope Data Python / R integration , we can use a few quick lines in R to accomplish this. Here are the first few rows of our SQL output - a…
Neha Kumar
Solutions Engineer
Neha_Kumar
6 mths ago
142
R and Python Code Examples
Transposing Tables in R
Transposing a dataframe in R is as simple as 2 quick lines of code. The first is to actually transpose the table, and the second is to name your column headers.…
Neha Kumar
Solutions Engineer
Neha_Kumar
3 mths ago
122
R and Python Code Examples
Pivoting large data sets with dynamic column names
I frequently get requests that require me to reshape summary data so that months are presented as columns. In most cases, I also I need the dates/months included to be dynamic,…
Safiya Moran
Data Scientist, Litmus
Safiya_Moran.1
6 mths ago
182
3
R and Python Code Examples
Confidence Interval Printout - Python
Let's say we want a printout of our confidence interval for an entire sample (Note, if you're looking for a visual of a confidence interval over time, check out the post here !…
Neha Kumar
Solutions Engineer
Neha_Kumar
5 mths ago
747
1
R and Python Code Examples
Test for Normal Distribution of Data with Python
One of the first steps in exploratory data analysis is to identify the characteristics of the data, importantly including a test for distribution patterns.…
Ray Harris
moderator
Ray_Harris
6 mths ago
1,041
2
R and Python Code Examples
Visualizing Statistical Significance in Samples over Time - R
Let's say you're tracking a KPI, and want to see if any changes in your KPI are statistically significant. It would be nice to mark these points on your line graph to call attention to these…
Neha Kumar
Solutions Engineer
Neha_Kumar
4 mths ago
173
R and Python Code Examples
Compounding Values with Dynamic Multipliers
Coming from the world of spreadsheets, you may have defined a set of values recursively with ease, referencing the previous value plus another variable to calculate a new value.…
Ray Harris
moderator
Ray_Harris
7 mths ago
114
1
R and Python Code Examples
Showing a Confidence Interval - R and Periscope Visualization
Confidence intervals are a favorite among many professionals with a statistics background. We can use the R integration in Periscope to show the Confidence interval as a shaded region around a line…
Neha Kumar
Solutions Engineer
Neha_Kumar
6 mths ago
284
R and Python Code Examples
cohort analysis grid visualization with Python, Pandas, matplotlib and Seaborn
I want to share some code I put together to make a cohort grid using Python, Pandas, matplotlib and Seaborn in case it's useful to others. # SQL output is imported as a pandas dataframe variable…
Chris Eldredge
Chris_Eldredge
7 mths ago
2
replies
731
7
Chris Eldredge
7 mths ago
R and Python Code Examples
Getting Around Overlapping Data Labels With Python
A common hazard when adding data labels to a chart, is that often times the data labels will overlap when there are two points located relatively close to one another.…
Adam Luba
moderator
Solutions Engineer
Adam_David
7 mths ago
1,216
1
R and Python Code Examples
Percentile Curves - Another way to show distributions
Note: This solution requires Periscope's Python/R integration Let's say you have data set that is heavily skewed, like this hypothetical data set here plotting the amount users paid on a fictional…
Neha Kumar
Solutions Engineer
Neha_Kumar
2 mths ago
3
replies
1,041
2
Tom Nemec
2 mths ago
R and Python Code Examples
Calculating Trimmed Means (SQL and Python Variations)
Data can oftentimes have extreme outliers, which can heavily skew certain metrics, such as the mean. One way to get around this is to using a trimmed mean.…
Neha Kumar
Solutions Engineer
Neha_Kumar
8 mths ago
1
reply
1,334
2
Rajat Mittal
4 mths ago
R and Python Code Examples
Embed URL Generation Made Easy With Python Script
Creating an embed URL is a multistep process that can easily be botched along the way. Finding where the mistake was made can be tricky, and the generation of multiple embed URLs can be a painful…
Adam Luba
moderator
Solutions Engineer
Adam_David
8 mths ago
2
replies
1,377
4
Ray Harris
moderator
3 mths ago
R and Python Code Examples
Plotting a Gradient Line in R
Color is an extremely useful visualization tool. On a line chart, a color gradient can be used to emphasize the highs and lows. Using the Python / R integration in Periscope,…
Neha Kumar
Solutions Engineer
Neha_Kumar
9 mths ago
339
1
R and Python Code Examples
A Beginner's Guide to Linear Regression Models in Python
Does your team prefer Python over R? Or are you looking to brush up your on your Python skills? We'll walk through a simple example of a linear regression model using the scikit-learn library in…
Neha Kumar
Solutions Engineer
Neha_Kumar
5 mths ago
1,078
7
R and Python Code Examples
A Beginner's Guide to Linear Regression Models in R
New to R? Not a problem! You can still deliver valuable insights to your team using a few simple functions. This article walks through how you can use Periscope's Python and R integration along with…
Neha Kumar
Solutions Engineer
Neha_Kumar
5 mths ago
1
reply
809
4
Ranjeet Tate
5 mths ago
R and Python Code Examples
Python Using and Example with Periscope
Dear All, Periscope has the great environment to test and play with data using SQL. In some cumbersome cases, we need python to analyze the data we need.…
steven Duong
steven_Duong
9 mths ago
1
reply
300
Neha Kumar
9 mths ago
R and Python Code Examples
1
2
3
Next
Add article
Helpful R and Python examples that can be easily re-used.
Create a Post
Categories
Announcements and Events
Announcements
Events
Ask, Share and Learn
Ask a Question!
R and Python Code Examples
SQL Code Examples
Datasets
Learn SQL!
Competition Submissions
SQL Interview Questions
Questions
Answer Keys
Discussion Forums
For Data Managers
Product Talk
Data Engineering
Analytics Discussions
Off Topic
Top contributors
View all members
Recent activity
Home
Announcements and Events
Announcements
Events
Ask, Share and Learn
Ask a Question!
R and Python Code Examples
SQL Code Examples
Datasets
Learn SQL!
Competition Submissions
SQL Interview Questions
Questions
Answer Keys
Discussion Forums
For Data Managers
Product Talk
Data Engineering
Analytics Discussions
Off Topic