Smathermather's Weblog

Remote Sensing, GIS, Ecology, and Oddball Techniques

Posts Tagged ‘github’

More geojson.io work– i.e. a little node and on a little ubuntu

Posted by smathermather on September 11, 2013

Continuing a previous post https://smathermather.wordpress.com/2013/08/24/a-public-sector-use-for-geojson-io/, I have been exploring the use of geojson.io for an easy to deploy way for folks to edit geojson.  For my purposes this led to a dive into node.

Getting node to run well on ubuntu is not as easy as:

sudo apt-get install node

Nope, tried that. Better to use/get a newer version of node. For this we turn to PPAs (Personal Package Archives).

Install Node:

sudo apt-get install g++ curl libssl-dev apache2-utils
sudo apt-get install git-core
sudo apt-get install python-software-properties python g++ make
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs

Now get our geojson.io:

git clone git://github.com/mapbox/geojson.io
cd geojson.io

Now we need to leverage nodes package management. geojson.io comes with a “shrinkwrap” file called package.json which tells the package manager the dependencies. thus the install command is simple:

sudo npm install 

Don’t use the -g flag above– the makefile expects relative paths for the dependencies.

Then we use make to minify the javascript, etc:

make 

and serve with ahem serve:

sudo npm install -g serve 

Now we can run a quick test of it served up using serve

sudo serve -p 80 

A deeper dive will customize this for our launch, but this is enough to test the basic frameworks for getting geojson.io running.

Extra note– as far as I can tell, there’s some Jekyll magic going on too, so it maybe simple to post this on github as well.

Anyone gotten any further with this? Any tips and tricks?

Posted in Formats, GeoJSON, github, Governance | Tagged: , , , | Leave a Comment »

A public sector use for geojson.io

Posted by smathermather on August 24, 2013

Sitting in a meeting Friday, I was struck with a problem that needed solved quickly: we have a land cover classification being done by a third party for which we will have a team of more than a dozen entities doing some validation of the data.  We could print out paper maps for them, but that seems labor intensive and expensive.  So, I proposed we put together a site that allows each entity to go through each of the validation points one-by-one and populate the human-interpreted classification for each.

The twist in the problem space is this– we have less than a week to deploy the solution, it needs to have authentication baked in, and it needs to be easy to use.

Enter geojson.io, “A fast, simple tool to create, change, and publish maps”.  I’ll say.  Let me walk you through.  First, we can choose to login using github, so authentication is baked in.

geojson.ioWhen I use this for the project, I’ll have a geojson GIST ready to go, but for demonstration purposes, I can just drop points using the “Draw a marker” tool.

After adding the points, I can add fields to my table.  That should probably be in quotes– this is JSON, so there are only key value pairs, no table per se, but it’s quite nice that the interface treats it as a table with nulls when a column is added.

Adding a field.

Adding a field.

Now, we’ll populate that id field.  So far I’m manually constructing the dataset, but what will happen in the final version is that I’ll generate a GRTS drop for the even “random” sampling goodness that comes with that approach.  I’ll do that in R, output as shape, translate to GeoJSON, and upload… .  But in the mean time, let’s add a column for identifying land cover:

Screen shot 2013-08-24 at 10.16.07 AM

Now I can send my GeoJSON to my end user, and have her click in each of the points, zoom in to identify what she sees, and code it in the land cover column, and then share it back with me.

Evaluation StepAs a bonus, we’ll get a few more folks working in the public sector their first experiences working on GitHub.  Thanks to MapBox and GitHub for their great tools.

Now I just need to clone, host, and change out the base layer in the project with a leaf-on aerial… .  Hopefully that’s as smooth a process.

Posted in github, Governance | Tagged: , , , | Leave a Comment »

GitHub Art — Life in Development

Posted by smathermather on July 28, 2013

Ok, all playing done.  If github validates my life in the development community, I can think of no better approach.  https://github.com/smathermather

Screen shot 2013-07-28 at 12.00.01 PM

Posted in github | Tagged: | Leave a Comment »

GitHub Art — Solution found

Posted by smathermather on July 28, 2013

Thanks for the comment on the last post, Darvey.  Per the comment, this problem space is well occupied by gitfiti, a python library for putting graffitti into your commit history, ala:

Nice work Eric Romano.  Now I have Super Mario music stuck in my head… .

Posted in github | Tagged: | 1 Comment »

GitHub Art

Posted by smathermather on July 26, 2013

I’m thinking about drawing things in GitHub’s contribution section– maybe only uploading on certain days in order to draw or write in big green pixels. Anyone done this? The slate’s almost blank for me– seems a good opportunity to start.

Screen shot 2013-07-26 at 9.21.22 PM

—–Update—–

Been done, thanks Craig Williams:

Screen shot 2013-07-26 at 9.31.50 PM

Posted in github | Tagged: | 3 Comments »