The shortest connect
:
from psycopg2 import connect
psql_conn = connect("dbname=XXX user=XXX password=XXX host=localhost sslmode=require")
psql_conn.close()
--- | |
title: New York City Taxi & Limousine Commission (TLC) Trip Data Analysis Using Sparklyr | |
and Google BigQuery | |
author: "Mirai Solutions" | |
date: 8\textsuperscript{th} January 2018 | |
output: | |
html_document: | |
theme: flatly | |
params: | |
# gcp_json_keyfile: gcp_keyfile.json |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.
You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.
The dplyr
package in R makes data wrangling significantly easier.
The beauty of dplyr
is that, by design, the options available are limited.
Specifically, a set of key verbs form the core of the package.
Using these verbs you can solve a wide range of data problems effectively in a shorter timeframe.
Whilse transitioning to Python I have greatly missed the ease with which I can think through and solve problems using dplyr in R.
The purpose of this document is to demonstrate how to execute the key dplyr verbs when manipulating data using Python (with the pandas
package).
dplyr is organised around six key verbs:
# Things to keep in mind when installing ROracle: | |
1. Install Oracle Instant Client | |
2. Add instant client to the path.. | |
`Sys.setenv("OCI_LIB64" = "path_to/instantclient_19_3")` | |
3. Manually copy all files |
## 1. set up http and https proxies | |
## 2. change the method to download files | |
options(download.file.method = "wget") ## on linux | |
options(download.file.method = "internal") ## on windows (miniconda) | |
## 3. run install.packages() as usual |
if (!require("pacman", quietly = TRUE)) install.packages("pacman") | |
if (!require("janitor", quietly = TRUE)) install.packages("janitor") | |
pacman::p_load( | |
"stringr" | |
, "lubridate" | |
, "rio" # r <-> excel++ | |
, "pxR" # r <-> pc-axis | |
, "tidyverse" # dplyr, tidyr, plyr, purrr | |
) |
I hereby claim:
To claim this, I am signing this object: