Skip to content

Commit b4fcd16

Browse files
committed
regular updates
1 parent de06cbf commit b4fcd16

20 files changed

+9328
-8510
lines changed

.DS_Store

0 Bytes
Binary file not shown.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ dist/
1414
downloads/
1515
eggs/
1616
.eggs/
17-
lib/
1817
lib64/
1918
parts/
2019
sdist/

_config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
theme: jekyll-theme-cayman
2+
title: GeoSpatial Analysis Collections

_includes/.DS_Store

6 KB
Binary file not shown.

_includes/lib/mathjax.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" type="text/javascript"></script>

_layouts/default.html

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<!DOCTYPE html>
2+
<html lang="{{ site.lang | default: "en-US" }}">
3+
<head>
4+
<meta charset="UTF-8">
5+
6+
{% seo %}
7+
<link rel="preconnect" href="https://fonts.gstatic.com">
8+
<link rel="preload" href="https://fonts.googleapis.com/css?family=Open+Sans:400,700&display=swap" as="style" type="text/css" crossorigin>
9+
<meta name="viewport" content="width=device-width, initial-scale=1">
10+
<meta name="theme-color" content="#157878">
11+
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
12+
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
13+
{% include head-custom.html %}
14+
{% include lib/mathjax.html %}
15+
</head>
16+
<body>
17+
<a id="skip-to-content" href="#content">Skip to the content.</a>
18+
19+
<header class="page-header" role="banner">
20+
<h1 class="project-name">GeoSpatial Analysis Collections</h1>
21+
</header>
22+
23+
<main id="content" class="main-content" role="main">
24+
{{ content }}
25+
26+
<footer class="site-footer">
27+
{% if site.github.is_project_page %}
28+
<span class="site-footer-owner"> Maintained by Charlie Zhang </span>
29+
{% endif %}
30+
</footer>
31+
</main>
32+
</body>
33+
</html>

assets/css/style.scss

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
---
3+
4+
@import "{{ site.theme }}";
5+
6+
7+
.page-header {
8+
color: $header-heading-color;
9+
text-align: center;
10+
background-color: #DE2910;
11+
background-image: url("data/ccp.png");
12+
}
13+
14+
.main-content {
15+
h1,
16+
h2,
17+
h3,
18+
h4,
19+
h5,
20+
h6 {
21+
margin-top: 2rem;
22+
margin-bottom: 1rem;
23+
font-weight: normal;
24+
color: #041E42;
25+
}
26+
}
27+
28+
body {
29+
padding: 0;
30+
margin: 0;
31+
font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
32+
font-size: 16px;
33+
text-align: justify;
34+
line-height: 1.5;
35+
color: #191919;
36+
}
37+
38+
figcaption {
39+
color: #191919;
40+
font-size: 14px;
41+
font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
42+
font-style: italic;
43+
padding: 2px;
44+
text-align: center;
45+
line-height: normal;
46+
width: 100%;
47+
}

index.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
title: Geospatial Analysis
3+
author: Charlie Zhang
4+
layout: default
5+
---
6+
7+
## Python Packages and APIs
8+
9+
* [GeoPandas](https://nbviewer.org/github/ccxzhang/GeoSpatialAnalysis/blob/main/python/0.1.geopandas.ipynb) with Contextily
10+
11+
* [Rasterio/Xarray](https://nbviewer.org/github/ccxzhang/GeoSpatialAnalysis/blob/main/python/0.2.rasterio.ipynb)
12+
13+
* Google Earth Engine
14+
* [DMSP](https://nbviewer.org/github/ccxzhang/GeoSpatialAnalysis/blob/main/python/0.3.1.gee_dmsp.ipynb)
15+
16+
* [LANDSAT](https://nbviewer.org/github/ccxzhang/GeoSpatialAnalysis/blob/main/python/0.3.gee_landsat.ipynb)
17+
18+
* [OpenStreetMap/OSMNX](https://nbviewer.org/github/ccxzhang/GeoSpatialAnalysis/blob/main/python/0.4.osm.ipynb)
19+
20+
* [NetworkX](https://nbviewer.org/github/ccxzhang/GeoSpatialAnalysis/blob/main/python/other-networkx.ipynb)
21+
22+
* [H3](https://nbviewer.org/github/ccxzhang/GeoSpatialAnalysis/blob/main/python/0.5.h3-py.ipynb)
23+
24+
## Javascript Scripts and APIs
25+
26+
* Google Earth Engine
27+
* [LANDSAT](/js/landsat_ndvi.js)
28+
29+
* Leaflet
30+
31+
## Open Data
32+
33+
* [Google Buildings](https://nbviewer.org/github/ccxzhang/GeoSpatialAnalysis/blob/main/python/other-googlebuildings.ipynb)
34+
35+
* [CenPy for US Census data](https://nbviewer.org/github/ccxzhang/GeoSpatialAnalysis/blob/main/python/other-cenpy.ipynb)

js/.DS_Store

6 KB
Binary file not shown.

js/landsat_ndvi.js

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Obtain DC's geometry
2+
var dc = ee.FeatureCollection('TIGER/2018/States')
3+
.filterMetadata('NAME', 'equals', 'District of Columbia')
4+
.geometry();
5+
print(dc);
6+
7+
var dc_ls = ee.ImageCollection("LANDSAT/LC08/C01/T1_SR")
8+
.filterDate('2010-01-01', '2021-12-31')
9+
.filterBounds(dc)
10+
11+
print(dc_ls);
12+
13+
// Define a function to create a nvdi band
14+
var addNVDIBand = function(image) {
15+
var ndvi = image.normalizedDifference(['B5', 'B4']).rename('NDVI');
16+
return image.addBands([ndvi]);
17+
};
18+
19+
var dcNDVI = dc_ls.map(addNVDIBand).select('NDVI');
20+
print(dcNDVI.getInfo());
21+
22+
// Create a chart over time
23+
var chart =
24+
ui.Chart.image
25+
.series({
26+
imageCollection: dcNDVI,
27+
region: dc,
28+
reducer: ee.Reducer.mean(),
29+
scale: 30,
30+
xProperty: 'system:time_start'
31+
})
32+
.setSeriesNames(['NDVI'])
33+
.setOptions({
34+
title: 'NDVI over time',
35+
hAxis: {title: 'Year', titleTextStyle: {italic: false, bold: true}},
36+
vAxis: {
37+
title: 'NDVI',
38+
titleTextStyle: {italic: false, bold: true}
39+
},
40+
lineWidth: 2,
41+
colors: ['e37d05', '1d6b99'],
42+
curveType: 'function'
43+
});
44+
print(chart);

0 commit comments

Comments
 (0)