Skip to content

Commit

Permalink
Revert "Updated the Shapefile, TimeSeriesTableFullTimeSeriesInner, an…
Browse files Browse the repository at this point in the history
…d TimeSeriesTableFull files."

This reverts commit b0f2372.
  • Loading branch information
00krishna committed Jul 20, 2024
1 parent b0f2372 commit e1487e2
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 70 deletions.
6 changes: 3 additions & 3 deletions src/models/model_DatasetSimple.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ group, and sequence.
# Arguments
- `name::String`- **(Optional)** The dataset identifier
- `description::String`- **(Optional)** A short description of the dataset
- `group::String`- **(Optional)** The group of datasets to which this dataset belongs.
- `sequence::Int64`- **(Optional)** The order in which the dataset will appear in the metadata API and extracts.
- `description::String`-(Optional) A short description of the dataset
- `group::String`-(Optional) The group of datasets to which this dataset belongs.
- `sequence::Int64`-(Optional) The order in which the dataset will appear in the metadata API and extracts.
# Returns
Expand Down
32 changes: 12 additions & 20 deletions src/models/model_Shapefile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,25 @@ Shapefile(;
sequence=nothing,
)
```
This function creates a reference to an NHGIS shapefile for an IPUMS dataset.
This function creates a representation for geographic information systems (GIS) files.
# Arguments
# Attributes
- `name::String`- **(Optional)** The unique identifier of the shapefile.
- `year::String`- **(Optional)** The survey year in which the file's represented areas were used for tabulations.
- `geographicLevel::String`- **(Optional)** The geographic level of the shapefile.
- `extent::String`- **(Optional)** The geographic extent which is covered by the shapefile.
- `basis::String`- **(Optional)** The derivation source of the shapefile.
- `sequence::Int64`- **(Optional)** The order the shapefile in which appears in the metadata API.
- `name::String`-The unique identifier of the shapefile.
- `year::String`-The survey year in which the file's represented areas were used for tabulations.
- `geographicLevel::String`-The geographic level of the shapefile.
- `extent::String`-The geographic extent which is covered by the shapefile.
- `basis::String`-The derivation source of the shapefile.
- `sequence::Int64`- The order the shapefile in which appears in the metadata API.
# Returns
This function returns a Shapefile object containing the attributes specified in
the function arguments.
It returns a list of all the available shapefile.
# Examples
```julia-repl
julia> IPUMS.Shapefile(name = "base.tl2000.nongen.us_state_1790",
year = "1790",
geographicLevel = "state",
extent = "united states",
basis = "2000 tiger/line +",
sequence = 1)
# Output
julia> IPUMS.Shapefile(name = "base.tl2000.nongen.us_state_1790", year = "1790", geographicLevel = "state", extent = "united states", basis = "2000 tiger/line +", sequence = 1)
{
"name": "base.tl2000.nongen.us_state_1790",
"year": "1790",
Expand All @@ -52,7 +43,8 @@ julia> IPUMS.Shapefile(name = "base.tl2000.nongen.us_state_1790",
```
# References
Additional information about this object is available in the [IPUMS Developer Docs](https://developer.ipums.org/docs/v2/workflows/explore_metadata/nhgis/shapefiles/)
To find out more about the Shapefile type visit :
* https://developer.ipums.org/docs/v2/workflows/explore_metadata/nhgis/shapefiles/
"""
Base.@kwdef mutable struct Shapefile <: OpenAPI.APIModel
name::Union{Nothing, String} = nothing
Expand Down
51 changes: 19 additions & 32 deletions src/models/model_TimeSeriesTableFull.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,42 +13,31 @@ TimeSeriesTableFull(;
geogLevels=nothing,
)
```
This function returns an object containing the attributes for downloading a
Time Series Table.
This function creates a table record for the `TimeSeriesTableFull`.
# Arguments
- `name::String`- **(Optional)** The unique variable identifier for the time series table, (eg. "A00", "OWNERSHP").
- `description::String`- **(Optional)** A short description of the time series variable referred to in `name`.
- `geographicIntegration::String`- **(Optional)** Specifies how the variable accounts for changes in geographic boundaries over time, (eg. "Nominal").
- `sequence::Float32`- **(Optional)** The order of appearence of the dataset in the metadata API and extract.
- `timeSeries::Vector{TimeSeriesTableFullTimeSeriesInner}`- **(Optional)** A list of time series records corresponding to the variable specified in `name`.
- `geogLevels::Vector{TimeSeriesTableFullTimeSeriesInner}`- **(Optional)** A list of geographic levels available for this time series table.
- `name::String`- The unique variable identifier for the time series table, (eg. "A00", "OWNERSHP").
- `description::String`- A short description of the time series variable referred to in `name`.
- `geographicIntegration::String`- How does the variable value account for changes in geographic boundaries over time, (eg. "Nominal").
- `sequence::Float32`- The order of appearence of the dataset in the metadata API and extract.
- `timeSeries::Vector{TimeSeriesTableFullTimeSeriesInner}`- A list of time series records corresponding to the variable specified in `name`.
- `geogLevels::Vector{TimeSeriesTableFullTimeSeriesInner}`- A list of geographic levels available for this time series table.
# Returns
This function return a `TimeSeriesTableFull` object containing the variable
name, description, time series, and geographical information of the data.
The return is a new record for the `TimeSeriesTableFull` containing the variable name, description, time series, and geographical information of the data.
# Examples
```julia-repl
julia> IPUMS.TimeSeriesTableFull(name="A00",
description= "Total Population",
julia> IPUMS.TimeSeriesTableFull(name="A00", description= "Total Population",
geographicIntegration= "Nominal",
sequence= 0.01,
timeSeries=[IPUMS.TimeSeriesTableFullTimeSeriesInner(name = "AA",
description = "Persons: Total",
sequence = 1 )],
geogLevels= [ IPUMS.TimeSeriesTableFullTimeSeriesInner(name = "state",
description = "State",
sequence = 4 ),
IPUMS.TimeSeriesTableFullTimeSeriesInner(name = "county",
description = "State--County",
sequence = 25 )])
# Output
timeSeries=[Dict("name" => "AA", "description" => "Persons: Total", "sequence" => 1 )],
geogLevels= [ Dict( "name" => "state", "description" => "State", "sequence" => 4 ),
Dict( "name" => "county", "description" => "State--County", "sequence" => 25 ) ])
{
"name": "A00",
"description": "Total Population",
Expand All @@ -57,25 +46,23 @@ julia> IPUMS.TimeSeriesTableFull(name="A00",
"timeSeries": [
{
"name": "AA",
"description": "Persons: Total",
"sequence": 1
"sequence": 1,
"description": "Persons: Total"
}
],
"geogLevels": [
{
"name": "state",
"description": "State",
"sequence": 4
"sequence": 4,
"description": "State"
},
{
"name": "county",
"description": "State--County",
"sequence": 25
"sequence": 25,
"description": "State--County"
}
]
}
```
# References
Expand Down
24 changes: 9 additions & 15 deletions src/models/model_TimeSeriesTableFullTimeSeriesInner.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,23 @@ TimeSeriesTableFullTimeSeriesInner(;
sequence=nothing,
)
```
This function creates a reference to an IPUMS Time Series table.
Inner constructor representing the variables within a TimeSeriesTableFull object
# Arguments
- `name::String`- **(Optional)** The unique identifier of the time series table.
- `description::String`- **(Optional)** A short description of the time series table.
- `sequence::Int64`- **(Optional)** The order in which the time series table will appear in the metadata API and extracts.
- `name::String`- The unique identifier of the time series table.
- `description::String`- A short description of the time series table.
- `sequence::Int64`- The order in which the time series table will appear in the metadata API and extracts.
# Returns
This function returns a `TimeSeriesTableFullTimeSeriesInner` object that contains
information about a desired Time Series table.
This returns an inner constructor.
# Examples
```julia-repl
julia> IPUMS.TimeSeriesTableFullTimeSeriesInner(name = "1790_cPop",
description = "1790 Census: Population Data [US, States & Counties]",
sequence = 101)
# Output
julia> IPUMS.TimeSeriesTableFullTimeSeriesInner(name = "1790_cPop", description = "1790 Census: Population Data [US, States & Counties]", sequence = 101)
{
"name": "1790_cPop",
"description": "1790 Census: Population Data [US, States & Counties]",
Expand All @@ -41,8 +35,8 @@ julia> IPUMS.TimeSeriesTableFullTimeSeriesInner(name = "1790_cPop",
```
# References
Additional information about the `TimeSeriesTableFullTimeSeriesInner`object is available in the [IPUMS Developer Docs](https://developer.ipums.org/docs/v2/workflows/explore_metadata/nhgis/time_series/)
To find out more about the TimeSeriesTableFullTimeSeriesInner visit:
* https://developer.ipums.org/docs/v2/workflows/explore_metadata/nhgis/time_series/
"""
Base.@kwdef mutable struct TimeSeriesTableFullTimeSeriesInner <: OpenAPI.APIModel
name::Union{Nothing, String} = nothing
Expand Down

0 comments on commit e1487e2

Please sign in to comment.