Skip to content

Instantly share code, notes, and snippets.

View haoshuai999's full-sized avatar

Shuai Hao haoshuai999

View GitHub Profile
@haoshuai999
haoshuai999 / Dataset PM2.5_50 2016.tsv
Last active February 25, 2019 18:34
Data for 10 cities around the world whose PM 2.5 value is more than 50. Only one city from each country is included.
Country City Year Annualmean Temporalcoverage note-on-converted-PM2.5
India Kanpur 2016 173 >75% Measured
China Baoding 2016 93 NA Measured
Mongolia Ulaanbaatar 2016 92 >75% Measured
Saudi Arabia Riyadh 2016 73 NA Measured
Bosnia and Herzegovina Lukavac 2016 64 >75% Measured
Bahrain Manama 2016 63 50% -< 75% Measured
Iran (Islamic Republic of) Shahre Kord 2016 61 NA Measured
Bangladesh Dhaka 2016 57 >75% Measured
Ghana Accra 2016 55 NA Measured
{
"name" : "Crimes",
"children" : [
{
"name" : "Manhattan",
"children" : [
{
"name" : 1,
"value" : 1356
},
{
"name": "Crimes",
"children": [
{
"count": 133,
"name": "Manhattan",
"children": [
{
"count": 7,
"name": 2000,
@haoshuai999
haoshuai999 / ICO.py
Last active August 29, 2019 00:09
CoinDesk ICO Tracker data analysis
import csv
import numpy as np
import matplotlib.pyplot as plt
import statistics
# The dataset is about the size of initial coin offering (ICOs) from February 2014 to July 2018
# The dataset also includes the name and close date of ICOs, which can be used for further analysis
# The following script provides the median, quartiles, the mean and standard deviation of ICO size.
# Next step: A company called EOS raised $4,200 million dollar through ICO on June 1, 2018
@haoshuai999
haoshuai999 / Evolution of Terrorism
Last active April 9, 2019 02:01
Initial Data Visualization in Code
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<body>
<script src="https://d3js.org/d3.v3.min.js"></script>
<script>
var width = 1200,
height = 500;
@haoshuai999
haoshuai999 / alexander.geo.json
Last active April 11, 2019 22:17
Geojson Data for history map
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@haoshuai999
haoshuai999 / bardata.csv
Created April 19, 2019 21:11
Data for bar chart
date value
2013-01 53
2013-02 165
2013-03 269
2013-04 344
2013-05 376
2013-06 410
2013-07 421
2013-08 405
2013-09 376
@haoshuai999
haoshuai999 / nattacks.csv
Last active April 24, 2019 16:01
nkills for terrorism
country decade nattack
Afghanistan 1 4
Afghanistan 2 22
Afghanistan 3 98
Afghanistan 4 1949
Afghanistan 5 10658
Albania 2 1
Albania 3 64
Albania 4 5
Albania 5 10
@haoshuai999
haoshuai999 / world.geo.json
Last active April 20, 2019 01:27
world.geo.json for terrorism
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.