Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Weather component #79

Merged
merged 20 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ This repository contains the original data for the Berliner Weihnachtsmarktkarte

Original data sources

The informations on the [christmas marktes is based on an open dataset](https://daten.berlin.de/datensaetze/berliner-weihnachtsmärkte-2022) at the berlin open data portal, which is annually updated by the Senatsverwaltung für Wirtschaft, Energie und Betriebe. The information on design cristmas markets is currently only available as a list via Berlin.de. They were transferred into a geodata set by means of webscraping. The locations of the public toilets can also be found in the berlin open data portal, which is regularly updated by the Senatsverwaltung für Umwelt, Mobilität, Verbraucher- und Klimaschutz.
The informations on the [christmas marktes is based on an open dataset](https://daten.berlin.de/datensaetze/berliner-weihnachtsmärkte) at the berlin open data portal, which is annually updated by the Senatsverwaltung für Wirtschaft, Energie und Betriebe. The information on design cristmas markets is currently only available as a list via Berlin.de. They were transferred into a geodata set by means of webscraping. The locations of the public toilets can also be found in the berlin open data portal, which is regularly updated by the Senatsverwaltung für Umwelt, Mobilität, Verbraucher- und Klimaschutz.

## Tech stack

Expand Down Expand Up @@ -222,10 +222,10 @@ The Christmas market data used is under CC-BY license. We have processed and enr
</a>
</td>
<td>
Supported by: <a href="https://www.berlin.de/sen/inneres/">
Supported by: <a href="https://www.berlin.de/senatskanzlei/">
<br />
<br />
<img width="80" src="./resources/B_SEN_InnDS_Logo_DE_V_PW_RGB.svg"/>
<img width="80" src="https://logos.citylab-berlin.org/logo-berlin-senatskanzelei-en.svg"/>
</a>
</td>
</tr>
Expand Down
64 changes: 47 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"dependencies": {
"@headlessui/react": "1.7.3",
"classnames": "2.3.2",
"date-fns": "2.29.3",
"date-fns": "^2.30.0",
"mapbox-gl": "npm:[email protected]",
"maplibre-gl": "2.4.0",
"next": "13.0.0",
Expand Down
13 changes: 13 additions & 0 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import { SnowNav } from '@components/SnowNav'
import { AudioPlayer } from '@components/AudioPlayer'
import { IntroModal } from '@components/IntroModal'

import { WeatherOverlay } from '@components/WeatherOverlay'

import { getMapData } from '@lib/loadMapData'
import { filterMarkets } from '@lib/filterMarkets'

Expand Down Expand Up @@ -56,6 +58,8 @@ const MapSite: NextPage = (mapData: any) => {
const [marketData, setMarketData] = useState<any>()
const [marketFilterInternational, setMarketFilterInternational] =
useState<boolean>(false)
const [marketFilterAccessible, setMarketFilterAccessible] =
useState<boolean>(false)
const [marketFilterCosts, setMarketFilterCosts] = useState<boolean>(false)
const [marketFilterDate, setMarketFilterDate] = useState<Date | boolean>(
false
Expand Down Expand Up @@ -124,6 +128,7 @@ const MapSite: NextPage = (mapData: any) => {
const newData = filterMarkets(
marketsData,
marketFilterInternational,
marketFilterAccessible,
marketFilterCosts,
marketFilterDate,
marketFilterAction,
Expand All @@ -134,6 +139,7 @@ const MapSite: NextPage = (mapData: any) => {
setMarketsData(JSON.parse(JSON.stringify(newData)))
}, [
marketFilterInternational,
marketFilterAccessible,
marketFilterCosts,
marketFilterDate,
marketFilterAction,
Expand Down Expand Up @@ -185,6 +191,8 @@ const MapSite: NextPage = (mapData: any) => {
<SidebarContentFilter
marketFilterInternational={marketFilterInternational}
setMarketFilterInternational={setMarketFilterInternational}
marketFilterAccessible={marketFilterAccessible}
setMarketFilterAccessible={setMarketFilterAccessible}
marketFilterCosts={marketFilterCosts}
setMarketFilterCosts={setMarketFilterCosts}
marketFilterDate={marketFilterDate}
Expand Down Expand Up @@ -221,6 +229,11 @@ const MapSite: NextPage = (mapData: any) => {
setMarketId={setMarketId}
/>
<SnowNav></SnowNav>
<WeatherOverlay
marketFilterDate={marketFilterDate}
setSidebarMenuOpen={setSidebarMenuOpen}
/>

<AudioPlayer></AudioPlayer>
<MapComponent
mapData={mapData}
Expand Down
1 change: 1 addition & 0 deletions public/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@ lng | `number` | coordinate | 13.45436119
ignore | `string` | if you want to ignore the entry | '0' or '1'
immer-kostenlos | `string` | filter free | '0' or '1'
international | `string` | filter international | '0' or '1'
barrierefrei | `string` | filter barrierefrei | '0' or '1'
action | `string` | filter action | '0' or '1'
short_distance | `string` | filter short_distance | '0' or '1'
Loading