Skip to content

Instantly share code, notes, and snippets.

🌳

Andy Eschbacher andy-esch

🌳
Block or report user

Report or block andy-esch

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@andy-esch
andy-esch / odsc-east-mini-tutorial.md
Created Mar 6, 2019
Maps & Machine Learning: Maps & Machine Learning: Best Practices for Great Cartography in Data Science
View odsc-east-mini-tutorial.md

ODSC East (Boston) - 2019

Making good maps in data science is hard. Maps are another form of data visualization with its own set of design principles to bring out the story in the data. Data scientists need for maps varies, but a very common use case is to quickly generate a data visualization iteratively to better understand model outputs, spatial variations in the data, and more.

In this mini-tutorial, I will cover best practices for data scientists needing maps -- ideas pulled from cartography and honed over the years working in the intersection of open source GIS and data science. Using open source tools, I will show how to make patterns more apparent, how to build interactive maps so that it is easier to explore data on larger and smaller scales, and some list some cartographic tips and tricks. The goal is that data viz with maps will be made easier so that you can think about your data science problems instead of worrying about visualizing data on a map.

@andy-esch
andy-esch / index.html
Created Oct 16, 2018
carto vl with legends for cartoframes
View index.html
<!DOCTYPE html>
<html>
<head>
<title>CARTO VL + CARTOframes</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8">
<!-- Include CARTO VL JS -->
<script src="https://cartodb.github.io/carto-vl/dist/carto-vl.js"></script>
<!-- Include Mapbox GL JS -->
<script src="https://cartodb-libs.global.ssl.fastly.net/mapbox-gl/v0.48.0-carto1/mapbox-gl.js"></script>
View branca experiments.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andy-esch
andy-esch / index.html
Last active Jun 25, 2019
moran's i scatter plot
View index.html
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<style>
body {
font: 10px sans-serif;
}
.axis path,
@andy-esch
andy-esch / do-geom-specification.sql
Created Nov 9, 2017
Prototype function for metadata-returning object for cartoframes data_discovery
View do-geom-specification.sql
with envelope as (
SELECT
ST_SetSRID(ST_Extent(the_geom), 4326) as env,
count(*)::int as cnt
FROM
eschbacher.mexican_states
),
numers as (
SELECT
unnest(Array['mx.inegi.entidad', 'mx.inegi.localidad_urbana_y_rural_amanzanada']::text[]) as geom_id,
@andy-esch
andy-esch / updates.py
Created Oct 25, 2017
prototype function / class from v0.0001 cartoframes
View updates.py
"""Class for updating a cartoframe postgres table"""
class SQL(object):
"""class for building queries for syncing"""
def __init__(self, cartoframe):
""""""
self.cframe = cartoframe
def add_cols(self):
"""prototype methods for add columns to table/dataframe"""
@andy-esch
andy-esch / sva-oct-19-2017.md
Created Oct 19, 2017
CARTO at SVA - Oct 19, 2017
View sva-oct-19-2017.md
@andy-esch
andy-esch / index.html
Last active Mar 15, 2017
cartoframes html asset
View index.html
<!DOCTYPE html>
<html>
<head>
<title>cartoframes</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<link rel="shortcut icon" href="http://cartodb.com/assets/favicon.ico" />
<!-- Map takes up full browser window -->
<style>
@andy-esch
andy-esch / NYC Data Sci -- Feb 7, 2017.md
Last active Feb 7, 2017
NYC Data Science Academy -- Feb 7, 2017
View NYC Data Sci -- Feb 7, 2017.md
@andy-esch
andy-esch / make_query.py
Last active Dec 14, 2016
mortality data parsing
View make_query.py
spans = ['1', '100+', '10-14', '1-4', '15-19', '20-24', '25-29', '30-34',
'35-39', '40-44', '45-49', '50-54', '55-59', '5-9', '60-64',
'65-69', '70-74', '75-79', '80-84', '85-89', '90-94', '95-99']
genders = ['Male', 'Female']
# max(deaths) FILTER (WHERE gender = 'Female' AND five_year_age_groups_code = '35-39') As women_35_39_deaths
You can’t perform that action at this time.