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
function fetchRecords() { | |
var formId = "a8245687-0373-432e-98a2-b53074708ac9"; | |
var response = "https://api.fulcrumapp.com/api/v2/records.json?form_id=" + formId + "&token=" + fulcrumAPIkey; | |
var options = { | |
"method": "GET", | |
"contentType": "application/json" | |
}; | |
var recordJSON = UrlFetchApp.fetch(response, options); | |
var records = JSON.parse(recordJSON).records; | |
loopThrough(records); |
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
var sample = $sample_size; | |
var zones = [ | |
{"sample":"2", "critical":0}, | |
{"sample":"3", "critical":0}, | |
{"sample":"5", "critical":0}, | |
{"sample":"8", "critical":1}, | |
{"sample":"13", "critical":1}, | |
{"sample":"20", "critical":2}, | |
{"sample":"32", "critical":3}, |
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
var fulcrumAPIkey = -----; | |
function updateField (recordID) { | |
var url = "https://api.fulcrumapp.com/api/v2/records/" + recordID + ".json?token="+fulcrumAPIkey; | |
var options = { | |
"method": "GET", | |
"contentType": "application/json" | |
}; | |
var recordJSON = UrlFetchApp.fetch(url, options); |
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 csv | |
from fulcrum import Fulcrum | |
from fulcrum.exceptions import NotFoundException | |
api_key = 'your-api-key' | |
form_id = 'your-form-id' | |
fulcrum = Fulcrum(key=api_key) | |
updates = csv.reader(open('record-updates.csv'), delimiter=',') | |
# skip header |
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
cat projects.csv | while read -r line; do curl -s -XPOST -H "X-ApiToken: 6427aa7a24d47a643d01601ec1dfebf3c27d624de30e9df27cb86fb4de6289eaf814b06aed5ec402" -H "Content-Type: application/json" -d "{\"project\": {\"name\": \"$(echo $line | cut -d, -f1)\"}}" https://api.fulcrumapp.com/api/v2/projects.json; done |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Simple Leaflet Map</title> | |
<meta charset="utf-8" /> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css" /> | |
</head> | |
<body> | |
<div id="map" style="width: 1100px; height: 800px"></div> | |
<script src="http://cdn.leafletjs.com/leaflet-0.7/leaflet.js"></script> |
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
// create an array of folders you would like to cd into | |
dirs=(dir1 dir2 dir3 dir4) | |
// create a function that takes all of the shapefile in the folder and converts them to geojson (sharing same name) | |
function shp2geojson() { | |
ogr2ogr -f GeoJSON -t_srs crs:84 "$1.geojson" "$1.shp" | |
} | |
// create a loop to go into the folder, convert to geojson and cd out | |
for dir in "${dirs[@]}"; do |
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
var NPMap = { | |
baseLayers: [ | |
"nps-parkTiles" | |
], | |
"center": { | |
lat: 36.70806354647625, | |
lng: -118.46145629882811 | |
}, | |
description: "Wilderness Character Rasters", | |
div: "map", |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<response> | |
<feedMessageResponse> | |
<count>10</count> | |
<feed> | |
<id>03XHH0sPyTiYUsYD2TVJ4q7CzEH89HBhG</id> | |
<name>OneAtATime</name> | |
<description>OneAtATime</description> | |
<status>ACTIVE</status> | |
<usage>0</usage> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<div id="map" style="height:500px;width:500px;"> | |
</div> | |
<script> | |
var App, NPMap; |