This file contains hidden or 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
| ### A Pluto.jl notebook ### | |
| # v0.19.15 | |
| using Markdown | |
| using InteractiveUtils | |
| # ╔═╡ 2af94a73-953b-4e45-9b09-e6e95bb7eced | |
| using Dates | |
| # ╔═╡ cbc821e3-e405-4479-9284-119f6382e6b0 |
This file contains hidden or 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
| ### A Pluto.jl notebook ### | |
| # v0.17.3 | |
| using Markdown | |
| using InteractiveUtils | |
| # ╔═╡ 1cf23ca6-7523-11ec-3a39-4db74b5a3050 | |
| begin | |
| using WGLMakie | |
| import JSServe |
This file contains hidden or 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
| ### A Pluto.jl notebook ### | |
| # v0.12.18 | |
| using Markdown | |
| using InteractiveUtils | |
| # ╔═╡ da555184-53f0-11eb-3d52-378fc5a3ae93 | |
| begin | |
| using Pkg | |
| Pkg.activate(temp=true) |
This file contains hidden or 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
| ### A Pluto.jl notebook ### | |
| # v0.12.4 | |
| using Markdown | |
| using InteractiveUtils | |
| # ╔═╡ 9dc3d954-16b3-11eb-2402-c7f683027456 | |
| begin | |
| using Pkg: Pkg, @pkg_str | |
| Pkg.activate(mktempdir()) |
This file contains hidden or 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
| using Pkg | |
| pkg"activate polygons" | |
| pkg"add Shapefile#sd/geometrybasics" | |
| pkg"add AbstractPlotting#sd/geom_merge" | |
| pkg"add GeometryBasics#sd/polygons" | |
| pkg"add GLMakie CairoMakie" | |
| using Shapefile | |
| using AbstractPlotting, GLMakie | |
| #using CairoMakie |
This file contains hidden or 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
| using Shapefile | |
| using DataFrames, Missings | |
| using Underscores | |
| import Plots | |
| url_gadm = "https://biogeo.ucdavis.edu/data/gadm3.6/shp/gadm36_DEU_shp.zip" | |
| zip_archive = download(url_gadm) # 29 MB | |
| dir = mktempdir() | |
| run(`unzip $zip_archive -d $dir`) |
This file contains hidden or 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
| library("haven") | |
| library("data.table") | |
| #library("ggplot2") | |
| wd <- getwd() | |
| #setwd("scf-data") | |
| #setwd(wd) | |
| ### SCF 1989--2016 | |
| scf89 <- read_dta("raw-data-2018/rscfp1989.dta") | |
| scf92 <- read_dta("raw-data-2018/rscfp1992.dta") | |
| scf95 <- read_dta("raw-data-2018/rscfp1995.dta") |
This file contains hidden or 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
| using HTTP | |
| using Dates | |
| using Printf | |
| using JSON | |
| using DataFrames | |
| using CSV | |
| hbf_location = "53.5527704,10.0065856" |
This file contains hidden or 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
| using Parameters | |
| type Par{T <: Real} | |
| α::T | |
| β::T | |
| end | |
| ### Implementation 1: unpack in outer function | |
| function f1(x::T, y::T, α::T, β::T) where T <: Real | |
| x^α * y^β |