Skip to content

Commit

Permalink
reverting
Browse files Browse the repository at this point in the history
  • Loading branch information
lyzidiamond committed Oct 16, 2013
1 parent 52bda69 commit 9132e8a
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 83 deletions.
Binary file added .DS_Store
Binary file not shown.
1 change: 0 additions & 1 deletion .gitignore

This file was deleted.

13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,18 @@ Beyond that, there are two main ways to contribute to this dataset: one is to **

These are the files that are currently in the repository and can be edited:

- [pdxplaces.geojson](https://github.com/lyzidiamond/learn-geojson/blob/master/geojson/pdxplaces.geojson): Cool places in Portland (dummy dataset for practice)
- [cupcakes.geojson](https://github.com/lyzidiamond/learn-geojson/blob/master/geojson/cupcakes.geojson): Places to get cupcakes (currently only Portland)
- [hackspots.geojson](https://github.com/lyzidiamond/learn-geojson/blob/master/geojson/hackspots.geojson): Great places to hack in Portland, as dictated by [this list](https://wraithan.etherpad.mozilla.org/cafe-hacking-pdx)
- [pdxplaces.geojson](https://github.com/lyzidiamond/learn-geojson/blob/master/pdxplaces.geojson): Cool places in Portland (dummy dataset for practice)

*Note: opening files from GitHub in geojson.io is currently not working unless you are in Chrome and have the geojson.io extension. The following instructions are for Chrome users.*

1. If you haven't done so yet, get yourself a [GitHub](http://github.com) account and download [git](http://git-scm.org). (These instructions don't use git on the command line, but many of these principles can be used and mirrored with git in the command line.)
2. Download the [geojson.io Chrome extension](https://chrome.google.com/webstore/detail/geojsonio/oibjgofbhldcajfamjganpeacipebckp). This will allow you to click through directly from your GeoJSON file to geojson.io. (If you use Chrome. If not, don't worry about it.)
2. Download the [geojson.io Chrome extension](https://chrome.google.com/webstore/detail/geojsonio/oibjgofbhldcajfamjganpeacipebckp). This will allow you to click through directly from your GeoJSON file to geojson.io.
3. Once you're all logged in to your GitHub account, navigate over to the [learn-geojson](http://github.com/lyzidiamond/learn-geojson) repo and press the button at the top that says Fork. *Forking* a repo makes a copy of it that is all yours. Head on over to github.com/[yourusername]/learn-geojson. This is your copy of the repo!
4. In *your* copy, click through to the file you want to edit. You should see a nice little map showing the points in the dataset. Just for fun, click on one of the points. A popup appears with attribute information for the point! Neat, huh?
5. If you're using the Chrome extension, you will see a little button that says geojson.io. Click on it. The GeoJSON file is now open and editable in geojson.io. If you're **not** using the Chrome extension, head on over to [geojson.io](http://geojson.io). Click Open on the top, click GitHub on the top, navigate through to the GeoJSON file you want to edit, and press Open. The GeoJSON file is now open and editable in geojson.io.
5. Click the little button that says geojson.io. The GeoJSON file is now open and editable in geojson.io.
6. Add a point. Add some attributes for that point.
7. Notice that above your "attribute table" there's a little button that says "</> JSON" on it. Go ahead and click on that.
8. This is GeoJSON! Take a look at the last point in the list. It's the one you just created! Each of your attributes is in the "properties" section, and there are coordinates for where you placed the point housed in the "geometry" section. You can edit the properties and geometry directly in the GeoJSON view. If you edit the GeoJSON directly and make a mistake, use [GeoJSONLint](http://geojsonlint.com/) to find errors. What you're doing is adding some lines of code to a .geojson file! This will be important later.
8. This is GeoJSON! Take a look at the last point in the list. It's the one you just created! Each of your attributes is in the "properties" section, and there are coordinates for where you placed the point housed in the "geometry" section. So really, what you're doing is adding some lines of code to a .geojson file! This will be important later.
9. Add as many more points as you want. Seriously. Go to town.
10. When you're done adding points, click Save on the top bar. A small box appears asking for a "Commit message." Type in a short description of the points you added and press Commit.
11. Once you've done that, a little box pops up in the same area that says, "Changes committed to GitHub:" followed by a series of numbers and letters. Click on the numbers/letters.
Expand All @@ -108,4 +108,3 @@ These are the things that haven't been written/completed yet:
- Settling on a desired schema for datasets.
- A tutorial for using this data in custom maps.
- Instructions for use without the Chrome extension (waiting on geojson.io fix)
- "Help us out!" section for folks who want their geojson files to be edited/contributed to in a specific way.
2 changes: 1 addition & 1 deletion geojson/pdxplaces.geojson
Original file line number Diff line number Diff line change
@@ -1 +1 @@
"type":"FeatureCollection","features":[{"type":"Feature","properties":{"Name":"Oregon State Office Building","Contributor":"Lyzi Diamond","Reason":"Work"},"geometry":{"type":"Point","coordinates":[-122.6579761505127,45.52822320885938]}},{"type":"Feature","properties":{"Name":"Tiny's Southeast","Contributor":"Lyzi Diamond","Reason":"Favorite Coffee Shop"},"geometry":{"type":"Point","coordinates":[-122.65341103076935,45.512640029999396]}},{"type":"Feature","properties":{"Name":"First Unitarian Church","Contributor":"Lyzi Diamond","Reason":"Where I Play Handbells"},"geometry":{"type":"Point","coordinates":[-122.68582820892333,45.518188226633455]}},{"type":"Feature","properties":{"Name":"Big Arrow","Contributor":"geografa","Reason":"look!"},"geometry":{"type":"Polygon","coordinates":[[[-122.68239498138428,45.5239087616988],[-122.67308235168457,45.52378849362283],[-122.6689624786377,45.524630364755225],[-122.6736831665039,45.53052310992679],[-122.66900539398193,45.52841862894573],[-122.6581048965454,45.52234525665672],[-122.67110824584961,45.515970517182474],[-122.66836166381836,45.52234525665672],[-122.68260955810545,45.52186416944047],[-122.68239498138428,45.5239087616988]]]}},{"type":"Feature","properties":{"Name":"place 2","Contributor":"geografa","Reason":2},"geometry":{"type":"Point","coordinates":[-122.67776012420654,45.5298015824607]}}]}
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"Name":"Oregon State Office Building","Contributor":"Lyzi Diamond","Reason":"Work"},"geometry":{"type":"Point","coordinates":[-122.6579761505127,45.52822320885938]}},{"type":"Feature","properties":{"Name":"Tiny's Southeast","Contributor":"Lyzi Diamond","Reason":"Favorite Coffee Shop"},"geometry":{"type":"Point","coordinates":[-122.65341103076935,45.512640029999396]}},{"type":"Feature","properties":{"Name":"First Unitarian Church","Contributor":"Lyzi Diamond","Reason":"Where I Play Handbells"},"geometry":{"type":"Point","coordinates":[-122.68582820892333,45.518188226633455]}},{"type":"Feature","properties":{"Name":"Big Arrow","Contributor":"geografa","Reason":"look!"},"geometry":{"type":"Polygon","coordinates":[[[-122.68239498138428,45.5239087616988],[-122.67308235168457,45.52378849362283],[-122.6689624786377,45.524630364755225],[-122.6736831665039,45.53052310992679],[-122.66900539398193,45.52841862894573],[-122.6581048965454,45.52234525665672],[-122.67110824584961,45.515970517182474],[-122.66836166381836,45.52234525665672],[-122.68260955810545,45.52186416944047],[-122.68239498138428,45.5239087616988]]]}},{"type":"Feature","properties":{"Name":"place 2","Contributor":"geografa","Reason":2},"geometry":{"type":"Point","coordinates":[-122.67776012420654,45.5298015824607]}}]}
35 changes: 35 additions & 0 deletions hackspots
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"Name": "Albina Press",
"Address": "4637 N Albina Ave Portland, OR 97217",
"Notes": "usually busy, outlets on side wall only"
},
"geometry": {
"type": "Point",
"coordinates": [
-122.67516911029816,
45.55673233031101
]
}
},
{
"type": "Feature",
"properties": {
"Name": "Arbor Lodge",
"Address": "1507 N Rosa Parks Way Portland, OR 97217",
"Notes": ""
},
"geometry": {
"type": "Point",
"coordinates": [
-122.68242716789246,
45.56997505986905
]
}
}
]
}
21 changes: 12 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
<head>
<title>MaptimePDX | GeoJSON!</title>
<meta charset="utf-8">
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src='//api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.js'></script>
<link href='//api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.css' rel='stylesheet' />
<!--[if lte IE 8]>
<link href='//api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.ie.css' rel='stylesheet'>
<![endif]-->
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.ie.css" />
<![endif]-->

<!-- THIS IS WHERE WE PUT ALL THE STYLE INFO FOR THE PAGE-->
<style type="text/css">
Expand All @@ -26,12 +24,17 @@
<body>
<!-- the 'map' div is where the map content is going -->
<div id="map"></div>
<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.js"></script>
<script>
// create a map in the "map" div, set the view to a given place and zoom
var map = L.map('map').setView([45.5, -122.7], 11);

// add an OpenStreetMap tile layer
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);

// add an Mapbox tile layer
var map = L.mapbox.map('map', 'examples.map-9ijuk24y')
.setView([45.52822320885938,-122.6579761505127], 14);
// add our goejson data
$.getJSON("pdxplaces.geojson", function(data) {
var geojson = L.geoJson(data, {
Expand Down
66 changes: 1 addition & 65 deletions pdxplaces.geojson
Original file line number Diff line number Diff line change
@@ -1,65 +1 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"Name": "Oregon State Office Building",
"Contributor": "Lyzi Diamond",
"Reason": "Work"
},
"geometry": {
"type": "Point",
"coordinates": [
-122.6579761505127,
45.52822320885938
]
}
},
{
"type": "Feature",
"properties": {
"Name": "Tiny's Southeast",
"Contributor": "Lyzi Diamond",
"Reason": "Favorite Coffee Shop"
},
"geometry": {
"type": "Point",
"coordinates": [
-122.65341103076935,
45.512640029999396
]
}
},
{
"type": "Feature",
"properties": {
"Name": "First Unitarian Church",
"Contributor": "Lyzi Diamond",
"Reason": "Where I Play Handbells"
},
"geometry": {
"type": "Point",
"coordinates": [
-122.68582820892333,
45.518188226633455
]
}
},
{
"type": "Feature",
"properties": {
"Name": "Bocce Court",
"Contributor": "geografa",
"Reason": "http://https://vine.co/v/hbpVueATxIi"
},
"geometry": {
"type": "Point",
"coordinates": [
-122.6788866519928,
45.52623138848544
]
}
}
]
}
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"Name":"Oregon State Office Building","Contributor":"Lyzi Diamond","Reason":"Work"},"geometry":{"type":"Point","coordinates":[-122.6579761505127,45.52822320885938]}},{"type":"Feature","properties":{"Name":"Tiny's Southeast","Contributor":"Lyzi Diamond","Reason":"Favorite Coffee Shop"},"geometry":{"type":"Point","coordinates":[-122.65341103076935,45.512640029999396]}},{"type":"Feature","properties":{"Name":"First Unitarian Church","Contributor":"Lyzi Diamond","Reason":"Where I Play Handbells"},"geometry":{"type":"Point","coordinates":[-122.68582820892333,45.518188226633455]}}]}

0 comments on commit 9132e8a

Please sign in to comment.