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
#!/usr/bin/python | |
import argparse | |
from pymongo import MongoClient as Client | |
from bson import BSON | |
from bson import json_util | |
import json | |
import os | |
# mongo client |
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
# Load packages | |
library(tidyverse) | |
library(reshape2) | |
# DOWNLOAD DATA | |
## Function to download data and save as CSV | |
download_data <- function(url, filename){ | |
download.file(url = url, destfile = paste0(filename, ".csv")) | |
} |