This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const stripe = require("stripe")(process.env.STRIPE_SECRET_KEY); | |
export default async (req, res) => { | |
const { items, email } = req.body; | |
const transformedItems = items.map((item) => ({ | |
quantity: 1, | |
price_data: { | |
//description: item.description, | |
currency: "gbp", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. In your own words describe LDA | |
2. In your own words, describe the process of a full tidy text analysis | |
3. Do a short tidy text analysis where you extract topics, explain why they are good or bad. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Explain in your words what the unnest_token function does | |
It is a function from Tidytext library which restructures text: Creates one token for each row. It splits a text column (this is our input) into tokens (like words). It helps us doing this tokenization. | |
2. Explain your words what the gutenbergr package does | |
Project Gutenberg digitizes the books for which copyright has expired with the help of volunteers. Gutenbergr R package provides these books to R users. We can download and process these books using this library. | |
3. Explain in your words how sentiment lexicon work | |
They are like dictionaries which matches words with their sentiment or emotion. Such as classifying them into Positive - Negative - Neutral categories. Once we match the words in our text with lexicon, we can start analyzing the frequencies. Even if we dont know the language in which the text has been written, we can have an overall understanding. | |
4. How does inner_join provide sentiment analysis functionality |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dplyr Questions | |
1. Which of the following return a subset of the columns of a data frame ? | |
a) select (X) | |
b) retrieve | |
c) get | |
d) all of the mentioned | |
2. Point out the correct statement : | |
a) The data frame is a key data structure in statistics and in R |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) | |
# Take a look at our example dataset | |
View(diamonds) | |
# Make a chart from scratch | |
x = ggplot() + | |
layer( | |
data = diamonds, mapping = aes(x=carat,y=price), | |
stat='identity', position="identity", geom="point" |