Skip to content

Commit

Permalink
Use new bucket structure for maps demo data
Browse files Browse the repository at this point in the history
  • Loading branch information
katamartin committed Mar 23, 2022
1 parent 0df34fb commit 50c88cc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions posts/maps-library-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,20 +57,20 @@ For the simplest possible example, the following code renders a 2D map of global
import { Map, Raster, Line } from '@carbonplan/maps'
import { useColormap } from '@carbonplan/colormaps'

const bucket = https://storage.googleapis.com/carbonplan-share/’
const bucket = 'https://storage.googleapis.com/carbonplan-maps/v1/demo/'

const colormap = useColormap('warm')

<Map>
<Line
color={'white'}
source={bucket + 'maps-demo/land'}
source={bucket + 'land'}
variable={'land'}
/>
<Raster
colormap={colormap}
clim={[-20,30]}
source={bucket + 'maps-demo/2d/tavg'}
source={bucket + '2d/tavg'}
variable={'​​tavg'}
/>
</Map>
Expand Down Expand Up @@ -102,7 +102,7 @@ With the same component, we can just as easily render a 4D map where the third d
<Raster
colormap={colormap}
clim={clim}
source={bucket +maps-demo/4d/tavg-prec-month'}
source={bucket +4d/tavg-prec-month'}
variable={'climate'}
selector={{ band, month }}
/>
Expand All @@ -118,7 +118,7 @@ In more advanced settings, we might want more control over rendering, including
<Raster
colormap={colormap}
clim={[-20, 30]}
source={bucket + ‘maps-demo/3d/tavg-month’}
source={bucket + ‘3d/tavg-month’}
variable={'tavg'}
selector={{ month: [1, 2] }}
frag={`
Expand Down
6 changes: 3 additions & 3 deletions posts/maps-library-release/maps-demo-2d.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Map, Raster, Line } from '@carbonplan/maps'
import { useThemedColormap } from '@carbonplan/colormaps'
import Zoom from './zoom'

const bucket = 'https://storage.googleapis.com/carbonplan-share/'
const bucket = 'https://storage.googleapis.com/carbonplan-maps/v1/demo/'

const MapDemo2d = () => {
const { theme } = useThemeUI()
Expand All @@ -25,13 +25,13 @@ const MapDemo2d = () => {
<Map>
<Line
color={theme.rawColors.primary}
source={bucket + 'maps-demo/land'}
source={bucket + 'land'}
variable={'land'}
/>
<Raster
colormap={colormap}
clim={[-20, 30]}
source={bucket + 'maps-demo/2d/tavg'}
source={bucket + '2d/tavg'}
variable={'tavg'}
dimensions={['y', 'x']}
/>
Expand Down
6 changes: 3 additions & 3 deletions posts/maps-library-release/maps-demo-4d.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Group } from '@carbonplan/components'
import Parameters from './parameters'
import Zoom from './zoom'

const bucket = 'https://storage.googleapis.com/carbonplan-share/'
const bucket = 'https://storage.googleapis.com/carbonplan-maps/v1/demo/'

const CLIMS = {
tavg: [-20, 30],
Expand Down Expand Up @@ -42,13 +42,13 @@ const MapDemo4d = () => {
<Map>
<Line
color={theme.rawColors.primary}
source={bucket + 'maps-demo/land'}
source={bucket + 'land'}
variable={'land'}
/>
<Raster
colormap={colormap}
clim={CLIMS[band]}
source={bucket + 'maps-demo/4d/tavg-prec-month'}
source={bucket + '4d/tavg-prec-month'}
variable={'climate'}
dimensions={['band', 'month', 'y', 'x']}
selector={{ band, month }}
Expand Down

1 comment on commit 50c88cc

@vercel
Copy link

@vercel vercel bot commented on 50c88cc Mar 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.