A la proyección mercator es necesario ajustarle 2°por la deformación existente el la parte sur de la Argentina.
// Sample use: node extractFeatures.js argentina.json "properties.is_in:state.toLowerCase() === 'buenos Aires'" > buenos_aires.json | |
var path = require('path'), | |
origin = require(path.resolve(__dirname, process.argv[2])), | |
selector = process.argv[3], | |
destination = { | |
"type": "FeatureCollection", | |
"features": [] | |
}, | |
i=0; |
// Sample use: node mergeFeatures.js argentina.json buenos_aires.json > argentina_merged.json | |
var origin1 = require(path.resolve(__dirname, process.argv[2])), | |
origin2 = require(path.resolve(__dirname, process.argv[3])), | |
destination = { | |
"type": "FeatureCollection", | |
"features": [] | |
}; | |
destination.features = origin1.features.concat(origin2.features); |
Con el fin de reducir las deformaciones en el sentido Este-Oeste a valores insensibles a los usos cartográficos de precisión, Krüger redujo el ancho de las fajas a 3° de longitud (1° 30’ a la izquierda y 1° 30’ a la derecha del meridiano central de cada faja)y para esos meridianos centrales eligió aquellos cuyos números de grados son múltiples de 3° de longitud. En el caso de la República Argentina, los meridianos centrales tienen los siguientes valores: -72°, -69°, -66°, -63°, -60°,-57° y -54°.
Modified version of mbostock's scatterplot to support filtering by labels
Modified version of mbostock's scatterplot to support toggle on/off data by labels
Modified and working version of John Berryman's attempt to add templating to d3.js using ICanHaz.js and innersvg polyfill. Solved based on this stackoverflow.com answers
D3.js
templating test based on my previous solution of John Berryman's attempt.
ICahnHaz.js
uses <script></script>
and I preffer the idea of Eric Bidelman.
The <template>
element is currently supported in Chrome, Firefox and Opera (15+)for now.
Because the use of innerHTML
run-time string parsing of user-supplied data can easily lead to XSS vulnerabilities and isn't supported by SVGElement
, I use now XMLSerializer()
and DOMParser()
to inject the templates into the DOM.
The callTemplate
function uses querySelector
and isn't limitted to Mustache
.
D3.js
templating test based on my previous solution of John Berryman's attempt.
The HTMLTemplateElement
is currently supported in Chrome, Firefox and Opera (15+) for now. See Eric Bidelman HTMLTemplateElement tuturial
I change the idea of use HTMLTemplateElement.content
because is only supported by 3 browsers . I'm using HTMLElement.innerHTML
to read the template content and DOMParser()
to inject the result into the DOM.
To hide the content of <template> (HTMLUnknownElement)
on other browsers (Safari, IE, etc) I add a CSS rule with display:none
. On browsers that support HTMLTemplateElement
the <script>
isn't fired when the browser parse the document, but is different on HTMLUnknownElement
s. If someone know how to break the script execution on HTMLUnknownElement
s please send me a tweet @baldpower
[Fork me
country_name,country_code,grupo,porc_1990,porc_1991,porc_1992,porc_1993,porc_1994,porc_1995,porc_1996,porc_1997,porc_1998,porc_1999,porc_2000,porc_2001,porc_2002,porc_2003,porc_2004,porc_2005,porc_2006,porc_2007,porc_2008,porc_2009,porc_2010,porc_2011,porc_2012,porc_2013,km2_1961,km2_1962,km2_1963,km2_1964,km2_1965,km2_1966,km2_1967,km2_1968,km2_1969,km2_1970,km2_1971,km2_1972,km2_1973,km2_1974,km2_1975,km2_1976,km2_1977,km2_1978,km2_1979,km2_1980,km2_1981,km2_1982,km2_1983,km2_1984,km2_1985,km2_1986,km2_1987,km2_1988,km2_1989,km2_1990,km2_1991,km2_1992,km2_1993,km2_1994,km2_1995,km2_1996,km2_1997,km2_1998,km2_1999,km2_2000,km2_2001,km2_2002,km2_2003,km2_2004,km2_2005,km2_2006,km2_2007,km2_2008,km2_2009,km2_2010,km2_2011,km2_2012,km2_2013,km2_2014 | |
Afganistán,AFG,0,2.067824648,2.067824648,2.067824648,2.067824648,2.067824648,2.067824648,2.067824648,2.067824648,2.067824648,2.067824648,2.067824648,2.067824648,2.067824648,2.067824648,2.067824648,2.067824648,2.067824648,2.067824648,2.067824648,2.067824648,2.0678246 |