This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Add US County data to Postgis w/ GIST index | |
curl https://www2.census.gov/geo/tiger/TIGER2019/COUNTY/tl_2019_us_county.zip --output tl_2019_us_county.zip | |
mkdir tl_2019_us_county | |
unzip tl_2019_us_county.zip -d tl_2019_us_county | |
shp2pgsql tl_2019_us_county/tl_2019_us_county.shp tl_2019_us_county | psql -d gis_db | |
psql -d gis_db -c "CREATE INDEX tl_2019_us_county_geom_gix ON tl_2019_us_county USING GIST (geom)" | |
# Add Hurricane Sandy Radii data to Postgis w/ GIST index |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
createdb gis_db | |
psql -d gis_db -c "CREATE EXTENSION postgis" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
createdb gis_db | |
psql -d gis_db -c "CREATE EXTENSION postgis" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global with sharing class EventController { | |
public String accountId {get; set;} | |
public EventController() {} | |
@RemoteAction | |
global static List<Event> findEvents(String accountId) { | |
return [SELECT Type, CreatedDate, Id from Events WHERE WhoId =:accountId]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Staging Branch | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<svg width="100%" height="100%"> | |
<defs> | |
<mask | |
id='mask-for-area-chart' | |
maskUnits="userSpaceOnUse" | |
maskContentUnits="userSpaceOnUse"> | |
<path d="M0Z" style="fill: white;"> | |
</path> | |
</g> | |
</mask> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const calculateLayout = (items, spacing = 0.01) => { | |
// Calculate a force directed placement for each point | |
const MAX_STEPS = 300, | |
STRENGTH = 10, | |
ALPHA = 0.3; | |
if (!items.length) return []; | |
const getY = d => d.y; | |
const getX = d => d.x; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {quadtree as d3_quadtree} from "d3-quadtree"; | |
import {search} from "search.js"; | |
// ... | |
// Create cluster points, i.e. an array of: | |
// [[cluster_x, cluster_y, [points_to_cluster], ...] | |
const nodes = [[0, 0, {id: 1, r: 10, name: "node-1"}], [10, 10, {id: 2, r: 10, name: "node-2"}]]; | |
const clusterRange = 80; | |
const quadtree = d3_quadtree().addAll(nodes); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<svg:circle [attr.r.px]="item.r" | |
[ngClass]="'marker'" | |
[appSvgTransition]="transition" | |
[d3-attr]="{cx: item.x, cy: item.y}"> | |
</svg:circle> |