Skip to content

Instantly share code, notes, and snippets.

View d-qn's full-sized avatar

Duc-Quang Nguyen d-qn

View GitHub Profile
qId qValue qValidVote ofsID muniName category value med wMean med_all wMean_all
1 44.640998959 961 1 Aeugst am Albis Régions linguistiques (Régions linguistiques 2020) Allemand 50.717154332 52.190195369355045 56.370357923 58.27499414552737
2 52.036516854 4292 2 Affoltern am Albis Régions linguistiques (Régions linguistiques 2020) Allemand 50.717154332 52.190195369355045 56.370357923 58.27499414552737
3 48.541009464 2548 3 Bonstetten Régions linguistiques (Régions linguistiques 2020) Allemand 50.717154332 52.190195369355045 56.370357923 58.27499414552737
4 49.970674487 1715 4 Hausen am Albis Régions linguistiques (Régions linguistiques 2020) Allemand 50.717154332 52.190195369355045 56.370357923 58.27499414552737
5 50.285388128 1759 5 Hedingen Régions linguistiques (Régions linguistiques 2020) Allemand 50.717154332 52.190195369355045 56.370357923 58.27499414552737
6 40.449438202 535 6 Kappel am Albis Régions linguistiques (Régions linguistiques 2020) Allemand 50.717154332 52.190195369355045 56.370357923 58.2749
@d-qn
d-qn / index.html
Created October 11, 2021 17:43
Style Guide Template
<!-- you can put some webfonts here if you want -->
<link href='https://fonts.googleapis.com/css?family=Josefin+Slab:100,300,400,600,700' rel='stylesheet' type='text/css'>
<!-- change these titles to match your project -->
<div id="templateTitle">
<span id="projectTitle">Project Title</span> <br/>
<span id="projectDesc">This is a description</span>
<div class="seperator"></div>
</div>
@d-qn
d-qn / lausanne_OSM_city_map.R
Last active October 15, 2020 16:45
Make a minimal arty city map with R and openstreetmap data
library(tidyverse)
library(sf)
library(osmdata) # to get openstreetmap geo data
# settings
bb <- getbb('Lausanne, Switzerland') # define the bbox, will be used to fetch OSM data within that box
dest_proj <- 2056
# OSM overpass query
q <- opq(bbox = bb)
@d-qn
d-qn / keybase.md
Last active September 23, 2015 19:29

Keybase proof

I hereby claim:

  • I am d-qn on github.
  • I am duc (https://keybase.io/duc) on keybase.
  • I have a public key whose fingerprint is 8D22 DA25 F4C9 C516 3B6C 68C0 62DF 32AB 0553 D36C

To claim this, I am signing this object:

@d-qn
d-qn / code.R
Created October 22, 2013 21:59 — forked from ramnathv/code.R
# read data and replace dots in names with underscores
obesity = read.csv(
'http://www.stat.berkeley.edu/classes/s133/data/obesity.csv',
stringsAsFactors = F
)
names(obesity) = gsub("\\.", "_", names(obesity))
# add column with two letter state names and
obesity = plyr::mutate(obesity,
State = str_trim(State),
@d-qn
d-qn / index.html
Created August 11, 2013 14:24
Films since 2011: rating vs profitability
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<script src='http://code.jquery.com/jquery-1.9.1.min.js' type='text/javascript'></script>
<script src='http://code.highcharts.com/highcharts.js' type='text/javascript'></script>
<script src='http://code.highcharts.com/highcharts-more.js' type='text/javascript'></script>
<style>
@d-qn
d-qn / index.html
Created August 11, 2013 13:55
Films since 2011: rating vs profitability
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<script src='http://code.jquery.com/jquery-1.9.1.min.js' type='text/javascript'></script>
<script src='http://code.highcharts.com/highcharts.js' type='text/javascript'></script>
<script src='http://code.highcharts.com/highcharts-more.js' type='text/javascript'></script>
<style>
@d-qn
d-qn / index.html
Created August 10, 2013 22:58
FilmProfitabilityVsRatings
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<script src='http://code.jquery.com/jquery-1.9.1.min.js' type='text/javascript'></script>
<script src='http://code.highcharts.com/highcharts.js' type='text/javascript'></script>
<script src='http://code.highcharts.com/highcharts-more.js' type='text/javascript'></script>
<style>
@d-qn
d-qn / index.html
Created August 10, 2013 22:50
FilmProfitabilityVsRatings
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<script src='http://code.jquery.com/jquery-1.9.1.min.js' type='text/javascript'></script>
<script src='http://code.highcharts.com/highcharts.js' type='text/javascript'></script>
<script src='http://code.highcharts.com/highcharts-more.js' type='text/javascript'></script>
<style>
@d-qn
d-qn / index.html
Created August 10, 2013 17:17
FilmProfitabilityVsRatings
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<script src='http://code.jquery.com/jquery-1.9.1.min.js' type='text/javascript'></script>
<script src='http://code.highcharts.com/highcharts.js' type='text/javascript'></script>
<script src='http://code.highcharts.com/highcharts-more.js' type='text/javascript'></script>
<style>