Skip to content

Instantly share code, notes, and snippets.

View maptastik's full-sized avatar

Ryan Cooper maptastik

View GitHub Profile
@maptastik
maptastik / SphericalMercator2WGS84.arcade
Last active March 22, 2019 13:53
Arcade expressions for deriving WGS84 decimal degree coordinates
// Arcade expressions to convert point coordinates from Web Mercator to WGS84 Decimal Degrees
// Based on the LibreCalc expressions found at https://wiki.openstreetmap.org/wiki/Mercator
// Latitude
(2 * Atan(Exp(Geometry($feature).y / 6378137)) - PI / 2) / (PI / 180)
// Longitude
Geometry($feature).x / (PI / 180) / 6378137
@maptastik
maptastik / .block
Created August 15, 2018 01:39
Wix Leaflet Embed Test
license: mit
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@maptastik
maptastik / raleigh_asr.csv
Last active November 26, 2018 14:31
Location of constructed, registered cell towers in Raleigh according to the FCC as of 7/13/2018
lat lng
35.868777777771 -78.716638888888
35.722222222215 -78.651111111111
35.78833333333 -78.719999999993
35.885722222218 -78.564611111111
35.898611111107 -78.725555555548
35.787138888885 -78.72691666666
35.789194444441 -78.679027777771
35.813888888888 -78.601666666666
35.905 -78.582777777771
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@maptastik
maptastik / Raleigh_Parks.json
Last active November 26, 2018 14:35
Raleigh parks in TopoJSON format. Data from March 2018
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import arcpy
import json
import urllib
arcpy.env.overwriteOutput = True
baseURL = "http://services.gis.ca.gov/arcgis/rest/services/Environment/Wildfires/MapServer/0"
fields = "*"
out_data = "H:/cal_data/data.gdb/testdata"
# Get record extract limit
@maptastik
maptastik / AccessPoints_LOS_20180301.geojson
Last active November 26, 2018 14:38
Raleigh park Level of Service access points from March 2018. Not up to date, but potentially useful for testing purposes.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@maptastik
maptastik / esrijson.json
Last active November 26, 2018 14:40
Mostly this is an example of what ESRI JSON looks like. It is useful for comparing to GeoJSON and for testing how to pull data from this format into PostGIS or geopandas.
{
"displayFieldName": "NAME",
"fieldAliases": {
"OBJECTID": "OBJECTID",
"NAME": "NAME",
"PARK_TYPE": "PARK_TYPE",
"FILE_NUMBER": "FILE_NUMBER",
"ID_NUMBER": "ID_NUMBER",
"DEVELOPED": "DEVELOPED",
"MAP_ACRES": "MAP_ACRES",
@maptastik
maptastik / index.html
Created March 26, 2018 03:47
Esri-Leaflet Nearest Raleigh Park example
<html>
<head>
<meta charset=utf-8 />
<title>route to the closest facility</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<!-- Load Leaflet from CDN-->
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.2.0/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@1.2.0"></script>