repository for images
#!/usr/bin/env python | |
# coding: utf-8 | |
# In[1]: | |
import pandas as pd | |
import geopandas | |
import matplotlib.pyplot as plt | |
import matplotlib.image as image |
[ | |
{ | |
"Region": "South", | |
"Name": "Andhra Pradesh", | |
"Seats": 175, | |
"Central-Govt-Party": 0, | |
"Each": 1 | |
}, | |
{ | |
"Region": "NE", |
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This chart is created as a response to the call to redesign the OLPC map by Curran Kelleher.
Original map at OLPC website.
Aadhaar enrollments on a given date and pincode combination are grouped together and represented in the dataset.
Here, the enrollment data is divided into X no. of buckets by the aadhaar data operator. Each row represents information about a single enrollment (of a person) except the last four columns. The value in mobile_number_provided and email_provided for a row will always be less than or equal to the value in aadhaar_generated or rejected column. Consider the following example row from the dataset:
20150420,Allahabad Bank,A-Onerealtors Pvt Ltd,Uttar Pradesh,Ambedkar Nagar,Akbarpur,224155,F,22,5,0,0,5
Here, the last four columns represent: aadhaar_generated, rejected, mobile_number_provided, email_provided. 5 for aadhaar_generated field represents 5 aadhaar generations, 0 rejections, 0 enrollments with mobile number and 5 enrollments with email information.
# requires GEOquery package to be installed | |
# writes output to stdout | |
# for more metadata, check the respective classes at http://rileylab.bio.umb.edu/sites/g/files/g1314676/f/201403/GEOquery.pdf | |
library(GEOquery) | |
gsm_ids <- c("GSM409307", "GSM1220601", "GSM1120314", "GSM1120315", "GSM1112815", "GSM1112816", "GSM1112817", "GSM1112818", "GSM410808") | |
for(iter in seq_along(gsm_ids)) { | |
gds <- getGEO(gsm_ids[iter]) | |
cat(gsm_ids[iter], Meta(gds)$title) |
import pandas as pd | |
import matplotlib as mpl | |
import matplotlib.pyplot as plt | |
# %matplotlib inline | |
mpl.style.use('ggplot') | |
df = pd.read_csv("chr_19_H2BK12ac_result.txt", sep="\t") | |
plt.pcolor(df[['run_1', 'run_2', 'run_3', 'run_4', 'run_5']], cmap='RdBu', norm=mpl.colors.LogNorm()) |
# gets fileName.ext from /path/to/fileName.ext. if it's /path/to, it gets 'to' | |
file_name_w_ext=$(basename "$1") | |
# gets fileName from the given file | |
file_name="${file_name_w_ext%.*}" | |
# gets directory path | |
file-path=$(dirname "$1") | |
# collapse multiple columns into a single column (leaving the first column) | |
awk '{for(i=2;i<=NF;i++) {print $i}}' infile.txt > infile_col_collapse.txt |