Skip to content

Instantly share code, notes, and snippets.

Zev Ross zross

View GitHub Profile
View anacod_w_pop.json
[{
"id": 1,
"sex_code": 1,
"mortality_death_age": [{
"mortality_death_age_id": 1,
"death_age": "death_age_00",
"death_num": "995"
}, {
"mortality_death_age_id": 2,
"death_age": "death_age_01",
View ngx-charts-linedata-example.json
[
{
"name": "Germany",
"series": [
{
"name": "2010",
"value": 7300000
},
{
"name": "2011",
View anacod2.json
[{
"name": "death_age_95",
"series": [{
"name": "Females",
"value": -6517
}, {
"name": "Males",
"value": 1891
}]
}, {
View anacod.json
[{
"results": [{
"name": "death_age_95",
"series": [{
"name": "Females",
"value": 6517
}, {
"name": "Males",
"value": 1891
}]
@zross
zross / scrape_spatial.R
Created Apr 30, 2019
For getting download counts for spatial packages
View scrape_spatial.R
# Grab the list of spatial packages from the R Task View (Bivand)
# and get the count of monthly downloads
library(rvest)
library(dplyr)
spatial_task_view <- read_html("https://cran.r-project.org/web/views/Spatial.html")
res <- spatial_task_view %>%
html_nodes(xpath = "/html/body/ul[1]") %>%
html_children() %>%
@zross
zross / spatial_example.R
Last active Mar 19, 2018
Spatial analysis with R
View spatial_example.R
# An example of spatial analysis with R that involves grabbing data
# from a PostGIS database, joining to tabular data, projecting
# simplifying and creating an interactive map.
# This data is publicly available but requires some processing
# if you want the county boundaries you can find them here:
# cftp://ftp2.census.gov/geo/tiger/TIGER2016/COUNTY/
# The tabular data requires some processing but the raw data
@zross
zross / nested_for_loops.R
Created Dec 15, 2017
Testing nested for loops with foreach
View nested_for_loops.R
# The idea I'm trying to test is if I can nest a parallel
# for loop inside another parallel for loop.
# The following does open up 4 cores with the first loop
# and opens an additional 3 cores with the second. I see
# seven running at one time, the four are turned off then
# 3 are turned off.
# I'm not sure if this is truly 7 parallel cores or if it's
# 4 then 3 sequentially.
@zross
zross / non-gis-y-webmapping.md
Last active Feb 8, 2019
Web mapping applications with multiple layers
View non-gis-y-webmapping.md

Suggestions from Twitter for more "elegant" web mapping applications

Specifically I'm looking for web mapping applications that include multiple layers and don't look like an ArcGIS clone -- perhaps something that looks like it was designed by a designer rather than a GIS tech :) This is a list of responses from Twitter, many of which do look GIS-y so more suggestions are welcome...

@zross
zross / markdown_style.css
Created Sep 21, 2017
markdown_style.css
View markdown_style.css
body{
color:red;
}
You can’t perform that action at this time.