Skip to content

Instantly share code, notes, and snippets.

View basicavisual's full-sized avatar
🦝
raccoon

Ali G basicavisual

🦝
raccoon
View GitHub Profile
@basicavisual
basicavisual / d3.v3.js
Last active September 27, 2015 16:07
Distancias entre localidades más alejadas y oficinas asesor jurídico
d3 = function() {
var d3 = {
version: "3.3.11"
};
if (!Date.now) Date.now = function() {
return +new Date();
};
var d3_arraySlice = [].slice, d3_array = function(list) {
return d3_arraySlice.call(list);
};
@basicavisual
basicavisual / d3.v3.js
Created October 4, 2015 17:07
Distancias y costos para quienes viven más lejos de las oficinas de asesoría jurídica
d3 = function() {
var d3 = {
version: "3.3.11"
};
if (!Date.now) Date.now = function() {
return +new Date();
};
var d3_arraySlice = [].slice, d3_array = function(list) {
return d3_arraySlice.call(list);
};
@basicavisual
basicavisual / d3.v3.js
Last active October 6, 2015 01:31
Mortalidad por tumores malignos
d3 = function() {
var d3 = {
version: "3.3.11"
};
if (!Date.now) Date.now = function() {
return +new Date();
};
var d3_arraySlice = [].slice, d3_array = function(list) {
return d3_arraySlice.call(list);
};
@basicavisual
basicavisual / NacidosVivosRegistrados2014.csv
Created December 3, 2015 19:20
Embarazos adolescentes por municipio jalisciense en 2014
Clave Municipio Región Nacimientos total 10 a 14 perCent1519 15 a 19 20 a 24 25 a 29 30 a 34 35 a 39 40 a 44 45 a 49 50 a 59 NO ESPECIFICADO Masculino Femenino Sin Información
- Jalisco 151,255 326 0.153 23,210 44,636 38,198 27,327 13,521 3,690 226 35 86 77,140 74,004 111
Municipio no especificado 216 0 0.097 21 64 52 47 25 7 0 0 0 99 117 0
1 Acatic 3 460 0 0.159 73 130 115 90 34 18 0 0 0 221 239 0
2 Acatlán de Juárez 12 440 0 0.191 84 160 97 57 29 10 1 1 1 227 212 1
3 Ahualulco de Mercado 9 402 0 0.142 57 121 107 79 29 8 1 0 0 218 184 0
4 Amacueca 6 123 1 0.098 12 29 44 21 12 3 0 0 1 66 55 2
5 Amatitán 9 296 0 0.105 31 89 82 53 28 10 2 1 0 163 133 0
6 Ameca 9 1,163 3 0.152 177 342 305 191 110 31 2 2 0 573 590 0
7 San Juanito de Escobedo 9 165 0 0.121 20 55 47 32 10 1 0 0 0 87 78 0
@basicavisual
basicavisual / README.md
Created December 5, 2015 06:41 — forked from diegovalle/README.md
Topojson of Mexican municipalities and states

How to create the topojson map:

curl -o estados.zip http://mapserver.inegi.org.mx/MGN/mge2010v5_0.zip
curl -o  municipios.zip http://mapserver.inegi.org.mx/MGN/mgm2010v5_0.zip
unzip estados.zip 
unzip municipios.zip
ogr2ogr states.shp Entidades_2010_5.shp -t_srs "+proj=longlat +ellps=WGS84 +no_defs +towgs84=0,0,0"
ogr2ogr municipalities.shp Municipios_2010_5.shp -t_srs "+proj=longlat +ellps=WGS84 +no_defs +towgs84=0,0,0"
topojson -o mx_tj.json -s 1e-7 -q 1e5 states.shp municipalities.shp -p state_code=+CVE_ENT,state_name=NOM_ENT,mun_code=+CVE_MUN,mun_name=NOM_MUN
@basicavisual
basicavisual / Accidents.csv
Created December 5, 2015 17:42 — forked from KoGor/Accidents.csv
Russia choropleth example
Rtype RegionCode RegionName CarAccidents Deaths
federation Russian Federation Российская Федерация 203597 27991
fregion RU-BEL Белгородская область 1369 285
fregion RU-BRY Брянская область 1449 238
fregion RU-VLA Владимирская область 3157 450
fregion RU-VOR Воронежская область 3920 615
fregion RU-IVA Ивановская область 2018 187
fregion RU-KLU Калужская область 2140 368
fregion RU-KOS Костромская область 873 80
fregion RU-KRS Курская область 2060 307
@basicavisual
basicavisual / index.html
Created December 5, 2015 18:29
Mexico GeoJson demo
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Entidades mexicanas.</title>
<script type="text/javascript" src="http://d3js.org/d3.v3.js"></script>
<style type="text/css">
body {
margin: 0;
background-color: #2B2B2B;
class Fiscal < ApplicationRecord
def self.search(search)
if search
where(["nombre LIKE ?", "%#{search}%"])
else
last(5)
end
end
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Sony</title>
</head>
<body>
<header>
<img src="public/logo.jpg" alt="logo" class="logo" style="width:5em;">
</header>
<!DOCTYPE html>
<html>
<head>
<link href='https://fonts.googleapis.com/css?family=Roboto:400,300,500,100' rel='stylesheet' type='text/css'>
</head>
<body>
<div class="header">
<div class="container">
<h1>Innovation Cloud</h1>