- Pod
-- container 1: webapp
exposes port: 80
-- container 2: r-service
exposes port: 8070
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
import os | |
import tempfile | |
def dashes(): print('-' * 40) | |
def msgt(amsg): dashes(); print(amsg); dashes() | |
# --------------------------- | |
# Create the temp file object | |
# --------------------------- | |
named_temp_file = tempfile.NamedTemporaryFile(delete=False) |
source: http://guides.dataverse.org/en/latest/api/native-api.html
import os
from datetime import datetime
import json
import requests # http://docs.python-requests.org/en/master/
# --------------------------------------------------
# Update the 3 params below to run this code
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
{ | |
"type":"object", | |
"properties":{ | |
"dataset":{ | |
"type":"object", | |
"properties":{ | |
"description":{ | |
"type":"string" | |
}, | |
"unitOfAnalysis":{ |
This describes a single variable within the variables
section.
Note: The interpretation
and tworavens
sections are placeholders in this version
{
"type":"object",
"patternProperties":{
"^[_a-zA-Z0-9]+$":{
"type":"object",
{
"success":true,
"message":"Metadata retrieved",
"data":{
"self":{
"description":"Generated by https://github.com/TwoRavens/raven-metadata-service",
"created":"2018-05-04 13:12:12",
"preprocess_id":1782,
"version":1
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
def get_dataframe(input_file, start_idx=0, num_rows=100, delimiter=None, is_excel=False): | |
"""Retrieve a pandas dataframe based on format""" | |
try: | |
if is_excel: | |
dataframe = pd.read_excel(input_file) # add nrows, skiprows + lineterminator, if needed | |
else: | |
dataframe = pd.read_csv(input_file, | |
delimiter=delimiter) # add nrows, skiprows + lineterminator, if needed | |
return ok_resp(dataframe) | |
except pd.errors.ParserError as err_obj: |
[{"responseInfo": {"status": {"code": "OK", "details": "Pipeline Submitted"}}, "progressInfo": "SUBMITTED", "pipelineId": "27a0f05d-fc46-4497-bc55-ecfd27e52e83"}, {"responseInfo": {"status": {"code": "OK", "details": "Pipeline Submitted"}}, "progressInfo": "SUBMITTED", "pipelineId": "22548ad8-b38c-4145-9656-f8e7d555c4b4"}, {"responseInfo": {"status": {"code": "OK", "details": "Pipeline Submitted"}}, "progressInfo": "SUBMITTED", "pipelineId": "2f7688a0-e121-463c-89bf-585b1848ff3d"}, {"responseInfo": {"status": {"code": "OK", "details": "Pipeline Submitted"}}, "progressInfo": "SUBMITTED", "pipelineId": "244ce547-5ec3-4f5e-a0c3-1a0efff6e269"}, {"responseInfo": {"status": {"code": "OK", "details": "Pipeline Submitted"}}, "progressInfo": "SUBMITTED", "pipelineId": "de7ed878-e475-454a-93b3-a6d1ba95757f"}, {"responseInfo": {"status": {"code": "OK", "details": "Pipeline Submitted"}}, "progressInfo": "SUBMITTED", "pipelineId": "27b5f716-8275-465d-819e-a6c135a14e47"}, {"responseInfo": {"status": {"code": "OK",