Skip to content

Instantly share code, notes, and snippets.

View ccamara's full-sized avatar

Carlos Cámara ccamara

View GitHub Profile
CCAA date total
1 Andalucía 16-03-20 0
2 Andalucía 17-03-20 0
3 Andalucía 18-03-20 38
4 Andalucía 19-03-20 33
5 Andalucía 20-03-20 72
6 Andalucía 21-03-20 72
7 Andalucía 22-03-20 38
8 Aragón 16-03-20 0
9 Aragón 17-03-20 0
@ccamara
ccamara / README.md
Created June 14, 2018 11:39 — forked from jsanz/README.md
MapboxGL + OSM data

Simple script to get data (nodes and polygons separately) from OSM using Overpass API and render it on a Mapbox GL map.

This is probably a work in progress.

To do:

  • Work on having to do just a single call to the Overpass API and then split the geometries by type.
  • Better styling
  • Popups?
@ccamara
ccamara / sample-ggplot.R
Created February 28, 2017 13:10
Annotation in #R #ggplot
# Source: http://sharpsightlabs.com/blog/simple-annotate-plot-ggplot2/
ggplot(df, aes(x = Año, y = Población, group = 1)) +
geom_line(colour = "red", size = 1.5) +
geom_point(colour = "red", size = 4, shape = 21, fill = "white") +
geom_text(aes(label = Año), size = 3, hjust = 0.5, vjust = 3, position = "stack") +
scale_y_continuous(labels = function(x) format(x, big.mark = ".", scientific = FALSE)) +
ggtitle("Evolución de población en Detroit") +
labs(x = "Año", y = "Población") +
geom_vline(xintercept = 1973, linetype = "dashed") +
@ccamara
ccamara / osm-download.model
Last active June 27, 2016 16:11
Example of non-working QGIS model
{
"values": {
"inputs": {
"STRING_CITY": {
"values": {
"pos": {
"values": {
"y": 22.0,
"x": 120.0
},
@ccamara
ccamara / ediciones-usj.csl.xml
Last active August 29, 2015 14:27
Ediciones Universidad San Jorge #citation-style #zotero. Rename it to remove the xml extension and add it to your Zotero.
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="never">
<!-- This style was edited with the Visual CSL Editor (http://editor.citationstyles.org/visualEditor/) -->
<info>
<title>Ediciones Universidad San Jorge</title>
<title-short>Ediciones USJ</title-short>
<id>http://www.zotero.org/styles/ediciones-universidad-san-jorge</id>
<link rel="self" href="http://www.zotero.org/styles/ediciones-universidad-san-jorge"/>
<author>
<name>Carlos Cámara</name>
@ccamara
ccamara / urbs.csl.xml
Created April 28, 2015 06:52
URBS Revista de Estudios Urbanos y Ciencias Sociales #citation-style for #zotero
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="sort-only">
<info>
<title>URBS Journal Style (based on American Psychological Association 5th Edition)</title>
<id>http://www.zotero.org/styles/urbs</id>
<link href="http://www.zotero.org/styles/urbs" rel="self"/>
<link href="http://rdc.libguides.com/content.php?pid=63487" rel="documentation"/>
<author>
<name>Simon Kornblith</name>
<email>simon@simonster.com</email>
@ccamara
ccamara / .inputrc.sh
Last active August 29, 2015 14:16 — forked from rodrigoaguilera/gist:dc3c6d7e1c035e2b45e0
rename file to .inputrc and place it into home folder.
# Make Tab autocomplete regardless of filename case
set completion-ignore-case on
# List all matches in case multiple possible completions are possible
set show-all-if-ambiguous on
# Immediately add a trailing slash when autocompleting symlinks to directories
set mark-symlinked-directories on
# Use the text that has already been typed as the prefix for searching through
@ccamara
ccamara / mmenu-responsive.js
Last active August 29, 2015 14:13
Insert an external library to your drupal7 theme #mmenu
// We should add our js definition into our theme's js folder.
/**
* @file
* A JavaScript file for the Main Menu Responsive behaviour.
*/
(function ($, Drupal, window, document, undefined) {
"use strict";
// Reset ww value.
@ccamara
ccamara / travis.yml
Created December 21, 2014 11:02
Have Travis CI Install Drupal. Source http://dropbucket.org/node/1761 #CI
language: php
php:
- 5.3
- 5.4
- 5.5
- hhvm
matrix:
allow-failures:
@ccamara
ccamara / behat-step-defintion.yml
Created December 3, 2014 12:09
Behat available step definitions with drupal extension Behat available step definitions with drupal extension
Behat available step definitions with drupal extension
Given /^(?:that I|I) am at "(?P[^"]*)"$/
- Visit a given path, and additionally check for HTTP response code 200.
# FeatureContext::assertAtPath()
When /^I visit "(?P[^"]*)"$/
# FeatureContext::assertVisit()
When /^I click "(?P<link>[^"]*)"$/