This file contains hidden or 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 sys | |
| import re | |
| import json | |
| import random | |
| s = [] | |
| from nytimesarticle import articleAPI | |
| for i in range(0, 100): | |
| api = articleAPI('74548056debe1698254a3a07babc9f84:3:60371965') |
This file contains hidden or 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(igraph) | |
| library(plyr) | |
| # load files into tables | |
| orb.edge <- read.csv("/Users/mariafang/Desktop/NYU/2_AncientData/Week9 Network/orbis_edges_0514.csv") | |
| orb.node <- read.csv("/users/mariafang/Desktop/NYU/2_AncientData/Week9 Network/orbis_nodes_0514.csv") | |
| # merge tables in two | |
| orb.tb1 <- merge(orb.edge, orb.node, by.x="source", by.y="id") | |
| orb.tb2 <- merge(orb.edge, orb.node, by.x="target", by.y="id") |
This file contains hidden or 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
| # Google transalte library | |
| import goslate | |
| gs = goslate.Goslate() | |
| # Import sunflower.txt | |
| with open('sunflower.txt', 'r') as f: | |
| text = f.read() | |
| # print text | |
| # Make new list "l" |
This file contains hidden or 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
| # Mapping Roman Amphitheater data | |
| ## Time series plots of capacity & extmajor. Leaflet with both the outline of the roman empire & locations of amphitheaters. And testing htmlwidget with ramphs capacity. | |
| --- | |
| title: "CumRamphs" | |
| author: "Maria Fang" | |
| date: "March 10, 2015" | |
| output: html_document | |
| --- | |
| ```{r plot} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| # Download arcdiagram package from Gaston Sanchez's github | |
| install.packages("devtools") | |
| library(devtools) | |
| install_github("arcdiagram", username = "gastonstat") | |
| library(arcdiagram) | |
| # Start igraph package to use certain parameters | |
| library(igraph) | |
| # Convert csv file to gml -> for arc diagram use |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> | |
| <meta charset="utf-8"> | |
| <style type="text/css"> | |
| html { height: 100% ; font-size: small} | |
| body { height: 100%; margin: 0px; padding: 0px } | |
| #map_canvas {min-height: 100%;height:auto; } |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> | |
| <meta charset="utf-8"> | |
| <style type="text/css"> | |
| html { height: 100% ; font-size: small} | |
| body { height: 100%; margin: 0px; padding: 0px } | |
| #map_canvas {min-height: 100%;height:auto; } |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <script src="data:application/x-javascript,%28function%28%29%20%7B%0A%20%20%2F%2F%20If%20window%2EHTMLWidgets%20is%20already%20defined%2C%20then%20use%20it%3B%20otherwise%20create%20a%0A%20%20%2F%2F%20new%20object%2E%20This%20allows%20preceding%20code%20to%20set%20options%20that%20affect%20the%0A%20%20%2F%2F%20initialization%20process%20%28though%20none%20currently%20exist%29%2E%0A%20%20window%2EHTMLWidgets%20%3D%20window%2EHTMLWidgets%20%7C%7C%20%7B%7D%3B%0A%0A%20%20%2F%2F%20See%20if%20we%27re%20running%20in%20a%20viewer%20pane%2E%20If%20not%2C%20we%27re%20in%20a%20web%20browser%2E%0A%20%20var%20viewerMode%20%3D%20window%2EHTMLWidgets%2EviewerMode%20%3D%0A%20%20%20%20%20%20%2F%5Cbviewer%5Fpane%3D1%5Cb%2F%2Etest%28window%2Elocation%29%3B%0A%0A%20%20%2F%2F%20See%20if%20we%27re%20running%20in%20Shiny%20mode%2E%20If%20not%2C%20it%27s%20a%20static%20document%2E%0A%20%20%2F%2F%20Note%20that%20static%20widgets%20can%20appear%20in%20both%20Shiny%20and%20static |