Published unlisted
Edited
Dec 26, 2020
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
viewof button_alternative_1 = {
const button = html`<button>Load Object`;
button.onclick = function() {
loadObject;
};
return button;
}
Insert cell
viewof button_alternative_2 = {
const button = html`<button>Load Object`;
button.addEventListener('click', loadObject);
return button;
}
Insert cell
viewof button_alternative_3 = Object.defineProperty(html`<button>Load Object`, 'value', {value:undefined})
Insert cell
loaded_data_value = {
button_alternative_3; // create a dependency via Observable's Runtime.
var value = s3.getObject(objectParams).promise();
return value;
}
Insert cell
loaded_data_value_formatted = JSON.parse(loaded_data_value.Body.toString('utf-8'))
Insert cell
loadedObject_formatted = JSON.parse(loadObject.Body.toString('utf-8'))
Insert cell
loadObject = s3.getObject(objectParams).promise()
Insert cell
testing_loadObject_reference = loadObject
Insert cell
html`<button onclick=${loadObject}>reload record</button>`
Insert cell
new_array = Array.from(loadedObject_formatted).concat(bibliography_update_template[0])
Insert cell
new_array_formatted = JSON.stringify(await new_array)
Insert cell
create_new_array = s3.putObject({
Body: new_array_formatted,
Bucket: bucketName,
Key: objectName
}).promise()
Insert cell
html`<button onclick=${create_new_array}>create new record</button>`
Insert cell
bibliography_update_template = [
{
"key":"key7",
"sort":"sort",
"comment":"comment",
"url_primary":"url_primary",
"url_alternative":"url_alternative",
"file_name_revised":"file_name_revised",
"bibtex_type":"bibtex_type",
"extended_typology":"extended_typology",
"distribution":"distribution",
"licence":"licence",
"tags":"tags",
"geographic_scope":"geographic_scope",
"country":"country",
"region":"region",
"year":"year",
"author":"author",
"editor":"editor",
"title":"title",
"chapter":"chapter",
"journal":"journal",
"volume":"volume",
"number":"number",
"pages":"pages",
"series":"series",
"crossref":"crossref",
"language":"language",
"institution":"institution",
"publisher":"publisher",
"address":"address",
"abstract":"abstract",
"notes":"notes",
"record_id":"record_id",
"issn_isbn":"issn_isbn",
"":""
},
]
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
oAWS = {
observableCredentials;
activeRegion;
return AWS;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more