Skip to content

Instantly share code, notes, and snippets.

View numeroteca's full-sized avatar

numeroteca numeroteca

View GitHub Profile
@numeroteca
numeroteca / network.py
Last active May 17, 2021 10:36
minor changes to adapt network.py to v2 API for twarc2. See https://github.com/DocNow/twarc/issues/461
#!/usr/bin/env python
# build a reply, quote, retweet network from a file of tweets and write it
# out as a gexf, dot, json or html file. You will need to have networkx
# installed and pydotplus if you want to use dot. The html presentation
# uses d3 to display the network graph in your browser.
#
# ./network.py tweets.jsonl network.html
#
# or
@numeroteca
numeroteca / .block
Last active December 4, 2018 13:13
Cartograma: VUT por 100 viviendas (vivienda uso turístico) en Donostia. Septiembre 2018
license: gpl-3.0
height: 960
scrolling: no
border: no
@numeroteca
numeroteca / DatoEducacion.py
Created October 3, 2018 21:57
Twitter bot to post tweets based on existing csv DataEducation.bot
#!/usr/bin/python2.7
# -*- coding: utf-8 -*-
#Load required modules
import twitter
import csv
from datetime import datetime
#from time import sleep
import time
from dateutil.relativedelta import relativedelta
@numeroteca
numeroteca / analisis.R
Created June 19, 2018 23:21
Calculate Gorard index. IMPORTANTE: se usan valores ficticios generados aleatoriamente para cada centro y etapa escolar.
# load library
library(tidyverse)
data <- read.csv("centros-escolares-euskadi-valores-aleatorios.csv", sep = "," )
# -----------Calcula índice de Gorard por municipio -----------
# Unmelt data to make it easier for segregation index calculation. Based sonÑ
# https://ojs.uv.es/index.php/RASE/article/view/10129/10853
# http://journals.sagepub.com/doi/abs/10.1177/003803850203600405
@numeroteca
numeroteca / .block
Last active June 19, 2018 11:52
Small multiple maps with interactive regions in Bilbao school zones
license: gpl-3.0
height: 950
scrolling: no
border: no
@numeroteca
numeroteca / .block
Created January 20, 2018 17:51
Cartogram: percentage of foreigners in school zones in Euskadi
license: gpl-3.0
height: 510
scrolling: no
border: no
@numeroteca
numeroteca / .block
Last active June 19, 2018 11:55
Small multiple maps with interactive regions. Euskadi school zones
license: gpl-3.0
height: 950
scrolling: no
border: no
@numeroteca
numeroteca / .block
Last active January 19, 2018 23:16
Simple map of Euskadi shchool zones with topojson and interactivity
license: gpl-3.0
height: 500
scrolling: no
border: no
@numeroteca
numeroteca / kiosko-newspaper-names
Created June 22, 2012 05:41
Script by rporres (https://metacpan.org/author/RPORRES) for getting Newspaper names and countries from Kiosko.net
#to use it write "$ ./parse_kiosko.pl <lang>" where 'lang' is the language: en, es or fr
#it will output a csv. see example at http://brownbag.me:9001/p/pageonex-kiosko-newspaper-names
#!/usr/bin/env perl
use strict;
use warnings;
use utf8;
use LWP::UserAgent;
use HTML::TreeBuilder 5 -weak;