Skip to content

Commit

Permalink
Revert "Merge pull request #1349 from colouring-cities/historial-foot…
Browse files Browse the repository at this point in the history
…prints"

This reverts commit dfadb62, reversing
changes made to f5abdfe.
  • Loading branch information
mdsimpson42 committed Mar 14, 2024
1 parent dfadb62 commit 2651fc2
Show file tree
Hide file tree
Showing 23 changed files with 74 additions and 5,902 deletions.
20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@
![Build status](https://github.com/colouring-cities/colouring-core/workflows/Node.js%20CI/badge.svg)

How many buildings are there in a city? What are their characteristics? Where
are different types of building located? How well do they work for users/local communities? And how efficient, sustainable and resilient are they?

The Colouring Cities Research Programme (CCRP) is an international research initiative that designs and tests open-source tools to facilitate knowledge and data sharing on national building stocks. The project is managed from the UK by The Alan Turing Institute (the UK's national institute for datascience and AI) and involves a global consortium of academic partners testing CCRP platform code. All CCRP code, data and methods are released under open licences. For further information please see http://colouringcities.org/.
are they located and how do they contribute to the city? How adaptable are
they? How long will they last, and what are the environmental and
socio-economic implications of demolition?

Colouring Cities is a web-based citizen social
science project designed to help address these questions by crowdsourcing and
visualising twelve categories of information on the buildings in our cities.

## Structure

This repository contain open-source code for the project which:
This repository will contain open-source code for the project which:

- stores building footprint polygons and source metadata
- allows site users to record building attribute data
Expand Down Expand Up @@ -54,8 +57,11 @@ If you are having problems with the application, first look here: [docs/troubles

## Acknowledgements

Colouring London was set up at the Centre for Advanced Spatial Analysis, University College London in 2016 as part of EPSRC funded doctoral research undertaken by Polly Hudson. Tom Russell was responsible for original technical design and open licence strategy and selection. Ordnance Survey and the Greater London Authority provided access to high quality building footprints, essential for platform operation. In 2020 the Colouring Cities Research Programme (CCRP) was set up at The Alan Turing Institute, which has since funded CCRP development. Exceptional technical contributions to the prototype have been made by Mateusz Konieczny, Maciej Ziakowski, Ed Chalstrey, Dominic Humphrey and Dr Mike Simpson, and to CCRP international programme development by Dr Falli Palaiologou, Will Taylor, Dr Alden Conner, and research colleagues managing platforms in Australia, Bahrain, Lebanon, Greece, Germany, Colombia, Sweden and Indonesia. Many other individuals and organisations have also contributed to the research programme and are thanked on individual CCRP platforms.

Colouring London was set up at the Centre for Advanced Spatial
Analysis (CASA), University College London and is now based at The Alan Turing Institute.
Ordnance Survey is providing building footprints required to collect the data,
facilitated by the Greater London Authority (GLA), and giving access to its API
and technical support.

## License

Expand Down Expand Up @@ -118,4 +124,4 @@ This project follows the [all-contributors](https://github.com/all-contributors/

Even more thanks go to Colouring Cities contributors, funders, project partners, consultees,
advisers, supporters and friends - [everyone involved in the
project](https://github.com/colouring-cities/manual/wiki/M3.2-Colouring-Britain:-Who's-Involved%3F).
project](https://github.com/colouring-cities/manual/wiki/M3.2-Colouring-Britain:-Who's-Involved%3F).
5,573 changes: 0 additions & 5,573 deletions app/public/geometries/historical_footprints.geojson

This file was deleted.

14 changes: 7 additions & 7 deletions app/src/cc-config.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"cityName": "Britain",
"projectBlurb": "Colouring Britain is part of Colouring Cities.",
"cityName": "Cities",
"projectBlurb": "Colouring {City Name} is part of Colouring Cities.",

"githubURL": "https://github.com/colouring-cities/colouring-london",
"githubURL": "https://github.com/colouring-cities/colouring-core",
"manualURL": "https://github.com/colouring-cities/manual/wiki/M3.-COLOURING-BRITAIN",
"privacyStatement": "Colouring Britain stores your data at The Alan Turing Institute in London behind the organisation’s firewall in a secure database using industry standard practices",
"privacyStatement": "{Privacy statement goes here}",

"initialMapPosition": [ 51.5245255, -0.1338422 ],
"initialZoomLevel": 16,

"postcode": "Postcode",
"energy_rating": "Building Research Establishment Environmental Assessment Method (BREEAM) rating [<a href='https://bregroup.com/products/breeam/how-breeam-works'>More info</a>]",

"bbox": [-1227219, 6390006, 232268, 8640082],
"bbox": [-61149.622628, 6667754.851372, 37183, 6744803.375884],

"basemapTileUrl": "https://api.os.uk/maps/raster/v1/zxy/Light_3857/{z}/{x}/{y}.png?key=UVWEspgInusDKKYANE5bmyddoEmCSD4r",
"baseAttribution": "Building attribute data is © Colouring Cities contributors. Maps contain OS data © Crown copyright: OS Maps baselayers and building outlines. <a href=/ordnance-survey-licence.html>OS licence</a>, search results are powered by Code-Point® Open on <a href=https://github.com/colouring-cities/colouring-britain/issues/www.nationalarchives.gov.uk/doc/open-government-licence/version/3/>OGL license</a>"
"basemapTileUrl": "https://tile.openstreetmap.org/{z}/{x}/{y}.png",
"baseAttribution": "Building attribute data is © Colouring Cities contributors. Basemap © <a href=https://www.openstreetmap.org/copyright>OpenStreetMap contributors</a>. Building © MODIFY TO PROVIDE RELEVANT INFO"
}
2 changes: 1 addition & 1 deletion app/src/frontend/building/data-containers/age-history.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {

return (
<Fragment>
<DataEntryGroup name="Architectural style/historical period" collapsed={subcat==null || subcat!="2"}>
<DataEntryGroup name="Architectural style/historial period" collapsed={subcat==null || subcat!="2"}>
{(props.mapColourScale != "typology_style_period") ?
<button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark key-button`} onClick={switchToStylePeriodMapStyle}>
Click to show architectural style.
Expand Down
19 changes: 19 additions & 0 deletions app/src/frontend/config/category-maps-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -604,6 +604,25 @@ export const categoryMapsConfig: {[key in Category]: CategoryMapDefinition[]} =
]
}
},
/*{
mapStyle: 'typology_style_period',
legend: {
title: 'Architectural style',
elements: [
{ color: '#FFF739', text: '43AD-410 (Roman)' },
{ color: '#C5BD00', text: '410-1485 (Medieval)' },
{ color: '#FF9A39', text: '1485-1603 (Tudor)' },
{ color: '#C56000', text: '1603-1714 (Stuart)' },
{ color: '#EA8072', text: '1714-1837 (Georgian)' },
{ color: '#A71200', text: '1837-1901 (Victorian)' },
{ color: '#A272D4', text: '1901-1914 (Edwardian)' },
{ color: '#3988C5', text: '1914-1945 (WWI-WWII)' },
{ color: '#5ADFA2', text: '1946-1979 (Post war)' },
{ color: '#C2F47A', text: '1980-1999 (Late C20)' },
{ color: '#6FB40A', text: '2000-2025 (Early C21)' },
]
}
},*/
{
mapStyle: 'typology_dynamic_classification',
legend: {
Expand Down
4 changes: 2 additions & 2 deletions app/src/frontend/config/data-fields-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
date_link: {
category: Category.Age,
title: "Historical source link(s)",
tooltip: "URL(s) for historical data source(s) - Historical data source(s)",
tooltip: "URL(s) for historial data source(s) - Historical data source(s)",
example: ["", "", ""],
},
date_source_type: {
Expand All @@ -588,7 +588,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
date_source_links: {
category: Category.Age,
title: "Alternative Source link(s)",
tooltip: "URL(s) for historical data source(s) - Alternative data source(s)",
tooltip: "URL(s) for historial data source(s) - Alternative data source(s)",
example: ["", "", ""],
},

Expand Down
124 changes: 7 additions & 117 deletions app/src/frontend/displayPreferences-context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,6 @@ interface DisplayPreferencesContextState {
historicMapSwitch: (e: React.FormEvent<HTMLFormElement>) => void;
historicMapSwitchOnClick: React.MouseEventHandler<HTMLButtonElement>;

aerialPhotosMap: LayerEnablementState;
aerialPhotosMapSwitch: (e: React.FormEvent<HTMLFormElement>) => void;
aerialPhotosMapSwitchOnClick: React.MouseEventHandler<HTMLButtonElement>;

historicalFootprints: LayerEnablementState;
historicalFootprintsSwitch: (e: React.FormEvent<HTMLFormElement>) => void;
historicalFootprintsSwitchOnClick: React.MouseEventHandler<HTMLButtonElement>;

openStreetMap: LayerEnablementState;
openStreetMapSwitch: (e: React.FormEvent<HTMLFormElement>) => void;
openStreetMapSwitchOnClick: React.MouseEventHandler<HTMLButtonElement>;

darkLightTheme: MapTheme;
darkLightThemeSwitch: (e: React.FormEvent<HTMLFormElement>) => void;
darkLightThemeSwitchOnClick: React.MouseEventHandler<HTMLButtonElement>;
Expand Down Expand Up @@ -107,18 +95,6 @@ export const DisplayPreferencesContext = createContext<DisplayPreferencesContext
historicMapSwitch: stub,
historicMapSwitchOnClick: undefined,

aerialPhotosMap: undefined,
aerialPhotosMapSwitch: stub,
aerialPhotosMapSwitchOnClick: undefined,

historicalFootprints: undefined,
historicalFootprintsSwitch: stub,
historicalFootprintsSwitchOnClick: undefined,

openStreetMap: undefined,
openStreetMapSwitch: stub,
openStreetMapSwitchOnClick: undefined,

darkLightTheme: undefined,
darkLightThemeSwitch: stub,
darkLightThemeSwitchOnClick: undefined,
Expand All @@ -140,9 +116,6 @@ export const DisplayPreferencesProvider: React.FC<{}> = ({children}) => {
const defaultConservation = 'disabled'
const defaultHistoricData = 'disabled'
const defaultHistoricMap = 'disabled'
const defaultaerialPhotosMap = 'disabled'
const defaultHistoricalFootprints = 'disabled'
const defaultOpenStreetMap = 'disabled'
const defaultShowLayerSelection = 'disabled'
const [vista, setVista] = useState<LayerEnablementState>(defaultVista);
const [flood, setFlood] = useState<LayerEnablementState>(defaultFlood);
Expand All @@ -153,9 +126,6 @@ export const DisplayPreferencesProvider: React.FC<{}> = ({children}) => {
const [conservation, setConservation] = useState<LayerEnablementState>(defaultConservation);
const [historicData, setHistoricData] = useState<LayerEnablementState>(defaultHistoricData);
const [historicMap, setHistoricMap] = useState<LayerEnablementState>(defaultHistoricMap);
const [aerialPhotosMap, setaerialPhotosMap] = useState<LayerEnablementState>(defaultHistoricMap);
const [historicalFootprints, setHistoricalFootprints] = useState<LayerEnablementState>(defaultHistoricalFootprints);
const [openStreetMap, setOpenStreetMapMap] = useState<LayerEnablementState>(defaultOpenStreetMap);
const [darkLightTheme, setDarkLightTheme] = useState<MapTheme>('night');
const [showLayerSelection, setShowLayerSelection] = useState<LayerEnablementState>(defaultShowLayerSelection);

Expand All @@ -177,7 +147,6 @@ export const DisplayPreferencesProvider: React.FC<{}> = ({children}) => {
setConservation(defaultConservation);
setHistoricData(defaultHistoricData);
setHistoricMap(defaultHistoricMap);
setHistoricalFootprints(defaultHistoricalFootprints);
setShowLayerSelection(defaultShowLayerSelection); // reset layers + hiding this panel is integrated into one action
//setDarkLightTheme('night'); // reset only layers
},
Expand Down Expand Up @@ -212,15 +181,6 @@ export const DisplayPreferencesProvider: React.FC<{}> = ({children}) => {
if(historicMap != defaultHistoricMap) {
return true;
}
if(aerialPhotosMap != defaultaerialPhotosMap) {
return true;
}
if(historicalFootprints != defaultHistoricalFootprints) {
return true;
}
if(openStreetMap != defaultOpenStreetMap) {
return true;
}
//darkLightTheme not handled here
return false;
}
Expand Down Expand Up @@ -333,14 +293,11 @@ export const DisplayPreferencesProvider: React.FC<{}> = ({children}) => {
const historicDataSwitch = useCallback(
(e) => {
if (historicMap === 'enabled') {
flipHistoricMap(e);
}
if (historicalFootprints === 'enabled') {
flipHistoricFootprints(e);
fliphistoricMap(e);
}
flipHistoricData(e);
},
[historicData, historicMap, historicalFootprints],
[historicData, historicMap],
)
const historicDataSwitchOnClick = (e) => {
flipHistoricData(e)
Expand All @@ -356,74 +313,19 @@ export const DisplayPreferencesProvider: React.FC<{}> = ({children}) => {
if (historicData === 'enabled') {
flipHistoricData(e);
}
if (historicalFootprints === 'enabled') {
flipHistoricFootprints(e);
}
flipHistoricMap(e);
fliphistoricMap(e);
},
[historicMap, historicData, historicalFootprints],
[historicMap, historicData],
)
const historicMapSwitchOnClick = (e) => {
flipHistoricMap(e)
fliphistoricMap(e)
}
function flipHistoricMap(e) {
function fliphistoricMap(e) {
e.preventDefault();
const newHistoric = (historicMap === 'enabled')? 'disabled' : 'enabled';

setHistoricMap(newHistoric);
}

const aerialPhotosMapSwitch = useCallback(
(e) => {
flipaerialPhotosMap(e);
},
[aerialPhotosMap],
)
const aerialPhotosMapSwitchOnClick = (e) => {
flipaerialPhotosMap(e)
}
function flipaerialPhotosMap(e) {
e.preventDefault();
const newHistoric = (aerialPhotosMap === 'enabled')? 'disabled' : 'enabled';
setaerialPhotosMap(newHistoric);
}

const historicalFootprintsSwitch = useCallback(
(e) => {
if (historicMap === 'enabled') {
flipHistoricMap(e);
}
if (historicData === 'enabled') {
flipHistoricData(e);
}
flipHistoricFootprints(e)
},
[historicMap, historicData, historicalFootprints],
)
const historicalFootprintsSwitchOnClick = (e) => {
flipHistoricFootprints(e)
}
function flipHistoricFootprints(e) {
e.preventDefault();
const newFootprints = (historicalFootprints === 'enabled')? 'disabled' : 'enabled';
setHistoricalFootprints(newFootprints);
}

const openStreetMapSwitch = useCallback(
(e) => {
flipOpenStreetMap(e);
},
[openStreetMap],
)
const openStreetMapSwitchOnClick = (e) => {
flipOpenStreetMap(e)
}
function flipOpenStreetMap(e) {
e.preventDefault();
const newOpenStreetMap = (openStreetMap === 'enabled')? 'disabled' : 'enabled';
setOpenStreetMapMap(newOpenStreetMap);
}

const darkLightThemeSwitch = useCallback(
(e) => {
flipDarkLightTheme(e)
Expand Down Expand Up @@ -491,18 +393,6 @@ export const DisplayPreferencesProvider: React.FC<{}> = ({children}) => {
historicMapSwitch,
historicMapSwitchOnClick,

aerialPhotosMap,
aerialPhotosMapSwitch,
aerialPhotosMapSwitchOnClick,

historicalFootprints,
historicalFootprintsSwitch,
historicalFootprintsSwitchOnClick,

openStreetMap,
openStreetMapSwitch,
openStreetMapSwitchOnClick,

darkLightTheme,
darkLightThemeSwitch,
darkLightThemeSwitchOnClick,
Expand All @@ -518,4 +408,4 @@ export const DisplayPreferencesProvider: React.FC<{}> = ({children}) => {

export const useDisplayPreferences = (): DisplayPreferencesContextState => {
return useContext(DisplayPreferencesContext);
};
};
19 changes: 7 additions & 12 deletions app/src/frontend/header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@ function getCurrentMenuLinks(username: string): MenuLink[][] {
text: "About the Colouring " + config.cityName + " Project",
external: true
},
{
to: "https://github.com/colouring-cities/manual/wiki/M3.1-News",
text: "Colouring London/Prototype development news",
external: true
},
{
to: "https://github.com/colouring-cities/manual/wiki/A2.-How-to%3F-Guides",
text: "How to Use",
Expand All @@ -114,16 +109,16 @@ function getCurrentMenuLinks(username: string): MenuLink[][] {
to: "/leaderboard.html",
text: "Top Contributors"
},
{
to: "https://discuss.colouring.london/",
text: "Colouring London Discussions Forum",
external: true
},
{
to: config.githubURL+"/discussions",
text: "Technical Discussion Forum (GitHub)",
text: "Discussion Forum (GitHub)",
external: true
},
// {
// to: "https://discuss.colouring.london/c/blog/9",
// text: "Blog",
// external: true
// },
],
[
{
Expand Down Expand Up @@ -242,4 +237,4 @@ export const Header: React.FC<{
</nav>
</header>
);
}
}
17 changes: 0 additions & 17 deletions app/src/frontend/map/aerial-photos-map-switcher.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion app/src/frontend/map/historic-data-switcher.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const HistoricDataSwitcher: React.FC<{}> = (props) => {
<form className={`historic-data-switcher map-button ${historicData}-state ${darkLightTheme}`} onSubmit={historicDataSwitch}>
<button className="btn btn-outline btn-outline-dark"
type="submit">
{(historicData === 'enabled')? 'OS 1890s Map + Modern Footprints on' : 'OS 1890s Map + Modern Footprints off'}
{(historicData === 'enabled')? 'OS 1890s Historical Map + Footprints on' : 'OS 1890s Historical Map + Footprints off'}
</button>
</form>
);
Expand Down
Loading

0 comments on commit 2651fc2

Please sign in to comment.