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(rworldmap) | |
library(RColorBrewer) | |
#I had the data as .CSV and loaded it into RStudio, then did a little editing. I had a dataset with ISO country codes added in already, and fortunately, the World Bank populates that automatically with data exports. | |
Country_Pop <- read.csv("~/R/win-library/3.0/Ref_Pop/Country_Pop.csv") | |
RefRes <- read.csv("~/R/win-library/3.0/Ref_Pop/RefRes.csv") | |
#Merge datasets on the ISO code variable | |
Mig_Total <- merge(Country_Pop,RefRes,by=c("Code","Code")) | |
#Remove any duplicate columns. |
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
#This assignment was to play with text. | |
# 1) Ask the user for their name | |
# 2) Print their name backwards | |
# 3) Print their name 10 times with spaces between each name. | |
#name = raw_input ("What is your name?") | |
name = "Zhila" | |
print name[::-1] | |
#print name[1:] |
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(shiny) | |
library(ggmap) | |
library(ggplot2) | |
SFTrees <- read.csv("~/R/win-library/3.0/Projects/SF Trees/SFTrees.csv") | |
na.omit(SFTrees$PlantDate) | |
na.omit(SFTrees$Longitude) | |
na.omit(SFTrees$Latitude) | |
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
#My solutions to challenges from CoderByte.com. Their Python interpreter is buggy. | |
#1 Using the Python language, have the function FirstReverse(str) take the str parameter being passed and return the string in reversed order. | |
def FirstReverse(str): | |
print str[::-1] | |
#2 Using the Python language, have the function FirstFactorial(num) take the num parameter being passed and return the factorial of it (ie. if num = 4, return (4 * 3 * 2 * 1)). For the test cases, the range will be between 1 and 18. | |
def FirstFactorial(num): |